{
  "openapi": "3.1.0",
  "info": {
    "title": "albus API",
    "version": "1.0.0",
    "description": "## Introduction\n\nThe albus API lets your code do what people do in the albus app. It covers the support inbox, conversations and tickets, the AI assistant, the help center, feedback boards, roadmaps, the changelog, the status page, contacts and companies, projects and tasks, and integrations.\n\nThe sidebar groups endpoints by area. Each endpoint lists its parameters, request body, responses and errors. A first request lists the workspaces you belong to:\n\n```bash\ncurl https://app.usealbus.app/api/workspace \\\n  -H \"Authorization: Bearer $API_KEY\"\n```\n\n## Base URL\n\nPaths in this reference are relative to the server URL shown above, which ends in `/api`. For example, `GET /workspace` is:\n\n```text\nhttps://app.usealbus.app/api/workspace\n```\n\nThe server publishes the OpenAPI document behind this reference at `GET /openapi`.\n\n## Authentication\n\nMost endpoints need a credential in the `Authorization` header:\n\n```text\nAuthorization: Bearer <API key or session token>\n```\n\nYou can also send an API key in the `x-api-key` header. A missing, unknown, disabled or expired credential gets `401` with the code `UNAUTHORIZED`.\n\n### API keys\n\nCreate a key in the app under **Settings → Account → API Keys**. Copy it when it is shown, because it is not shown again. A key expires after 1, 7, 30 or 90 days, or never, as you choose. Revoke it on the same page.\n\nA key acts as the person who created it. It reaches only the workspaces that person belongs to, and does only what their role in each workspace allows.\n\nSome keys also carry a permission scope, such as the key that an installed app receives. A scoped key does only what both its scope and the owner's role allow. A missing scope gets `403` with `API_KEY_SCOPE`, and a missing role permission gets `403` with `MISSING_PERMISSION`. Both list what is missing in `missingPermissions`, as `resource:action`, for example `task:update`.\n\nA few endpoints refuse API keys and need a signed-in session, for example the ones that create or change credentials. They answer `403` with `SESSION_REQUIRED`.\n\n### Session tokens\n\nSigning in creates a session. The web app sends it as a cookie. Other clients can send the session token as `Authorization: Bearer <token>`. The device authorization flow (`POST /auth/device/code`, then `POST /auth/device/token`) gives command-line tools a token that works the same way.\n\n### Endpoints with their own authentication\n\nEndpoints that show no authentication in this reference do not use the scheme above. Some need no credential, such as the instance status, the instance configuration and public project pages. Calendar feeds carry a secret token in their URL. Others check a credential themselves, and their descriptions say how. Three groups work this way:\n\n- **Widget (public)**: the embeddable chat and feedback widget. Get a widget session token from *Start an anonymous widget session*, or from *Identify a widget visitor with a signed token*, which takes a short-lived HS256 JWT that your server signs with the workspace's widget secret. Send the token as `Authorization: Bearer <token>`. A widget session lasts 7 days. It ends early when the widget is turned off or its secret is replaced.\n- **Customer portal (public)**: the customer portal, the public help center, the status page and the public changelog. Some of these work without signing in. The others act for a signed-in customer and read the customer's own session. They never accept an API key.\n- **Signed callbacks**: called by other services, not by your code. They receive GitHub, GitLab and Slack events, Segment identify calls, inbound mail, mail delivery events, OAuth redirects and portal sign-in links. Each one checks the sender's signature, shared secret, signed token or one-time code first. A repeated delivery changes nothing.\n\n## IDs\n\nSupport, feedback and content records use TypeIDs. A TypeID is a lowercase prefix that names the record type, an underscore, and 26 base32 characters that encode a UUID:\n\n```text\nconversation_01h455vb4pex5vsknk084sn02q\n```\n\nCommon prefixes are `conversation`, `conversation_msg`, `ticket`, `post`, `board`, `article`, `changelog`, `roadmap`, `company`, `segment` and `webhook`. A `user` ID names a customer. A `principal` ID names anyone who acts in a workspace, a teammate or a customer.\n\nMost endpoints that take one of these IDs also accept the bare UUID, such as `01890a5d-ac96-774b-bcce-b302099a8057`, and responses use the TypeID. An ID with the wrong prefix fails validation. Each parameter says which prefix it expects.\n\nProjects, tasks, workspaces, labels and the other project records use opaque string IDs. Do not build or parse IDs yourself.\n\n## Requests and responses\n\n- Send request bodies as JSON, with `Content-Type: application/json`. Responses are JSON, except where an endpoint says otherwise: feeds, sitemaps, calendar files, file downloads and redirects.\n- Timestamps are ISO 8601 strings in UTC, such as `2026-03-14T09:26:53.589Z`.\n- A field that the schema marks as nullable is sent as `null` when it has no value. An optional field may be left out.\n- Strings, lists and page sizes have documented limits. A value outside them fails validation.\n- Some create endpoints take an `idempotencyKey`, so that a retried request does not create a second record. On those endpoints you can send the key in the `Idempotency-Key` header instead. Each one describes what happens when a key comes back with different content.\n\n## Pagination\n\nList endpoints return one page at a time. Each endpoint documents its own parameters, in one of these styles:\n\n- **Cursor**: send `limit`, then pass the response's `nextCursor` as `cursor` to get the next page. `nextCursor` is `null` on the last page. Some responses also include `hasMore`. Some message timelines page backwards with `before`.\n- **Offset**: send `limit` and `offset`. The response includes `nextOffset`, which is `null` on the last page, or `total` or `hasMore`.\n- **Page number**: send `page`, starting at 1, and `limit`. The response includes totals, so you can tell when to stop.\n\nEach endpoint documents the minimum, maximum and default of its `limit`. The maximum is usually 100. Where a maximum is documented, a larger value fails with `400` and `VALIDATION_ERROR`.\n\n## Errors\n\nErrors use standard HTTP status codes and a JSON body, the `ApiError` schema:\n\n```json\n{\n  \"message\": \"Insufficient API key scope\",\n  \"code\": \"API_KEY_SCOPE\",\n  \"missingPermissions\": [\"task:update\"]\n}\n```\n\n- `message` is for people. Do not parse it.\n- `code` is a stable `UPPER_SNAKE_CASE` value. Branch on it. Most codes follow the status, such as `NOT_FOUND` for `404`. Some are more specific, such as `VALIDATION_ERROR`, `MISSING_PERMISSION`, `API_KEY_SCOPE` and `SESSION_REQUIRED`.\n- `issues` lists every invalid input when `code` is `VALIDATION_ERROR`.\n- `missingPermissions` lists what the caller lacks, as `resource:action`.\n\nNew fields may be added, so ignore the ones you do not recognize. The device authorization and MCP OAuth endpoints follow their standards instead and answer with `{\"error\": \"...\"}` bodies.\n\n### Validation errors\n\nA request that fails validation gets `400` with `VALIDATION_ERROR`. `message` repeats the first issue, and `issues` lists all of them:\n\n```json\n{\n  \"message\": \"title: Too small: expected string to have >=1 characters\",\n  \"code\": \"VALIDATION_ERROR\",\n  \"issues\": [\n    {\n      \"path\": \"body.title\",\n      \"message\": \"Too small: expected string to have >=1 characters\",\n      \"code\": \"too_small\",\n      \"origin\": \"string\",\n      \"minimum\": 1\n    }\n  ]\n}\n```\n\nEach `path` starts with the part of the request that failed (`body`, `query`, `params` or `header`), then the field. `code` is the validator's issue code, such as `too_small`, `too_big`, `invalid_type` or `invalid_format`. Translate from it rather than from the English `message`. A size issue also has `origin` and `minimum` or `maximum`.\n\n### Common status codes\n\n| Status | Meaning |\n| --- | --- |\n| `400` | The request is invalid. See `issues`. |\n| `401` | The credential is missing, unknown, disabled or expired. |\n| `403` | The credential is valid but may not do this. See `code` and `missingPermissions`. |\n| `404` | The record does not exist or you cannot see it. A workspace or record that you cannot access gets `404`, the same as one that does not exist. |\n| `409` | The request conflicts with the current state. |\n| `413` | The request body is too large. |\n| `429` | Too many requests. Wait the number of seconds in `Retry-After`. |\n| `500` | An unexpected server error. The body never includes internal details. |\n| `502`, `503` | A service that the request needs failed or is not set up. |\n\nRetry only `408`, `429` and `5xx` responses, and only requests that are safe to repeat. Change the request before you send it again after any other `4xx`.\n\n## Rate limits\n\nEach API key may make 100 requests in a 60-second window by default. Requests made with a session do not count against it.\n\nThe window follows the key's most recent request. Each counted request starts the 60 seconds again, and the count resets only after a full window passes with no requests. A steady stream of requests therefore keeps the window open: after 100 requests, the key is limited until it has been idle for 60 seconds.\n\nWhen the key has a rate limit, responses to its requests include these headers:\n\n| Header | Meaning |\n| --- | --- |\n| `X-RateLimit-Limit` | Requests the key may make per window. |\n| `X-RateLimit-Remaining` | Requests left in the current window. |\n| `X-RateLimit-Reset` | Unix time in seconds when the window resets, if the key makes no more requests. |\n\nOver the limit, the API answers `429` with the code `RATE_LIMITED` and a `Retry-After` header with the seconds to wait. A key can also have a usage quota. When the quota runs out, the API answers `429` with the message `API key usage limit exceeded`, and with `Retry-After` when the quota refills at a known time.\n\nPublic widget and portal endpoints that change data count attempts per client IP address and workspace, and some also per signed-in account. They answer `429` with `Retry-After` over their limit. Sign-in and other account endpoints under `/auth` can have their own per-IP limits.\n\n## Webhooks\n\n### Workspace webhooks\n\nCreate a webhook with the endpoints under **Webhooks and apps**, and choose the support, feedback and content events it receives. Each event arrives as a `POST` with a JSON body:\n\n```json\n{\n  \"id\": \"evt_01h455vb4pex5vsknk084sn02q\",\n  \"type\": \"conversation.created\",\n  \"createdAt\": \"2026-03-14T09:26:53.589Z\",\n  \"data\": {\n    \"messageId\": \"conversation_msg_01h455vb4pex5vsknk084sn02q\",\n    \"entityType\": \"conversation\",\n    \"entityId\": \"conversation_01h455vb4pex5vsknk084sn02q\"\n  }\n}\n```\n\n`data` holds the event's own fields, plus the type and ID of the record it is about. Each delivery also carries headers with the event type, a delivery key, a Unix timestamp in seconds and the signature. The endpoint that creates a webhook names the timestamp and signature headers.\n\nThe signature is `sha256=` followed by the hex HMAC-SHA256 of the timestamp, a dot and the raw body, keyed with the webhook's signing secret. To verify a delivery, compute the same HMAC, compare the two values in constant time, and reject old timestamps. The secret is shown once, when you create the webhook or rotate its secret.\n\nAnswer with a `2xx` status within 5 seconds. A delivery that gets `408`, `429` or a `5xx` status is retried, up to 10 attempts in all. Retries keep the same delivery key, so use it to drop duplicates. A delivery whose outcome is unknown, such as one that timed out, is not sent again. You can replay deliveries, and catch up after downtime with the outbox events endpoint.\n\n### Project webhooks\n\nA project's outgoing webhook, under **Generic Webhook**, sends the task events you select. When the webhook has a secret, each request is signed with the hex HMAC-SHA256 of the raw body, keyed with that secret.\n\n## Versioning and stability\n\nThe API has one version, shown at the top of this page. Paths do not carry a version.\n\nNew endpoints, optional request fields, response fields, enum values and error codes can be added at any time. Write clients that ignore fields they do not recognize and that handle enum values they have not seen. The OpenAPI document at `GET /openapi` always describes the server that answers it."
  },
  "servers": [
    {
      "url": "https://app.usealbus.app/api",
      "description": "albus API Server"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "responses": {
      "ApiKeyRateLimited": {
        "description": "The API key exceeded its rate limit or usage quota. Wait the number of seconds in Retry-After before retrying. The X-RateLimit headers are sent only when the rate limit was hit.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying. Omitted when an exhausted usage quota never refills.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Limit": {
            "description": "Requests the API key may make per window.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests left in the current window.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "description": "Unix time in seconds when the current window resets.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key or session token (Bearer)"
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable description of the error.",
            "example": "Task not found"
          },
          "code": {
            "type": "string",
            "description": "Stable UPPER_SNAKE_CASE code. Derived from the status unless a more specific code applies, such as VALIDATION_ERROR or MISSING_PERMISSION.",
            "example": "NOT_FOUND"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "Dotted path to the invalid input, prefixed with the request part (body, query, params, header).",
                  "example": "body.title"
                },
                "message": {
                  "type": "string",
                  "description": "English description of this issue. Show it to people; branch on code instead.",
                  "example": "Too small: expected string to have >=1 characters"
                },
                "code": {
                  "type": "string",
                  "description": "The validator's issue code, such as too_small, too_big, invalid_format or invalid_type. Translate from it rather than from message.",
                  "example": "too_small"
                },
                "origin": {
                  "type": "string",
                  "description": "The kind of value the issue is about, such as string, number or array.",
                  "example": "string"
                },
                "minimum": {
                  "type": "number",
                  "description": "For too_small: the smallest allowed length, size or value.",
                  "example": 1
                },
                "maximum": {
                  "type": "number",
                  "description": "For too_big: the largest allowed length, size or value.",
                  "example": 200
                }
              },
              "required": [
                "path",
                "message"
              ]
            },
            "description": "Every validation issue, for VALIDATION_ERROR."
          },
          "missingPermissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Permissions the caller lacks for this route, as resource:action, for MISSING_PERMISSION and API_KEY_SCOPE.",
            "example": [
              "task:update"
            ]
          }
        },
        "required": [
          "message",
          "code"
        ],
        "description": "The body of every error response. Branch on code, not on message. New fields may be added.",
        "example": {
          "message": "title: Too small: expected string to have >=1 characters",
          "code": "VALIDATION_ERROR",
          "issues": [
            {
              "path": "body.title",
              "message": "Too small: expected string to have >=1 characters",
              "code": "too_small",
              "origin": "string",
              "minimum": 1
            }
          ]
        }
      },
      "InstanceStatus": {
        "type": "object",
        "properties": {
          "hasUsers": {
            "type": "boolean",
            "description": "Whether at least one user account exists. Anonymous accounts are not counted.",
            "example": true
          },
          "hasAdmin": {
            "type": "boolean",
            "description": "Whether at least one user has the instance `admin` role.",
            "example": true
          }
        },
        "required": [
          "hasUsers",
          "hasAdmin"
        ],
        "description": "Setup state of the instance."
      },
      "PublicBoardPage": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Board"
          },
          {
            "type": "object",
            "properties": {
              "pagination": {
                "$ref": "#/components/schemas/BoardPagination"
              }
            },
            "required": [
              "pagination"
            ]
          }
        ],
        "description": "One page of a public project board: the project, its columns with this page's tasks, and the pagination state."
      },
      "BoardColumn": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The column slug, same as `slug`.",
            "example": "in-progress"
          },
          "slug": {
            "type": "string",
            "description": "Slug of the column, used as the `status` of its tasks.",
            "example": "in-progress"
          },
          "name": {
            "type": "string",
            "description": "Display name of the column.",
            "example": "In progress"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Icon name of the column. Null when none is set.",
            "example": "Timer"
          },
          "isFinal": {
            "type": "boolean",
            "description": "Whether tasks in this column count as completed. Moving a repeating task here creates its next occurrence.",
            "example": false
          },
          "position": {
            "type": "number",
            "description": "Order of the column on the board, ascending.",
            "example": 1
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoardTask"
            },
            "description": "Tasks of the current page in this column, in the requested sort order."
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "icon",
          "isFinal",
          "tasks"
        ],
        "description": "A board column with its tasks."
      },
      "BoardTask": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the task.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "title": {
            "type": "string",
            "description": "Title of the task.",
            "example": "Fix login redirect loop"
          },
          "number": {
            "type": [
              "number",
              "null"
            ],
            "description": "Per-project counter shown as {projectSlug}-{number}.",
            "example": 12
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description in Markdown. Null when the task has no stored description, or when `descriptionDeferred` is true.",
            "example": "Users are sent back to the login page after signing in."
          },
          "descriptionDeferred": {
            "type": "boolean",
            "description": "True when the list omits a large description; load the task detail or description pages to read it. Do not replace stored text with this null summary.",
            "example": false
          },
          "status": {
            "type": "string",
            "description": "The slug of the column the task sits in, or `planned` or `archived`.",
            "example": "in-progress"
          },
          "priority": {
            "type": "string",
            "description": "One of: no-priority, low, medium, high, urgent.",
            "example": "high"
          },
          "startDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start date in UTC. Null when not set.",
            "example": "2026-12-01T09:00:00.000Z"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Due date in UTC. Null when not set.",
            "example": "2026-12-15T17:00:00.000Z"
          },
          "recurrence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskRecurrence"
              },
              {
                "type": "null"
              }
            ],
            "description": "Repeat rule of the task. Null when the task does not repeat."
          },
          "position": {
            "type": [
              "number",
              "null"
            ],
            "description": "Order within its column, ascending.",
            "example": 3
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the task was created, in UTC.",
            "example": "2026-11-28T10:15:00.000Z"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the assignee. Null when the task is unassigned.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "assigneeName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the assignee. Null when the task is unassigned.",
            "example": "Ana Silva"
          },
          "assigneeId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the assignee's user account. Null when the task is unassigned.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "assigneeImage": {
            "type": [
              "string",
              "null"
            ],
            "description": "Avatar image URL of the assignee, such as an uploaded avatar served from `/api/user/avatar/{id}`. Null when unassigned or no image is set.",
            "example": "/api/user/avatar/yodwh0iimi26g59fib7eqzer"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the task belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "isSubtask": {
            "type": "boolean",
            "description": "Whether the task is a subtask of another task. Always false on public boards.",
            "example": false
          },
          "subtaskCounts": {
            "type": "object",
            "properties": {
              "completed": {
                "type": "integer",
                "minimum": 0,
                "description": "Number of those subtasks in a final column of their own project.",
                "example": 2
              },
              "total": {
                "type": "integer",
                "minimum": 0,
                "description": "Number of direct subtasks.",
                "example": 5
              }
            },
            "required": [
              "completed",
              "total"
            ],
            "description": "Direct subtasks in the workspace; completed means a final column in the child project. Public boards count only children in public projects."
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskLabel"
            },
            "description": "Labels on the task that fall on the current related page. Follow `relatedPage` to load the rest."
          },
          "externalLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskExternalLink"
            },
            "description": "External links of the task that fall on the current related page. Follow `relatedPage` to load the rest."
          }
        },
        "required": [
          "id",
          "title",
          "number",
          "description",
          "status",
          "priority",
          "startDate",
          "dueDate",
          "recurrence",
          "position",
          "createdAt",
          "userId",
          "assigneeName",
          "assigneeId",
          "assigneeImage",
          "projectId",
          "subtaskCounts",
          "labels",
          "externalLinks"
        ],
        "description": "A task as shown on a board, with its labels and links."
      },
      "TaskRecurrence": {
        "type": "object",
        "properties": {
          "frequency": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "monthly",
              "yearly"
            ],
            "description": "Unit the rule repeats in: `daily`, `weekly`, `monthly` or `yearly`.",
            "example": "weekly"
          },
          "interval": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99,
            "description": "Repeat every this many days, weeks, months, or years.",
            "example": 1
          },
          "weekdays": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "minItems": 1,
            "maxItems": 7,
            "description": "Weekly rules only: the days to repeat on, 0 for Sunday to 6 for Saturday. Without them, a weekly rule repeats on the due date's weekday.",
            "example": [
              1,
              3
            ]
          },
          "timeZone": {
            "type": "string",
            "description": "IANA time zone used to keep the next due date on the same local day and time.",
            "example": "Europe/Berlin"
          }
        },
        "required": [
          "frequency",
          "interval",
          "timeZone"
        ],
        "description": "When a task with this rule moves into a final column, the next task is created with its dates moved forward by one interval from the completed task's due date."
      },
      "TaskLabel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the label copy on this task.",
            "example": "xmsumno675r2a71rrcz68pin"
          },
          "name": {
            "type": "string",
            "description": "Display name of the label.",
            "example": "Bug"
          },
          "color": {
            "type": "string",
            "description": "Color of the label, usually a color name used by the web app.",
            "example": "purple"
          }
        },
        "required": [
          "id",
          "name",
          "color"
        ],
        "description": "A label on a task."
      },
      "TaskExternalLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the external link.",
            "example": "ghlz1fqn1h9zzgwvcyi4w4xd"
          },
          "taskId": {
            "type": "string",
            "description": "ID of the task the link belongs to.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "integrationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the integration that created the link. Null for a link added by hand.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "resourceType": {
            "type": "string",
            "description": "Kind of linked resource: `url` or `pull_request` for a manual link, or an integration resource such as `issue` or `pull_request`.",
            "example": "pull_request"
          },
          "externalId": {
            "type": "string",
            "description": "The provider's identifier for the resource. For a manual link, the URL, or the pull request number when it can be read from the URL.",
            "example": "481"
          },
          "url": {
            "type": "string",
            "description": "Address of the linked resource.",
            "example": "https://github.com/acme/website/pull/481"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display title of the link. Null when none is stored.",
            "example": "Fix login redirect loop"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {},
            "description": "Provider-specific payload, already parsed from the stored JSON string. On public boards it holds only `state`, `merged` and `draft`.",
            "example": {
              "state": "open",
              "draft": false
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the link was created, in UTC.",
            "example": "2026-11-28T10:20:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the link was last changed, in UTC.",
            "example": "2026-11-29T08:00:00.000Z"
          }
        },
        "required": [
          "id",
          "taskId",
          "integrationId",
          "resourceType",
          "externalId",
          "url",
          "title",
          "metadata",
          "createdAt",
          "updatedAt"
        ],
        "description": "A link from a task to an outside resource."
      },
      "BoardPagination": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Number of tasks matching the filters, on all pages.",
            "example": 137
          },
          "page": {
            "type": "number",
            "description": "Current task page, starting at 1.",
            "example": 1
          },
          "pageSize": {
            "type": "number",
            "description": "Maximum number of tasks per page.",
            "example": 50
          },
          "totalPages": {
            "type": "number",
            "description": "Number of task pages. At least 1.",
            "example": 3
          },
          "relatedPage": {
            "type": "number",
            "description": "Current related page, starting at 1.",
            "example": 1
          },
          "relatedPageSize": {
            "type": "number",
            "description": "Maximum number of labels, links and columns per related page. Always 100.",
            "example": 100
          },
          "relatedTotalPages": {
            "type": "number",
            "description": "Number of related pages for the current task page. At least 1.",
            "example": 1
          },
          "relatedRevision": {
            "type": "string",
            "description": "Public board labels and external links revision for this task page. Restart pagination if it changes during related-page continuations. Present only on public boards."
          },
          "revision": {
            "type": "string",
            "description": "Public board content, membership and ordering revision, including related records and visible subtask progress. Restart pagination if it changes between task or related pages. Present only on public boards."
          }
        },
        "required": [
          "total",
          "page",
          "pageSize",
          "totalPages",
          "relatedPage",
          "relatedPageSize",
          "relatedTotalPages"
        ],
        "description": "Always paginated: 50 tasks by default, at most 100 per page. Continue through totalPages to retrieve all tasks. For each task page, follow relatedPage through relatedTotalPages to retrieve all labels, external links and columns (100 related rows per kind per request, plus up to 100 columns needed to represent the tasks)."
      },
      "Board": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the project.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "name": {
            "type": "string",
            "description": "Name of the project.",
            "example": "Website"
          },
          "slug": {
            "type": "string",
            "description": "Project key used in ticket IDs such as KAN-12.",
            "example": "KAN"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Icon name of the project. Null when none is set.",
            "example": "Layout"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Project description. Null when there is none, or when `descriptionDeferred` is true.",
            "example": "Marketing site and docs."
          },
          "descriptionDeferred": {
            "type": "boolean",
            "description": "True when a project description above 64 KiB is omitted; use project detail or public project description pages for full text.",
            "example": false
          },
          "isPublic": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the project has a public board.",
            "example": false
          },
          "includeSubtasks": {
            "type": "boolean",
            "description": "Project setting for whether task views show subtasks by default.",
            "example": true
          },
          "workspaceId": {
            "type": "string",
            "description": "ID of the workspace that owns the project.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          },
          "backgroundVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Version token of the project's background image. Null when the project has no background.",
            "example": "1764583200000"
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoardColumn"
            },
            "description": "Columns of the project in board order, each with this page's tasks. Columns are paginated with `relatedPage`, but every column that holds a task on this page is included."
          },
          "archivedTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoardTask"
            },
            "description": "Tasks on this page with the status `archived`."
          },
          "plannedTasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoardTask"
            },
            "description": "Tasks on this page with the status `planned`."
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "icon",
          "description",
          "isPublic",
          "workspaceId",
          "backgroundVersion",
          "columns",
          "archivedTasks",
          "plannedTasks"
        ],
        "description": "A project's board for one page of tasks."
      },
      "TaskDescriptionPage": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string",
            "description": "Up to 32,768 Unicode characters of the description, starting at the requested offset.",
            "example": "Users are sent back to the login page after signing in."
          },
          "version": {
            "type": "string",
            "description": "Opaque version of the record holding the description, which changes whenever that record is updated. Pass it as `version` on later pages to detect edits.",
            "example": "48213"
          },
          "nextOffset": {
            "type": [
              "number",
              "null"
            ],
            "description": "Offset of the next page. Null when this page reaches the end.",
            "example": 32768
          }
        },
        "required": [
          "content",
          "version",
          "nextOffset"
        ],
        "description": "One page of a long description."
      },
      "QuillsIntegrationSummary": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Integration ID.",
            "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
          },
          "integrationType": {
            "type": "string",
            "description": "Provider key from the integration catalog, such as `github`, `slack`, `azure_devops` or `zapier`. A workspace has at most one connection per provider.",
            "example": "github"
          },
          "status": {
            "type": "string",
            "description": "Connection state. `active`: sends deliveries and accepts the provider's signed webhooks. `paused`: sends and accepts nothing (set by a teammate, or on an archive import).",
            "example": "active"
          },
          "workspaceName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the connected provider account, such as the Slack workspace or Freshdesk help desk name. Webhook-URL providers use the provider name. Null when none was recorded.",
            "example": "Acme Corp"
          },
          "account": {
            "type": [
              "string",
              "null"
            ],
            "description": "Non-secret label of the connected account, such as the webhook host, the Freshdesk help desk host or the provider login. Null when the provider has none.",
            "example": "acme-corp"
          },
          "connectedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the current installation was connected (ISO 8601, UTC). A reconnect sets a new time and starts a new installation. Null when the connection was never completed.",
            "example": "2026-11-30T14:05:00.000Z"
          }
        },
        "required": [
          "id",
          "integrationType",
          "status",
          "workspaceName",
          "account",
          "connectedAt"
        ],
        "description": "The connection, without its tokens. Null when `status` is `already_used`."
      },
      "QuillsPublicHelpCenterCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Category ID",
            "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
          },
          "urlId": {
            "type": "number",
            "description": "Public numeric ID in help-center URLs. It never changes.",
            "example": 12
          },
          "slug": {
            "type": "string",
            "description": "URL slug of the category",
            "example": "billing"
          },
          "name": {
            "type": "string",
            "description": "Category name in the response locale",
            "example": "Billing"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Category description in the response locale; null when empty",
            "example": "Invoices, payment methods and plan changes"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Icon shown with the category, as stored; null when not set"
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null at the top level and when the parent is not public",
            "example": null
          },
          "articleCount": {
            "type": "number",
            "description": "Public articles here and in public subcategories",
            "example": 9
          },
          "path": {
            "type": "string",
            "description": "Help-center path of the collection page in the response locale",
            "example": "/hc/en/collections/12-billing"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the category was last changed",
            "example": "2026-11-20T09:15:42.000Z"
          }
        },
        "required": [
          "id",
          "urlId",
          "slug",
          "name",
          "description",
          "icon",
          "parentId",
          "articleCount",
          "path",
          "updatedAt"
        ]
      },
      "QuillsPublicHelpCenterArticleSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Article ID",
            "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
          },
          "urlId": {
            "type": "number",
            "description": "Public numeric ID in help-center URLs. It never changes.",
            "example": 42
          },
          "slug": {
            "type": "string",
            "description": "URL slug of the article",
            "example": "reset-your-password"
          },
          "title": {
            "type": "string",
            "description": "Title in the response locale",
            "example": "Reset your password"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short summary in the response locale; null when empty",
            "example": "Get back into your account in two minutes"
          },
          "path": {
            "type": "string",
            "description": "Help-center path of the article page in the response locale",
            "example": "/hc/en/articles/42-reset-your-password"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the article was published",
            "example": "2026-11-19T10:00:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the article was last changed; in another locale, when its translation was last changed",
            "example": "2026-11-20T09:15:42.000Z"
          },
          "author": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Display name of the teammate who wrote the article",
                "example": "Ada Park"
              },
              "avatarUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Avatar image URL; null when the author has none",
                "example": "https://example.com/avatars/ada.png"
              }
            },
            "required": [
              "name",
              "avatarUrl"
            ],
            "description": "The teammate who wrote the article, by name only; null when unknown or not a teammate"
          },
          "category": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Category ID",
                "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
              },
              "urlId": {
                "type": "number",
                "description": "Public numeric ID of the category in help-center URLs",
                "example": 12
              },
              "slug": {
                "type": "string",
                "description": "URL slug of the category",
                "example": "account"
              },
              "name": {
                "type": "string",
                "description": "Category name in the response locale, or the default name when it has no translation",
                "example": "Account"
              }
            },
            "required": [
              "id",
              "urlId",
              "slug",
              "name"
            ],
            "description": "The category the article is filed in"
          }
        },
        "required": [
          "id",
          "urlId",
          "slug",
          "title",
          "description",
          "path",
          "publishedAt",
          "updatedAt",
          "author",
          "category"
        ]
      },
      "QuillsPublicHelpCenterArticle": {
        "allOf": [
          {
            "$ref": "#/components/schemas/QuillsPublicHelpCenterArticleSummary"
          },
          {
            "type": "object",
            "properties": {
              "content": {
                "type": "string",
                "description": "Markdown body in the response locale",
                "example": "## Steps\n\n1. Open **Sign in**.\n2. Choose **Forgot password**."
              }
            },
            "required": [
              "content"
            ]
          }
        ]
      },
      "QuillsPublicHelpCenterSearchHit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Article ID",
            "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
          },
          "urlId": {
            "type": "number",
            "description": "Public numeric ID of the article in help-center URLs",
            "example": 42
          },
          "slug": {
            "type": "string",
            "description": "URL slug of the article",
            "example": "reset-your-password"
          },
          "title": {
            "type": "string",
            "description": "Title in the response locale",
            "example": "Reset your password"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short summary in the response locale; null when empty",
            "example": "Get back into your account in two minutes"
          },
          "snippet": {
            "type": "string",
            "description": "The first 200 characters of the Markdown body",
            "example": "## Steps\n\n1. Open **Sign in**."
          },
          "path": {
            "type": "string",
            "description": "Help-center path of the article page in the response locale",
            "example": "/hc/en/articles/42-reset-your-password"
          },
          "category": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Category ID",
                "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
              },
              "slug": {
                "type": "string",
                "description": "URL slug of the category",
                "example": "account"
              },
              "name": {
                "type": "string",
                "description": "Category name in the response locale, or the default name when it has no translation",
                "example": "Account"
              }
            },
            "required": [
              "id",
              "slug",
              "name"
            ],
            "description": "The category the article is filed in"
          }
        },
        "required": [
          "id",
          "urlId",
          "slug",
          "title",
          "description",
          "snippet",
          "path",
          "category"
        ]
      },
      "QuillsPublicStatusIncident": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Incident or maintenance window ID",
            "example": "status_incident_01jd3e28jt97kb6cq643dzvmxx"
          },
          "kind": {
            "type": "string",
            "enum": [
              "incident",
              "maintenance"
            ],
            "description": "Item type. `incident`: an unplanned problem. `maintenance`: a planned maintenance window."
          },
          "title": {
            "type": "string",
            "description": "Title shown on the status page",
            "example": "Elevated error rates on the API"
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved",
              "scheduled",
              "in_progress",
              "verifying",
              "completed"
            ],
            "description": "Current lifecycle status. Incidents: `investigating`, `identified`, `monitoring`, `resolved`. Maintenance windows: `scheduled`, `in_progress`, `verifying`, `completed`."
          },
          "impact": {
            "type": "string",
            "enum": [
              "none",
              "minor",
              "major",
              "critical",
              "maintenance"
            ],
            "description": "Impact shown to this viewer: `none`, `minor`, `major`, `critical`, or `maintenance` for maintenance windows. When some affected components are hidden from the viewer, it derives from the visible ones and is never higher than the stored impact."
          },
          "scheduledStartAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Planned start of the maintenance window, in ISO 8601 UTC. Null when no planned start is set.",
            "example": "2026-11-20T02:00:00.000Z"
          },
          "scheduledEndAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Planned end of the maintenance window, in ISO 8601 UTC. Null when no planned end is set.",
            "example": "2026-11-20T04:00:00.000Z"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the incident started or the window began, in ISO 8601 UTC. A window that has not started holds its planned start here.",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the incident was resolved or the window completed, in ISO 8601 UTC. Null while it is open.",
            "example": "2026-11-18T16:05:41.000Z"
          },
          "affectedComponents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Component ID",
                  "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                },
                "name": {
                  "type": "string",
                  "description": "Component name",
                  "example": "API"
                },
                "componentStatus": {
                  "type": "string",
                  "enum": [
                    "operational",
                    "under_maintenance",
                    "degraded_performance",
                    "partial_outage",
                    "major_outage"
                  ],
                  "description": "Status the item holds the component at while the incident is open or the window runs: `operational`, `under_maintenance`, `degraded_performance`, `partial_outage` or `major_outage`"
                }
              },
              "required": [
                "id",
                "name",
                "componentStatus"
              ]
            },
            "description": "Affected components the viewer can see, in page order. Never empty: an item with no visible component is not shown."
          },
          "updates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Timeline update ID",
                  "example": "status_update_01jd3ee0zbgj09tqm83xssss6y"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "investigating",
                    "identified",
                    "monitoring",
                    "resolved",
                    "scheduled",
                    "in_progress",
                    "verifying",
                    "completed"
                  ],
                  "description": "Lifecycle status that this update set"
                },
                "body": {
                  "type": "string",
                  "description": "Update text",
                  "example": "We identified a faulty deploy and are rolling it back."
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the update was posted, in ISO 8601 UTC",
                  "example": "2026-11-18T14:48:12.000Z"
                }
              },
              "required": [
                "id",
                "status",
                "body",
                "createdAt"
              ]
            },
            "description": "Timeline updates, oldest first"
          }
        },
        "required": [
          "id",
          "kind",
          "title",
          "status",
          "impact",
          "scheduledStartAt",
          "scheduledEndAt",
          "startedAt",
          "resolvedAt",
          "affectedComponents",
          "updates"
        ]
      },
      "QuillsCustomerSurvey": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Survey ID",
            "example": "survey_01m8rxmftrfzvv1wbzjbvzvrhy"
          },
          "type": {
            "type": "string",
            "enum": [
              "nps",
              "csat",
              "ces",
              "pmf",
              "poll",
              "open"
            ],
            "description": "Survey kind: nps (score 0-10), csat (score 1-5), ces (score 1-7), pmf (product-market fit, one of the options), poll (one of the options) or open (a written answer)",
            "example": "nps"
          },
          "question": {
            "type": "string",
            "description": "Question to show",
            "example": "How likely are you to recommend us to a friend?"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Answers to choose from for pmf and poll surveys",
            "example": [
              "Very disappointed",
              "Somewhat disappointed",
              "Not disappointed"
            ]
          },
          "scale": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "min": {
                "type": "number",
                "description": "Lowest allowed score",
                "example": 0
              },
              "max": {
                "type": "number",
                "description": "Highest allowed score",
                "example": 10
              }
            },
            "required": [
              "min",
              "max"
            ],
            "description": "The score scale; null for pmf, poll and open"
          }
        },
        "required": [
          "id",
          "type",
          "question",
          "options",
          "scale"
        ],
        "description": "The survey to show. Null: none waits for the caller."
      },
      "Config": {
        "type": "object",
        "properties": {
          "isCloud": {
            "type": "boolean",
            "description": "Whether the server runs as the hosted cloud service. Cloud-only features, such as billing, depend on it.",
            "example": false
          },
          "instanceName": {
            "type": "string",
            "description": "Name shown in page titles and emails. Defaults to albus.",
            "example": "Acme Projects"
          },
          "disableRegistration": {
            "type": "boolean",
            "description": "Whether open registration is turned off. When true, only people with a valid invitation can create an account.",
            "example": false
          },
          "disablePasswordRegistration": {
            "type": "boolean",
            "description": "Whether new accounts can't sign up with a password. When true, new accounts must use a social or OIDC provider.",
            "example": false
          },
          "disableEmailOtpSignIn": {
            "type": "boolean",
            "description": "Whether sign-in with a one-time code sent by email is turned off.",
            "example": false
          },
          "disableWorkspaceCreation": {
            "type": "boolean",
            "description": "Whether workspace creation is restricted. When true, only instance admins can create workspaces.",
            "example": false
          },
          "disabledIntegrations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Integration provider types an administrator turned off, such as `slack`.",
            "example": [
              "slack"
            ]
          },
          "isDemoMode": {
            "type": "boolean",
            "description": "Whether demo mode is turned on for this server.",
            "example": false
          },
          "hasSmtp": {
            "type": "boolean",
            "description": "Whether email delivery is configured, so invitations, sign-in codes and password reset emails can be sent.",
            "example": true
          },
          "hasImageUploads": {
            "type": "boolean",
            "description": "Whether S3-compatible storage is configured, so task images and board backgrounds can be uploaded.",
            "example": true
          },
          "hasGithubSignIn": {
            "type": "boolean",
            "description": "Whether sign-in with GitHub is configured.",
            "example": true
          },
          "hasGoogleSignIn": {
            "type": "boolean",
            "description": "Whether sign-in with Google is configured.",
            "example": false
          },
          "hasDiscordSignIn": {
            "type": "boolean",
            "description": "Whether sign-in with Discord is configured.",
            "example": false
          },
          "hasCustomOAuth": {
            "type": "boolean",
            "description": "Whether a custom OAuth/OIDC provider is configured for sign-in.",
            "example": false
          },
          "hasGuestAccess": {
            "type": "boolean",
            "description": "Whether people can sign in as a guest without an account. False when guest access or the login form is turned off, or when open or password registration is turned off.",
            "example": false
          },
          "disableLoginForm": {
            "type": "boolean",
            "description": "Whether local sign-in (password, email code and password reset) is turned off. When true, people must use a social or OIDC provider.",
            "example": false
          },
          "customOAuthName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Label for the custom OAuth provider on the sign-in page. Null means the generic SSO label.",
            "example": "Acme SSO"
          },
          "customOAuthAutoLogin": {
            "type": "boolean",
            "description": "Whether the sign-in page sends people straight to the custom OAuth/OIDC provider when one is configured.",
            "example": false
          },
          "customOAuthLogoutUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Logout URL of the custom OAuth/OIDC provider. The web app sends people there after they sign out, with the id_token as `id_token_hint` when one is stored. Null when not configured.",
            "example": "https://sso.example.com/logout"
          },
          "customOAuthManagedProfileFields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "name",
                "image",
                "locale"
              ]
            },
            "description": "Profile fields the custom OAuth/OIDC provider manages for people with a linked provider account.",
            "example": [
              "name",
              "image"
            ]
          },
          "customOAuthAccountUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Account page of the custom OAuth/OIDC provider, where people change managed profile fields. Null when not configured.",
            "example": "https://sso.example.com/account"
          },
          "billingEnabled": {
            "type": "boolean",
            "description": "Whether billing is available. Only possible on the hosted cloud service with a payment provider configured.",
            "example": false
          }
        },
        "required": [
          "isCloud",
          "instanceName",
          "disableRegistration",
          "disablePasswordRegistration",
          "disableEmailOtpSignIn",
          "disableWorkspaceCreation",
          "disabledIntegrations",
          "isDemoMode",
          "hasSmtp",
          "hasImageUploads",
          "hasGithubSignIn",
          "hasGoogleSignIn",
          "hasDiscordSignIn",
          "hasCustomOAuth",
          "hasGuestAccess",
          "disableLoginForm",
          "customOAuthName",
          "customOAuthAutoLogin",
          "customOAuthLogoutUrl",
          "customOAuthManagedProfileFields",
          "customOAuthAccountUrl",
          "billingEnabled"
        ],
        "description": "Public settings of the server: its name and which sign-in methods, registration paths, integrations and features are enabled."
      },
      "McpClientRegistration": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string",
            "description": "ID of the registered client, a UUID. Registrations expire after 30 days; register again when authorization fails with `invalid_client`.",
            "example": "3f6c2a9e-8b1d-4c7a-9e2f-5d4b6a1c0e93"
          },
          "client_id_issued_at": {
            "type": "number",
            "description": "Time the client was registered, in seconds since the Unix epoch.",
            "example": 1795689720
          },
          "redirect_uris": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Redirect URIs registered for the client.",
            "example": [
              "http://127.0.0.1:33418/callback"
            ]
          },
          "client_name": {
            "type": "string",
            "description": "Name given at registration. Absent when none was given.",
            "example": "Example MCP Client"
          },
          "token_endpoint_auth_method": {
            "type": "string",
            "enum": [
              "none"
            ],
            "description": "Always `none`: the client is public and holds no secret.",
            "example": "none"
          },
          "grant_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "authorization_code"
              ]
            },
            "description": "Always `[\"authorization_code\"]`.",
            "example": [
              "authorization_code"
            ]
          },
          "response_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "code"
              ]
            },
            "description": "Always `[\"code\"]`.",
            "example": [
              "code"
            ]
          }
        },
        "required": [
          "client_id",
          "client_id_issued_at",
          "redirect_uris",
          "token_endpoint_auth_method",
          "grant_types",
          "response_types"
        ],
        "description": "A public OAuth client registered for the MCP endpoint."
      },
      "OAuthError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "OAuth error code, such as `invalid_request`, `invalid_client_metadata`, `invalid_redirect_uri`, `invalid_client`, `invalid_or_expired_request`, `invalid_origin`, `unauthorized` or `temporarily_unavailable`.",
            "example": "invalid_request"
          },
          "error_description": {
            "type": "string",
            "description": "Human-readable detail, such as the field that failed validation. Absent for most errors.",
            "example": "redirect_uri: Invalid redirect URI"
          }
        },
        "required": [
          "error"
        ],
        "description": "An OAuth error in the RFC 6749 and RFC 7591 format."
      },
      "McpAuthorizationRequest": {
        "type": "object",
        "properties": {
          "client_name": {
            "type": "string",
            "description": "Name the client registered with, or `MCP client` when it gave none.",
            "example": "Example MCP Client"
          },
          "redirect_uri": {
            "type": "string",
            "description": "Redirect URI the browser is sent back to after the decision.",
            "example": "http://127.0.0.1:33418/callback"
          }
        },
        "required": [
          "client_name",
          "redirect_uri"
        ],
        "description": "A pending MCP authorization request awaiting the user's consent."
      },
      "McpAuthorizationDecision": {
        "type": "object",
        "properties": {
          "redirect": {
            "type": "string",
            "description": "Where to send the browser next: back to the client with a code on approval, or with an error on denial.",
            "example": "http://127.0.0.1:33418/callback?code=5b9e2c7d-1f4a-4e6b-8c3d-2a7f9e0b1c4d&state=af0ifjsldkj"
          }
        },
        "required": [
          "redirect"
        ],
        "description": "The result of approving or denying an MCP authorization request."
      },
      "OAuthIdToken": {
        "type": "object",
        "properties": {
          "idToken": {
            "type": [
              "string",
              "null"
            ],
            "description": "The id_token the custom OAuth/OIDC provider issued, as stored on the user's linked account. It is returned as stored and may have expired. Null when the user has no linked custom OAuth account or no id_token was stored.",
            "example": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJleGFtcGxlIn0.c2lnbmF0dXJl"
          }
        },
        "required": [
          "idToken"
        ],
        "description": "The id_token of the current user's linked custom OAuth/OIDC account."
      },
      "MovedProject": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Project"
          },
          {
            "type": "object",
            "properties": {
              "unassignedTaskCount": {
                "type": "number",
                "description": "Number of tasks whose assignee was removed because they are not a member of the destination workspace or cannot access the project there.",
                "example": 3
              }
            },
            "required": [
              "unassignedTaskCount"
            ]
          }
        ],
        "description": "A project after it was moved to another workspace."
      },
      "Project": {
        "type": "object",
        "properties": {
          "includeSubtasks": {
            "type": "boolean",
            "description": "Whether task views show subtasks by default.",
            "example": true
          },
          "id": {
            "type": "string",
            "description": "ID of the project.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "workspaceId": {
            "type": "string",
            "description": "ID of the workspace that owns the project.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          },
          "backgroundVersion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Version token of the project's board background image. It changes with every new background. Null when the project has no background.",
            "example": "tz4a98xxat96iws9zmbrgj3a"
          },
          "slug": {
            "type": "string",
            "description": "Project key, used as the prefix of the project's task identifiers such as `WEB-12`. Unique within the workspace, ignoring case.",
            "example": "WEB"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Icon name of the project, usually a Lucide icon name used by the web app. Null when none is set.",
            "example": "Rocket"
          },
          "name": {
            "type": "string",
            "description": "Display name of the project.",
            "example": "Website"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of the project. Null when none has been set.",
            "example": "Marketing site and docs."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the project was created, in UTC.",
            "example": "2026-09-14T08:30:00.000Z"
          },
          "isPublic": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the project's board can be read without signing in, via `/public-project/{id}`. Null is treated as false.",
            "example": false
          },
          "archivedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time the project was archived, in UTC. Null when the project is not archived. Archived projects are left out of the project list unless `includeArchived` is `true`.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "position": {
            "type": "number",
            "description": "Sidebar order of the project within its workspace, ascending from 0.",
            "example": 2
          },
          "lastTaskNumber": {
            "type": "number",
            "description": "Highest task number issued in this project; the next task gets this plus one.",
            "example": 41
          }
        },
        "required": [
          "id",
          "workspaceId",
          "backgroundVersion",
          "slug",
          "icon",
          "name",
          "description",
          "createdAt",
          "isPublic",
          "archivedAt",
          "position",
          "lastTaskNumber"
        ],
        "description": "A project in a workspace. It holds tasks on a board of columns, and its key prefixes its task identifiers."
      },
      "ProjectListItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Project"
          },
          {
            "type": "object",
            "properties": {
              "statistics": {
                "$ref": "#/components/schemas/ProjectStatistics"
              },
              "archivedTasks": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BoardTask"
                },
                "description": "Always an empty array, kept for compatibility. Load the board with `GET /task/tasks/{projectId}`."
              },
              "plannedTasks": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BoardTask"
                },
                "description": "Always an empty array, kept for compatibility. Load the board with `GET /task/tasks/{projectId}`."
              },
              "columns": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BoardColumn"
                },
                "description": "Always an empty array, kept for compatibility. Load the columns with `GET /column/{projectId}`."
              }
            },
            "required": [
              "statistics",
              "archivedTasks",
              "plannedTasks",
              "columns"
            ]
          }
        ],
        "description": "A project with its task statistics, as listed in a workspace."
      },
      "ProjectStatistics": {
        "type": "object",
        "properties": {
          "completionPercentage": {
            "type": "number",
            "description": "Share of the project's tasks with the status `done` or `archived`, as a whole-number percentage from 0 to 100. 0 when the project has no tasks.",
            "example": 62
          },
          "totalTasks": {
            "type": "number",
            "description": "Number of tasks in the project, of every status.",
            "example": 37
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Earliest due date among all of the project's tasks, completed ones included, in UTC. Null when no task has a due date.",
            "example": "2026-12-05T00:00:00.000Z"
          }
        },
        "required": [
          "completionPercentage",
          "totalTasks",
          "dueDate"
        ],
        "description": "Task totals for a project."
      },
      "ProjectBackgroundUpload": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Storage key the image is uploaded to. Pass it to the finalize request.",
            "example": "workspace/cfklow33tpuxgpxko9nxqllg/project/cef5d6uaajgxwpe38vkp4khl/backgrounds/background-tz4a98xxat96iws9zmbrgj3a"
          },
          "uploadUrl": {
            "type": "string",
            "description": "Presigned URL to upload the image to with an HTTP PUT request. It expires after the server's presign lifetime, 300 seconds by default.",
            "example": "https://storage.example.com/uploads/workspace/cfklow33tpuxgpxko9nxqllg/project/cef5d6uaajgxwpe38vkp4khl/backgrounds/background-tz4a98xxat96iws9zmbrgj3a?X-Amz-Signature=fake-signature"
          },
          "version": {
            "type": "string",
            "description": "Version token of the new background. Pass it to the finalize request.",
            "example": "tz4a98xxat96iws9zmbrgj3a"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Headers to send with the PUT request, such as `Content-Type` set to the requested MIME type.",
            "example": {
              "Content-Type": "image/png"
            }
          }
        },
        "required": [
          "key",
          "uploadUrl",
          "version",
          "headers"
        ],
        "description": "A presigned upload for a project background image. Upload the image with PUT, then call the finalize endpoint to use it."
      },
      "ProjectBackgroundFinalize": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "URL of the background image on the API. Its `v` query parameter is the background version, so the URL changes with every new background.",
            "example": "https://api.example.com/project/cef5d6uaajgxwpe38vkp4khl/background?v=tz4a98xxat96iws9zmbrgj3a"
          }
        },
        "required": [
          "url"
        ],
        "description": "The saved project background."
      },
      "CalendarFeed": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the calendar feed.",
            "example": "a1r8s4knxim5waz846getzip"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the feed belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "token": {
            "type": "string",
            "description": "Secret token of the feed, 64 lowercase hexadecimal characters. Subscribe at `/calendar-feed/{token}/calendar.ics`. Anyone with the token can read the feed, so treat it like a password; revoke the feed to stop access.",
            "example": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
          },
          "labelIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the workspace labels the feed filters by. Tasks with a label of the same name as any of them are included, so renaming a label keeps the feed working. Empty when the feed includes every scheduled task. If all of these labels are deleted, the feed has no events.",
            "example": [
              "xmsumno675r2a71rrcz68pin"
            ]
          },
          "timeZone": {
            "type": "string",
            "description": "IANA time zone used to compute the calendar days of the feed's all-day events.",
            "example": "America/New_York"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the feed was created, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "token",
          "labelIds",
          "timeZone",
          "createdAt"
        ],
        "description": "A secret iCalendar subscription link for a project's scheduled tasks."
      },
      "TaskDescriptionMatches": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of matching tasks, sorted by ID. At most 100 per page.",
            "example": [
              "bkh59p9dpz3efjy7e59v55jd"
            ]
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cursor to pass as `after` for the next page. Null when there are no more matches.",
            "example": null
          }
        },
        "required": [
          "ids",
          "nextCursor"
        ],
        "description": "One page of tasks whose omitted descriptions match a search."
      },
      "AssignedTasks": {
        "type": "object",
        "properties": {
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssignedTask"
            },
            "description": "Up to 100 open tasks, by due date (undated last), then priority. Empty when `countOnly` is true."
          },
          "total": {
            "type": "number",
            "description": "All open tasks assigned to the caller, including any beyond the first 100 returned.",
            "example": 7
          }
        },
        "required": [
          "tasks",
          "total"
        ],
        "description": "The caller's open assigned tasks in a workspace."
      },
      "AssignedTask": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the task.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the task belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "number": {
            "type": [
              "number",
              "null"
            ],
            "description": "Per-project counter shown as {projectSlug}-{number}.",
            "example": 12
          },
          "title": {
            "type": "string",
            "description": "Title of the task.",
            "example": "Fix login redirect loop"
          },
          "status": {
            "type": "string",
            "description": "The slug of the column the task sits in, or `planned`.",
            "example": "in-progress"
          },
          "statusName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The column's display name. Null for tasks outside a column, such as planned ones.",
            "example": "In progress"
          },
          "statusIcon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Icon name of the task's column. Null when the column has no icon or the task is outside a column.",
            "example": "Timer"
          },
          "priority": {
            "type": "string",
            "description": "One of: no-priority, low, medium, high, urgent.",
            "example": "high"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Due date in UTC. Null when not set.",
            "example": "2026-12-15T17:00:00.000Z"
          },
          "projectName": {
            "type": "string",
            "description": "Name of the task's project.",
            "example": "Website"
          },
          "projectSlug": {
            "type": "string",
            "description": "Project key used in ticket IDs.",
            "example": "KAN"
          },
          "projectIcon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Icon name of the project. Null when none is set.",
            "example": "Layout"
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskLabel"
            },
            "description": "Labels on the task, sorted by name."
          }
        },
        "required": [
          "id",
          "projectId",
          "number",
          "title",
          "status",
          "statusName",
          "statusIcon",
          "priority",
          "dueDate",
          "projectName",
          "projectSlug",
          "projectIcon",
          "labels"
        ],
        "description": "An open task assigned to the caller."
      },
      "BoardResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Board"
          },
          "pagination": {
            "$ref": "#/components/schemas/BoardPagination"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "description": "One page of a project board and its pagination state."
      },
      "BulkTaskResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Always true on success.",
            "example": true
          },
          "updatedCount": {
            "type": "number",
            "description": "Number of tasks the operation applied to. For `addLabel`, tasks that already had a label with that name are not counted; for `removeLabel`, the number of label copies removed.",
            "example": 2
          }
        },
        "required": [
          "success",
          "updatedCount"
        ],
        "description": "Outcome of a bulk task operation."
      },
      "TaskImageUpload": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Object key to send back to the finalize route.",
            "example": "workspace/cfklow33tpuxgpxko9nxqllg/project/cef5d6uaajgxwpe38vkp4khl/task/bkh59p9dpz3efjy7e59v55jd/descriptions/screenshot-1764583200000-yodwh0iimi26g59fib7eqzer.png"
          },
          "uploadUrl": {
            "type": "string",
            "description": "Presigned URL to PUT the file bytes to. It expires after a short time (5 minutes by default).",
            "example": "https://storage.example.com/workspace/cfklow33tpuxgpxko9nxqllg/project/cef5d6uaajgxwpe38vkp4khl/task/bkh59p9dpz3efjy7e59v55jd/descriptions/screenshot-1764583200000-yodwh0iimi26g59fib7eqzer.png?X-Amz-Signature=..."
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Headers that must accompany the upload request, including Content-Type.",
            "example": {
              "Content-Type": "image/png"
            }
          }
        },
        "required": [
          "key",
          "uploadUrl",
          "headers"
        ],
        "description": "A presigned URL for uploading one file to storage."
      },
      "TaskImageAsset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the stored asset.",
            "example": "yodwh0iimi26g59fib7eqzer"
          },
          "url": {
            "type": "string",
            "description": "Absolute URL the stored file is served from, `{API base URL}/asset/{id}`. Reference it in the description or comment; reading it requires access to the project unless the project is public.",
            "example": "https://app.example.com/api/asset/yodwh0iimi26g59fib7eqzer"
          }
        },
        "required": [
          "id",
          "url"
        ],
        "description": "A file stored for a task, such as an image in its description."
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the task.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the task belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "position": {
            "type": [
              "number",
              "null"
            ],
            "description": "Order within its column, ascending.",
            "example": 3
          },
          "number": {
            "type": [
              "number",
              "null"
            ],
            "description": "Per-project counter shown as {projectSlug}-{number}.",
            "example": 12
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the assignee. Null when the task is unassigned.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "title": {
            "type": "string",
            "description": "Title of the task.",
            "example": "Fix login redirect loop"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description in Markdown. Null when the task has no stored description, or when `descriptionDeferred` is true.",
            "example": "Users are sent back to the login page after signing in."
          },
          "descriptionDeferred": {
            "type": "boolean",
            "description": "True when the list omits a large description; load the task detail or description pages to read it. Do not replace stored text with this null summary.",
            "example": false
          },
          "status": {
            "type": "string",
            "description": "The slug of the column the task sits in, or `planned` or `archived`.",
            "example": "in-progress"
          },
          "priority": {
            "type": "string",
            "description": "One of: no-priority, low, medium, high, urgent.",
            "example": "high"
          },
          "startDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start date in UTC. Null when not set.",
            "example": "2026-12-01T09:00:00.000Z"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Due date in UTC. Null when not set.",
            "example": "2026-12-15T17:00:00.000Z"
          },
          "recurrence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaskRecurrence"
              },
              {
                "type": "null"
              }
            ],
            "description": "Repeat rule of the task. Null or absent when the task does not repeat."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the task was created, in UTC.",
            "example": "2026-11-28T10:15:00.000Z"
          },
          "customFields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fieldId": {
                  "type": "string",
                  "description": "ID of the custom field.",
                  "example": "ga74wz2otc2lghrx19chi8ni"
                },
                "value": {
                  "type": "string",
                  "description": "Stored value as a string, in the field type's format.",
                  "example": "42"
                }
              },
              "required": [
                "fieldId",
                "value"
              ]
            },
            "description": "Custom field values of the task, when the response includes them."
          }
        },
        "required": [
          "id",
          "projectId",
          "position",
          "number",
          "userId",
          "title",
          "description",
          "status",
          "priority",
          "startDate",
          "dueDate",
          "createdAt"
        ],
        "description": "A task in a project."
      },
      "TaskByTicketId": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskWithAssignee"
          },
          {
            "type": "object",
            "properties": {
              "workspaceId": {
                "type": "string",
                "description": "The workspace that owns the task's project.",
                "example": "cfklow33tpuxgpxko9nxqllg"
              }
            },
            "required": [
              "workspaceId"
            ]
          }
        ],
        "description": "A task found by ticket ID, with the workspace that owns it."
      },
      "TaskWithAssignee": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Task"
          },
          {
            "type": "object",
            "properties": {
              "workspaceId": {
                "type": "string",
                "description": "The workspace currently owning the task's project. Included in the detail view; omitted from the compact board view.",
                "example": "cfklow33tpuxgpxko9nxqllg"
              },
              "columnId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The referenced workflow column; null for virtual statuses and legacy tasks without a column reference.",
                "example": "m4e9zz9dn4huwwyxp542ewhm"
              },
              "isSubtask": {
                "type": "boolean",
                "description": "Whether the task is a subtask of another task.",
                "example": false
              },
              "subtaskCounts": {
                "type": "object",
                "properties": {
                  "completed": {
                    "type": "number",
                    "description": "Number of those subtasks in a final column of their own project.",
                    "example": 2
                  },
                  "total": {
                    "type": "number",
                    "description": "Number of direct subtasks.",
                    "example": 5
                  }
                },
                "required": [
                  "completed",
                  "total"
                ],
                "description": "Progress of the task's direct subtasks in the workspace. Included in the board view."
              },
              "parentSubtaskCounts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "taskId": {
                      "type": "string",
                      "description": "ID of a parent task in the same project.",
                      "example": "p15q5mwm4dm31qgfyrygj35y"
                    },
                    "completed": {
                      "type": "number",
                      "description": "Number of those subtasks in a final column of their own project.",
                      "example": 1
                    },
                    "total": {
                      "type": "number",
                      "description": "Number of direct subtasks.",
                      "example": 3
                    }
                  },
                  "required": [
                    "taskId",
                    "completed",
                    "total"
                  ]
                },
                "description": "Subtask progress of each parent of this task that is in the same project. Included in the board view."
              },
              "assigneeName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Display name of the assignee. Null when the task is unassigned.",
                "example": "Ana Silva"
              },
              "assigneeId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ID of the assignee's user account. Null when the task is unassigned.",
                "example": "vpptt8t3d7ft91y45poatb3p"
              }
            },
            "required": [
              "columnId",
              "assigneeName",
              "assigneeId"
            ]
          }
        ],
        "description": "A task with its assignee's name, as returned by the detail and board views."
      },
      "MoveTaskResult": {
        "type": "object",
        "properties": {
          "task": {
            "$ref": "#/components/schemas/Task"
          },
          "sourceProjectId": {
            "type": "string",
            "description": "ID of the project the task was moved out of.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "destinationProjectId": {
            "type": "string",
            "description": "ID of the project the task now belongs to.",
            "example": "p2c7m1q8r4t6w9y3z5a0b2d4"
          }
        },
        "required": [
          "task",
          "sourceProjectId",
          "destinationProjectId"
        ],
        "description": "The moved task and the IDs of both projects."
      },
      "TaskExport": {
        "type": "object",
        "properties": {
          "project": {
            "$ref": "#/components/schemas/TaskExportProject"
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportedTask"
            },
            "description": "All tasks of the project, ordered by position."
          }
        },
        "required": [
          "project",
          "tasks"
        ],
        "description": "A project's tasks as JSON. The `tasks` array can be sent to the import route, which ignores the labels."
      },
      "TaskExportProject": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the project.",
            "example": "Website"
          },
          "slug": {
            "type": "string",
            "description": "Project key used in ticket IDs.",
            "example": "KAN"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Project description. Null when there is none.",
            "example": "Marketing site and docs."
          },
          "exportedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the export was generated, in UTC.",
            "example": "2026-12-01T12:00:00.000Z"
          }
        },
        "required": [
          "name",
          "slug",
          "description",
          "exportedAt"
        ],
        "description": "The exported project."
      },
      "ExportedTask": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Title of the task.",
            "example": "Fix login redirect loop"
          },
          "description": {
            "type": "string",
            "description": "Description in Markdown. Empty when the task has none.",
            "example": "Users are sent back to the login page after signing in."
          },
          "status": {
            "type": "string",
            "description": "Column slug of the task, or `planned` or `archived`.",
            "example": "in-progress"
          },
          "priority": {
            "type": "string",
            "description": "One of: no-priority, low, medium, high, urgent. Exported as `low` when unset.",
            "example": "high"
          },
          "dueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Due date in UTC. Null when not set.",
            "example": "2026-12-15T17:00:00.000Z"
          },
          "startDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Start date in UTC. Null when not set.",
            "example": "2026-12-01T09:00:00.000Z"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the assignee. Null when unassigned.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExportedTaskLabel"
            },
            "description": "Label names and colors, without their ids."
          }
        },
        "required": [
          "title",
          "description",
          "status",
          "priority",
          "dueDate",
          "startDate",
          "userId",
          "labels"
        ],
        "description": "An exported task."
      },
      "ExportedTaskLabel": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name of the label.",
            "example": "Bug"
          },
          "color": {
            "type": "string",
            "description": "Color of the label.",
            "example": "purple"
          }
        },
        "required": [
          "name",
          "color"
        ],
        "description": "A label on an exported task."
      },
      "TaskImportResult": {
        "type": "object",
        "properties": {
          "results": {
            "$ref": "#/components/schemas/TaskImportSummary"
          }
        },
        "required": [
          "results"
        ],
        "description": "Result of a task import."
      },
      "TaskImportSummary": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Number of tasks in the request.",
            "example": 3
          },
          "successful": {
            "type": "number",
            "description": "Number of tasks created.",
            "example": 2
          },
          "failed": {
            "type": "number",
            "description": "Number of tasks that could not be created.",
            "example": 1
          },
          "tasks": {
            "type": "array",
            "items": {},
            "description": "Per-task outcome, in request order. Each entry has `success`. A created task carries the new `task` and any `warnings`; a failed one carries `error` and the submitted `task`."
          }
        },
        "required": [
          "total",
          "successful",
          "failed",
          "tasks"
        ],
        "description": "Counts and per-task outcomes of an import."
      },
      "Column": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the column.",
            "example": "m4e9zz9dn4huwwyxp542ewhm"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the column belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "name": {
            "type": "string",
            "description": "Display name of the column.",
            "example": "In Progress"
          },
          "slug": {
            "type": "string",
            "description": "Identifier of the column within its project, derived from the name when the column is created and kept when it is renamed. Tasks store it as their `status`.",
            "example": "in-progress"
          },
          "position": {
            "type": "number",
            "description": "Board order, ascending. Columns are always returned sorted by it.",
            "example": 1
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Icon name of the column, usually a Lucide icon name used by the web app. Null when none is set.",
            "example": "CircleDot"
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "description": "Color of the column, stored as given. Null when none is set."
          },
          "isFinal": {
            "type": "boolean",
            "description": "Whether the column is a done state. Tasks in a final column count as completed: they get no overdue reminders, and a repeating task that reaches the column creates its next occurrence.",
            "example": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the column was created, in UTC.",
            "example": "2026-09-14T08:30:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the column was last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "name",
          "slug",
          "position",
          "icon",
          "color",
          "isFinal",
          "createdAt",
          "updatedAt"
        ],
        "description": "A board column of a project. A task's `status` is the slug of its column. New projects start with the columns To Do, In Progress, In Review and Done."
      },
      "WorkspaceActivity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the activity.",
            "example": "si3jh727m8v762jwwzngo8cn"
          },
          "type": {
            "type": "string",
            "description": "Kind of activity. One of: `comment`, `task`, `create`, `status_changed`, `priority_changed`, `assignee_changed`, `unassigned`, `due_date_changed`, `title_changed`, `description_changed`. Other values can appear for events recorded by importers and integrations.",
            "example": "status_changed"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the activity was recorded, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "eventData": {
            "description": "Type-specific payload. For `status_changed`, `oldStatus` and `newStatus` are column slugs, and `oldStatusName` and `newStatusName` carry the current column names when they can be resolved."
          },
          "excerpt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Plain-text preview of the stored content, at most 240 characters: the comment body, or the description older system events carry instead of eventData. Null when there is no content.",
            "example": "Deployed to staging, ready for review."
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the user who caused the activity. Null when no user is attached.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "userName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of that user. Null when there is no user.",
            "example": "Ada Lovelace"
          },
          "userImage": {
            "type": [
              "string",
              "null"
            ],
            "description": "Avatar URL of that user. Null when the user has no avatar or there is no user.",
            "example": null
          },
          "externalUserName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the original author of an imported or synced activity. Null for activity by users.",
            "example": null
          },
          "externalUserAvatar": {
            "type": [
              "string",
              "null"
            ],
            "description": "Avatar URL of the original author of an imported or synced activity. Null when unknown.",
            "example": null
          },
          "taskId": {
            "type": "string",
            "description": "ID of the task.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "taskTitle": {
            "type": "string",
            "description": "Current title of the task.",
            "example": "Fix login redirect"
          },
          "taskNumber": {
            "type": [
              "number",
              "null"
            ],
            "description": "Sequential number of the task within its project. The web app shows it after the project slug, as in `WEB-42`. Null when the task has no number.",
            "example": 42
          },
          "projectId": {
            "type": "string",
            "description": "ID of the task's project.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "projectSlug": {
            "type": "string",
            "description": "Short slug of the task's project.",
            "example": "web"
          }
        },
        "required": [
          "id",
          "type",
          "createdAt",
          "excerpt",
          "userId",
          "userName",
          "userImage",
          "externalUserName",
          "externalUserAvatar",
          "taskId",
          "taskTitle",
          "taskNumber",
          "projectId",
          "projectSlug"
        ],
        "description": "A recent task event in a workspace, with the task and project it belongs to and a short excerpt instead of the full content."
      },
      "Activity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the activity. For a comment, this is also the comment ID.",
            "example": "si3jh727m8v762jwwzngo8cn"
          },
          "taskId": {
            "type": "string",
            "description": "ID of the task the activity belongs to.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "type": {
            "type": "string",
            "description": "Kind of activity. One of: `comment`, `task`, `create`, `status_changed`, `priority_changed`, `assignee_changed`, `unassigned`, `due_date_changed`, `title_changed`, `description_changed`. Other values can appear for events recorded by importers and integrations.",
            "example": "comment"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the activity was recorded, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the activity was last changed, in UTC. Differs from createdAt when a comment was edited.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the user who caused the activity. Null when no user is attached, such as for some imported events.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "Comment body for comments, or a free-text message for other events. Null when the event's meaning is in eventData.",
            "example": "Deployed to staging, ready for review."
          },
          "eventData": {
            "description": "Type-specific payload, such as `{ oldStatus, newStatus }` for `status_changed`. Null for plain comments."
          },
          "externalUserName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the original author when the activity was imported from another tool or synced from a connected forge. Null for activity by users.",
            "example": null
          },
          "externalUserAvatar": {
            "type": [
              "string",
              "null"
            ],
            "description": "Avatar URL of the original author of an imported or synced activity. Null when unknown or not imported.",
            "example": null
          },
          "externalSource": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tool the activity was imported from: `planka`, `trello`, `jira`, `plane`, `linear`, `kaneo`, or a connected forge such as `github`. Null for native activity.",
            "example": null
          },
          "externalUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to the original item in the external tool. Null for native activity or when no link is known.",
            "example": null
          }
        },
        "required": [
          "id",
          "taskId",
          "type",
          "createdAt",
          "updatedAt",
          "userId",
          "content",
          "externalUserName",
          "externalUserAvatar",
          "externalSource",
          "externalUrl"
        ],
        "description": "An entry in a task's activity feed: a comment or a system event such as a status change."
      },
      "Comment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the comment, which is the ID of its activity row.",
            "example": "si3jh727m8v762jwwzngo8cn"
          },
          "taskId": {
            "type": "string",
            "description": "ID of the task the comment is on.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "userId": {
            "type": "string",
            "description": "ID of the user who wrote the comment.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "content": {
            "type": "string",
            "description": "Comment body as produced by the editor.",
            "example": "Deployed to staging, ready for review."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the comment was posted, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the comment was last edited, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "user": {
            "$ref": "#/components/schemas/CommentAuthor"
          }
        },
        "required": [
          "id",
          "taskId",
          "userId",
          "content",
          "createdAt",
          "updatedAt",
          "user"
        ],
        "description": "A comment on a task, with its author's name and avatar."
      },
      "CommentAuthor": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Display name of the author.",
            "example": "Ada Lovelace"
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "Avatar URL of the author. Null when none is set.",
            "example": null
          }
        },
        "required": [
          "name",
          "image"
        ],
        "description": "Author of a comment."
      },
      "TimeEntryWithUser": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TimeEntry"
          },
          {
            "type": "object",
            "properties": {
              "userName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Display name of the user who logged the time. Null once that user has been removed.",
                "example": "Ada Lovelace"
              }
            },
            "required": [
              "userName"
            ]
          }
        ],
        "description": "Time logged against a task, with the name of the user who logged it."
      },
      "TimeEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the time entry.",
            "example": "qbbyakioi5zkmz7yj3ldy0g0"
          },
          "taskId": {
            "type": "string",
            "description": "ID of the task the time is logged against.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the user who logged the time. Null once that user has been removed.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Note about the work done. Null when none was given.",
            "example": "Reviewed the login redirect fix"
          },
          "startTime": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the logged time, in UTC.",
            "example": "2026-11-18T09:00:00.000Z"
          },
          "endTime": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "End of the logged time, in UTC. Null while the entry is still running.",
            "example": "2026-11-18T10:30:00.000Z"
          },
          "duration": {
            "type": [
              "number",
              "null"
            ],
            "description": "Elapsed time in whole seconds, computed from startTime and endTime. Null while the entry is still running.",
            "example": 5400
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the entry was created, in UTC.",
            "example": "2026-11-18T09:00:05.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the entry was last changed, in UTC.",
            "example": "2026-11-18T10:30:02.000Z"
          }
        },
        "required": [
          "id",
          "taskId",
          "userId",
          "description",
          "startTime",
          "endTime",
          "duration",
          "createdAt",
          "updatedAt"
        ],
        "description": "Time logged against a task."
      },
      "Label": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the label.",
            "example": "xmsumno675r2a71rrcz68pin"
          },
          "name": {
            "type": "string",
            "description": "Display name of the label.",
            "example": "Bug"
          },
          "color": {
            "type": "string",
            "description": "Color of the label as stored, usually a color name used by the web app.",
            "example": "purple"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the label was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the label was last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          },
          "deletionStartedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time a batched deletion of this label started, in UTC. Null or absent when no deletion is in progress. While it is set, the label cannot be changed or attached to a task.",
            "example": "2026-03-14T09:26:53.589Z"
          },
          "taskId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the task this label is on. Null for a workspace label, which is not on any task and is the template that task copies are made from.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "workspaceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the workspace that owns the label.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "createdAt",
          "updatedAt",
          "taskId",
          "workspaceId"
        ],
        "description": "A label. A workspace label has no task. Attaching a label to a task creates a task copy with the same name and color."
      },
      "PendingLabelDeletion": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Label"
          },
          {
            "type": "object",
            "properties": {
              "pendingDeletion": {
                "type": "boolean",
                "enum": [
                  true
                ],
                "description": "Always `true`. More batches remain, so repeat the same DELETE request."
              }
            },
            "required": [
              "pendingDeletion"
            ]
          }
        ],
        "description": "A label whose deletion has started but has more task copies left to remove."
      },
      "Notification": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the notification.",
            "example": "pgqlv147s375jkb40jpobpnk"
          },
          "userId": {
            "type": "string",
            "description": "ID of the user the notification belongs to.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title given when the notification was created through the API. Null for notifications raised by the server, whose text the client builds from `type` and `eventData`.",
            "example": "Deploy finished"
          },
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "Free-text body. Null for generated notifications, whose text the client renders from type and eventData.",
            "example": "acme/website was deployed to production."
          },
          "type": {
            "type": "string",
            "description": "Kind of notification. The server raises `task_created` (a task assigned to you was created), `workspace_created` (you created a workspace), `task_status_changed` (a task assigned to you changed status), `task_assignee_changed` (you were assigned a task), `time_entry_created` (someone tracked time on a task assigned to you), `due_date_reminder` (a task is due soon), `task_overdue` (a task is past its due date), `task_mention` (you were mentioned in a task or comment) and `task_comment` (someone commented on a task assigned to you). Notifications created through the API carry the type they were given, `info` by default.",
            "example": "task_status_changed"
          },
          "eventData": {
            "description": "Type-specific data, or null. Server-raised task notifications carry `taskTitle` and usually `projectId` and `workspaceId`. `task_status_changed` adds `oldStatus` and `newStatus`, `task_comment` adds `commenterName` and `commentPreview` (the first 160 characters), `task_mention` adds `mentionerName`, reminders add `reminderType`, `leadTimeMinutes` and `dueDate`, and `workspace_created` carries `workspaceName`. In list responses, `projectId` and `workspaceId` of a task notification reflect the task's current project and workspace.",
            "example": {
              "taskTitle": "Fix login redirect",
              "oldStatus": "to-do",
              "newStatus": "in-progress",
              "projectId": "cef5d6uaajgxwpe38vkp4khl",
              "workspaceId": "cfklow33tpuxgpxko9nxqllg"
            }
          },
          "isRead": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the user has marked the notification as read. New notifications start as `false`.",
            "example": false
          },
          "resourceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the task or workspace the notification points at. Null for a user-wide notification.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "resourceType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Kind of resource `resourceId` points at: `task` or `workspace`. Null for a user-wide notification.",
            "example": "task"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the notification was created, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the notification was last changed, in UTC.",
            "example": "2026-11-18T11:05:00.000Z"
          }
        },
        "required": [
          "id",
          "userId",
          "title",
          "content",
          "type",
          "isRead",
          "resourceId",
          "resourceType",
          "createdAt",
          "updatedAt"
        ],
        "description": "An in-app notification for one user. Notifications about a task or workspace are visible only while the user can still read that resource."
      },
      "NotificationBulkResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Always `true` when the request succeeds.",
            "example": true
          }
        },
        "required": [
          "success"
        ],
        "description": "Result of a notification change that returns no record."
      },
      "NotificationPreferences": {
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email address of the current account, where email notifications are sent. Null when the account has no email address.",
            "example": "jane@example.com"
          },
          "emailEnabled": {
            "type": "boolean",
            "description": "Whether email delivery is on globally. `false` until the user turns it on.",
            "example": true
          },
          "ntfyEnabled": {
            "type": "boolean",
            "description": "Whether ntfy delivery is on globally.",
            "example": false
          },
          "ntfyConfigured": {
            "type": "boolean",
            "description": "Whether both an ntfy server URL and topic are stored.",
            "example": false
          },
          "ntfyServerUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base URL of the ntfy server. Null when not set.",
            "example": "https://ntfy.example.com"
          },
          "ntfyTopic": {
            "type": [
              "string",
              "null"
            ],
            "description": "ntfy topic notifications are published to. Null when not set.",
            "example": "team-alerts"
          },
          "ntfyTokenConfigured": {
            "type": "boolean",
            "description": "Whether an ntfy access token is stored.",
            "example": false
          },
          "maskedNtfyToken": {
            "type": [
              "string",
              "null"
            ],
            "description": "Masked preview of the stored ntfy token: the first and last four characters for tokens longer than eight characters, otherwise `••••`. Null when no token is stored.",
            "example": "tk_e…oken"
          },
          "gotifyEnabled": {
            "type": "boolean",
            "description": "Whether Gotify delivery is on globally.",
            "example": false
          },
          "gotifyConfigured": {
            "type": "boolean",
            "description": "Whether both a Gotify server URL and app token are stored.",
            "example": false
          },
          "gotifyServerUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base URL of the Gotify server. Null when not set.",
            "example": "https://gotify.example.com"
          },
          "gotifyTokenConfigured": {
            "type": "boolean",
            "description": "Whether a Gotify app token is stored.",
            "example": false
          },
          "maskedGotifyToken": {
            "type": [
              "string",
              "null"
            ],
            "description": "Masked preview of the stored Gotify token, in the same format as `maskedNtfyToken`. Null when no token is stored.",
            "example": "Aexa…oken"
          },
          "webhookEnabled": {
            "type": "boolean",
            "description": "Whether webhook delivery is on globally.",
            "example": false
          },
          "webhookConfigured": {
            "type": "boolean",
            "description": "Whether a webhook URL is stored.",
            "example": false
          },
          "webhookUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Endpoint that receives a JSON POST for each delivered notification. Null when not set.",
            "example": "https://hooks.example.com/notifications"
          },
          "webhookSecretConfigured": {
            "type": "boolean",
            "description": "Whether a webhook signing secret is stored. When it is, webhook requests carry an HMAC-SHA256 signature header.",
            "example": false
          },
          "maskedWebhookSecret": {
            "type": [
              "string",
              "null"
            ],
            "description": "Masked preview of the stored webhook secret, in the same format as `maskedNtfyToken`. Null when no secret is stored.",
            "example": "whse…cret"
          },
          "taskAssignmentEnabled": {
            "type": "boolean",
            "description": "Whether notifications are created when the user is assigned a task or a task assigned to them is created. `true` until turned off.",
            "example": true
          },
          "taskCommentEnabled": {
            "type": "boolean",
            "description": "Whether notifications are created for comments on the user's tasks and for mentions. `true` until turned off.",
            "example": true
          },
          "taskStatusChangeEnabled": {
            "type": "boolean",
            "description": "Whether notifications are created when a task assigned to the user changes status. `true` until turned off.",
            "example": true
          },
          "dueDateReminderEnabled": {
            "type": "boolean",
            "description": "Whether due date reminders and overdue notifications are created. `true` until turned off.",
            "example": true
          },
          "dueDateReminderLeadTimeMinutes": {
            "type": "number",
            "description": "How long before a due date the reminder fires, in minutes. Defaults to 1440 (one day).",
            "example": 1440
          },
          "workspaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationPreferenceWorkspaceRule"
            },
            "description": "The user's per-workspace delivery rules, oldest first. A workspace with no rule gets in-app notifications only; nothing from it is sent to email, ntfy, Gotify or the webhook."
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time the user first saved notification preferences, in UTC. Null when they never have, in which case every value shown is a default.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time the global notification preferences were last changed, in UTC. Null when they were never saved.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "emailAddress",
          "emailEnabled",
          "ntfyEnabled",
          "ntfyConfigured",
          "ntfyServerUrl",
          "ntfyTopic",
          "ntfyTokenConfigured",
          "maskedNtfyToken",
          "gotifyEnabled",
          "gotifyConfigured",
          "gotifyServerUrl",
          "gotifyTokenConfigured",
          "maskedGotifyToken",
          "webhookEnabled",
          "webhookConfigured",
          "webhookUrl",
          "webhookSecretConfigured",
          "maskedWebhookSecret",
          "taskAssignmentEnabled",
          "taskCommentEnabled",
          "taskStatusChangeEnabled",
          "dueDateReminderEnabled",
          "dueDateReminderLeadTimeMinutes",
          "workspaces",
          "createdAt",
          "updatedAt"
        ],
        "description": "How the current user is notified: global channels, notification categories and per-workspace delivery rules. Secrets are never returned; each is reported as a configured flag and a masked preview."
      },
      "NotificationPreferenceWorkspaceRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the workspace rule.",
            "example": "vqjwk6a90kv81dixs3ndtyqd"
          },
          "workspaceId": {
            "type": "string",
            "description": "ID of the workspace the rule applies to.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          },
          "workspaceName": {
            "type": "string",
            "description": "Current name of the workspace.",
            "example": "Acme"
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the rule delivers anything. When `false`, nothing from this workspace is sent to any channel.",
            "example": true
          },
          "emailEnabled": {
            "type": "boolean",
            "description": "Whether notifications from this workspace are emailed, while email is also on globally.",
            "example": true
          },
          "ntfyEnabled": {
            "type": "boolean",
            "description": "Whether notifications from this workspace go to ntfy, while ntfy is also on and configured globally.",
            "example": false
          },
          "gotifyEnabled": {
            "type": "boolean",
            "description": "Whether notifications from this workspace go to Gotify, while Gotify is also on and configured globally.",
            "example": false
          },
          "webhookEnabled": {
            "type": "boolean",
            "description": "Whether notifications from this workspace go to the webhook, while the webhook is also on and configured globally.",
            "example": false
          },
          "projectMode": {
            "type": "string",
            "enum": [
              "all",
              "selected"
            ],
            "description": "`all` notifies for every project in the workspace; `selected` restricts it to selectedProjectIds.",
            "example": "all"
          },
          "selectedProjectIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the projects the rule covers when `projectMode` is `selected`. Projects the user can no longer access are left out of this list but stay in the rule. Empty when `projectMode` is `all`.",
            "example": []
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the rule was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the rule was last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "workspaceName",
          "isActive",
          "emailEnabled",
          "ntfyEnabled",
          "gotifyEnabled",
          "webhookEnabled",
          "projectMode",
          "selectedProjectIds",
          "createdAt",
          "updatedAt"
        ],
        "description": "The current user's delivery rule for one workspace. Notifications about tasks and workspaces are sent to email, ntfy, Gotify or a webhook only when that workspace has an active rule that covers them and the channel is on both here and in the global settings. In-app notifications do not depend on rules."
      },
      "SearchResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchResult"
            },
            "description": "Matches of every requested kind in one list, sorted by `relevanceScore` and then by `createdAt`, newest first, cut to `limit`."
          },
          "totalCount": {
            "type": "number",
            "description": "Number of matches collected before the final `limit` cut. Each kind of result is fetched up to `limit` on its own, so this is not a full count of all matches, but a value above the number of results shows that more exist.",
            "example": 27
          },
          "searchQuery": {
            "type": "string",
            "description": "The query that was run.",
            "example": "login bug"
          }
        },
        "required": [
          "results",
          "totalCount",
          "searchQuery"
        ],
        "description": "Ranked results of a global search."
      },
      "SearchResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the matched item: the task, project or workspace, or the activity for comment and activity results.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "type": {
            "type": "string",
            "enum": [
              "task",
              "project",
              "workspace",
              "comment",
              "activity"
            ],
            "description": "Kind of the matched item. `comment` is a comment on a task; `activity` is any other task activity, such as a status change.",
            "example": "task"
          },
          "title": {
            "type": "string",
            "description": "Display title: the task title, project name or workspace name. Comments read `Comment on <task title>` and activities `<activity type> on <task title>`.",
            "example": "Fix login redirect loop"
          },
          "description": {
            "type": "string",
            "description": "Description of the task, project or workspace. Absent when it is empty, and for comment and activity results.",
            "example": "Users are sent back to the sign-in page after signing in."
          },
          "content": {
            "type": "string",
            "description": "Matched body text, for comment and activity results. Activities get a rendered summary such as `changed status from Todo to In Progress`."
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the item belongs to, or of the project itself for project results. Absent for workspace results.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "projectName": {
            "type": "string",
            "description": "Name of the project the item belongs to. Absent for project and workspace results.",
            "example": "Website"
          },
          "projectSlug": {
            "type": "string",
            "description": "Key of the project the item belongs to, or of the project itself, used in task short IDs such as `WEB-42`. Absent for workspace results.",
            "example": "WEB"
          },
          "workspaceId": {
            "type": "string",
            "description": "ID of the workspace the item belongs to, or of the workspace itself for workspace results.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          },
          "workspaceName": {
            "type": "string",
            "description": "Name of the workspace the item belongs to.",
            "example": "Acme"
          },
          "userId": {
            "type": "string",
            "description": "ID of the user linked to the item: the assignee for tasks, the author for comments and activities. Absent when there is none, and for project and workspace results.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "userName": {
            "type": "string",
            "description": "Display name of the user in `userId`.",
            "example": "Jane Doe"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the matched item was created, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "relevanceScore": {
            "type": "number",
            "description": "Higher is a better match. Results are sorted by score, then by createdAt descending. A task found by its short ID scores 10; a match in a title or name scores 3, in a description 2; a comment or activity matched by its own text scores 2, and by its task's title 1.",
            "example": 3
          },
          "taskNumber": {
            "type": "number",
            "description": "Number of the task within its project, for task, comment and activity results.",
            "example": 42
          },
          "priority": {
            "type": "string",
            "description": "Priority of the task, for task results: no-priority, low, medium, high or urgent.",
            "example": "high"
          },
          "status": {
            "type": "string",
            "description": "Status of the task, for task results: the slug of its column, or `planned` or `archived`.",
            "example": "in-progress"
          }
        },
        "required": [
          "id",
          "type",
          "title",
          "createdAt",
          "relevanceScore"
        ],
        "description": "One search match. Which optional fields are present depends on `type`."
      },
      "IntegrationSyncPreview": {
        "type": "object",
        "properties": {
          "isActive": {
            "type": "boolean",
            "description": "Whether the integration is turned on. Rules are saved either way, but nothing syncs while it is off.",
            "example": true
          },
          "rules": {
            "type": "object",
            "properties": {
              "outgoing": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "all"
                        ],
                        "description": "`all`: every item matches, with no label filter."
                      }
                    },
                    "required": [
                      "mode"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "labels"
                        ],
                        "description": "`labels`: only items carrying the listed labels match."
                      },
                      "match": {
                        "type": "string",
                        "enum": [
                          "any",
                          "all"
                        ],
                        "description": "`any`: at least one listed label must be present. `all`: every listed label must be present."
                      },
                      "labels": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "minItems": 1,
                        "maxItems": 50,
                        "description": "Labels to match: 1 to 50 unique values of up to 128 characters each, trimmed. An outgoing rule lists workspace label IDs; an incoming rule lists exact repository label names."
                      }
                    },
                    "required": [
                      "mode",
                      "match",
                      "labels"
                    ]
                  }
                ],
                "description": "albus workspace label IDs controlling task sync. Missing labels pause sync. A task that stops matching has its issue sync paused; the issue link is kept."
              },
              "incoming": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "all"
                        ],
                        "description": "`all`: every item matches, with no label filter."
                      }
                    },
                    "required": [
                      "mode"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "enum": [
                          "labels"
                        ],
                        "description": "`labels`: only items carrying the listed labels match."
                      },
                      "match": {
                        "type": "string",
                        "enum": [
                          "any",
                          "all"
                        ],
                        "description": "`any`: at least one listed label must be present. `all`: every listed label must be present."
                      },
                      "labels": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "minItems": 1,
                        "maxItems": 50,
                        "description": "Labels to match: 1 to 50 unique values of up to 128 characters each, trimmed. An outgoing rule lists workspace label IDs; an incoming rule lists exact repository label names."
                      }
                    },
                    "required": [
                      "mode",
                      "match",
                      "labels"
                    ]
                  }
                ],
                "description": "Exact repository label names controlling which issues can be imported."
              }
            },
            "required": [
              "outgoing",
              "incoming"
            ],
            "description": "Label rules of the integration. Both default to `{ \"mode\": \"all\" }`."
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "ID of the workspace label.",
                  "example": "xmsumno675r2a71rrcz68pin"
                },
                "name": {
                  "type": "string",
                  "description": "Display name of the label.",
                  "example": "Bug"
                },
                "color": {
                  "type": "string",
                  "description": "Color of the label as stored.",
                  "example": "red"
                }
              },
              "required": [
                "id",
                "name",
                "color"
              ]
            },
            "description": "Workspace labels an outgoing rule can select: every workspace label that is not being deleted, sorted by ID."
          },
          "missingLabels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Label IDs in the outgoing rule that are no longer workspace labels. While any are missing, no task matches, and saving fails with 400.",
            "example": []
          },
          "total": {
            "type": "number",
            "description": "Number of tasks in the project.",
            "example": 120
          },
          "matching": {
            "type": "number",
            "description": "Number of tasks that match the outgoing rule.",
            "example": 48
          },
          "willCreate": {
            "type": "number",
            "description": "Number of matching tasks without an issue yet, or whose issue is still being set up, that will be exported as new issues.",
            "example": 5
          },
          "willPause": {
            "type": "number",
            "description": "Number of linked tasks that do not match the rule and whose issue sync will be paused.",
            "example": 3
          },
          "needsReview": {
            "type": "number",
            "description": "Number of linked tasks that match the rule but are paused or outside the saved rule. Their sync resumes only after a review.",
            "example": 2
          },
          "paused": {
            "type": "number",
            "description": "Number of linked tasks whose sync is paused, or would be paused under these rules.",
            "example": 4
          },
          "matchingTasks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "ID of the task.",
                  "example": "bkh59p9dpz3efjy7e59v55jd"
                },
                "number": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Number of the task within its project. Null when the task has no number.",
                  "example": 42
                },
                "title": {
                  "type": "string",
                  "description": "Title of the task.",
                  "example": "Fix login redirect loop"
                }
              },
              "required": [
                "id",
                "number",
                "title"
              ]
            },
            "description": "Up to 10 matching tasks, sorted by task ID, as a sample."
          },
          "pausedNextCursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Task ID to send as the `after` query parameter of the get operation for the next page of `pausedTasks`. Null on the last page.",
            "example": "p15q5mwm4dm31qgfyrygj35y"
          },
          "pausedTasks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "ID of the task.",
                  "example": "bkh59p9dpz3efjy7e59v55jd"
                },
                "number": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Number of the task within its project. Null when the task has no number.",
                  "example": 42
                },
                "title": {
                  "type": "string",
                  "description": "Title of the task.",
                  "example": "Fix login redirect loop"
                },
                "linkId": {
                  "type": "string",
                  "description": "ID of the issue link, used to review and resume its sync.",
                  "example": "ghlz1fqn1h9zzgwvcyi4w4xd"
                },
                "url": {
                  "type": "string",
                  "description": "Web URL of the linked external issue.",
                  "example": "https://github.com/acme/website/issues/17"
                },
                "eligible": {
                  "type": "boolean",
                  "description": "Whether the task matches the rules, so its link can be reviewed and resumed.",
                  "example": true
                }
              },
              "required": [
                "id",
                "number",
                "title",
                "linkId",
                "url",
                "eligible"
              ]
            },
            "description": "Up to 25 linked tasks whose sync is paused or would be paused, sorted by task ID. Their issue links are kept."
          },
          "previewToken": {
            "type": "string",
            "description": "SHA-256 hex digest binding this result to the integration's current settings, the rules, their selected labels and the affected tasks. Send it as `previewToken` to save these rules.",
            "example": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
          }
        },
        "required": [
          "isActive",
          "rules",
          "labels",
          "missingLabels",
          "total",
          "matching",
          "willCreate",
          "willPause",
          "needsReview",
          "paused",
          "matchingTasks",
          "pausedNextCursor",
          "pausedTasks",
          "previewToken"
        ],
        "description": "Label rules of a GitHub, Gitea or GitLab integration and the tasks they affect. Counts cover every task in the project; the task lists are samples or pages."
      },
      "IntegrationSyncResumePreview": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "ID of the task.",
                "example": "bkh59p9dpz3efjy7e59v55jd"
              },
              "number": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Number of the task within its project. Null when the task has no number.",
                "example": 42
              },
              "title": {
                "type": "string",
                "description": "Title of the task.",
                "example": "Fix login redirect loop"
              }
            },
            "required": [
              "id",
              "number",
              "title"
            ],
            "description": "The paused task."
          },
          "local": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "description": "Title of the task or issue.",
                "example": "Fix login redirect loop"
              },
              "description": {
                "type": "string",
                "description": "Description of the task or issue. An empty string when there is none.",
                "example": "Users are sent back to the login page after signing in."
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ],
                "description": "Open or closed state. A task counts as `closed` while it is in a final column.",
                "example": "open"
              }
            },
            "required": [
              "title",
              "description",
              "state"
            ],
            "description": "Current values of the task."
          },
          "remote": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "description": "Title of the task or issue.",
                "example": "Fix login redirect loop"
              },
              "description": {
                "type": "string",
                "description": "Description of the task or issue. An empty string when there is none.",
                "example": "Users are sent back to the login page after signing in."
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ],
                "description": "Open or closed state. A task counts as `closed` while it is in a final column.",
                "example": "open"
              }
            },
            "required": [
              "title",
              "description",
              "state"
            ],
            "description": "Current values of the external issue, read from the provider."
          },
          "token": {
            "type": "string",
            "description": "SHA-256 hex digest of this comparison. Send it as `token` to resume; the resume fails with 409 when anything changed since.",
            "example": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
          }
        },
        "required": [
          "task",
          "local",
          "remote",
          "token"
        ],
        "description": "A comparison of a paused task and its external issue, used to choose which side's values win when sync resumes."
      },
      "GitHubAppInfo": {
        "type": "object",
        "properties": {
          "accountConnected": {
            "type": "boolean",
            "description": "Whether the caller has linked a GitHub account. Listing and linking repositories require one.",
            "example": true
          },
          "accountLinkingAvailable": {
            "type": "boolean",
            "description": "Whether GitHub sign-in is configured on this server, so the caller can link a GitHub account.",
            "example": true
          },
          "appName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The configured GitHub App slug, or null when this instance has no App set up.",
            "example": "acme-tasks"
          }
        },
        "required": [
          "accountConnected",
          "accountLinkingAvailable",
          "appName"
        ],
        "description": "The GitHub App configuration and the caller's GitHub account status."
      },
      "GitHubRepositoryList": {
        "type": "object",
        "properties": {
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GitHubRepository"
            },
            "description": "Repositories the caller administers, deduplicated within the response."
          },
          "installations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GitHubInstallation"
            },
            "description": "Installations that contributed at least one repository to this response."
          },
          "total": {
            "type": "number",
            "description": "Number of repositories in this response, not across all pages.",
            "example": 1
          },
          "nextPage": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "installationPage": {
                "type": "number",
                "description": "Value to send as `installationPage` on the next request.",
                "example": 1
              },
              "repositoryPage": {
                "type": "number",
                "description": "Value to send as `repositoryPage` on the next request.",
                "example": 2
              }
            },
            "required": [
              "installationPage",
              "repositoryPage"
            ],
            "description": "Where to continue listing, or null when every installation has been read."
          }
        },
        "required": [
          "repositories",
          "installations",
          "total",
          "nextPage"
        ],
        "description": "One page of GitHub repositories the caller can link."
      },
      "GitHubRepository": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "GitHub's numeric ID of the repository.",
            "example": 812345678
          },
          "name": {
            "type": "string",
            "description": "Name of the repository without the owner.",
            "example": "website"
          },
          "full_name": {
            "type": "string",
            "description": "Repository name with its owner, as `owner/name`.",
            "example": "acme/website"
          },
          "private": {
            "type": "boolean",
            "description": "Whether the repository is private.",
            "example": false
          },
          "owner": {
            "$ref": "#/components/schemas/GitHubRepositoryOwner"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of the repository, or null when it has none.",
            "example": "Marketing website"
          },
          "html_url": {
            "type": "string",
            "description": "URL of the repository on GitHub.",
            "example": "https://github.com/acme/website"
          },
          "permissions": {
            "$ref": "#/components/schemas/GitHubRepositoryPermissions"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the repository was last updated on GitHub, in UTC. Empty when GitHub did not report it.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "installation_id": {
            "type": "number",
            "description": "Which App installation this repository came through.",
            "example": 51234567
          }
        },
        "required": [
          "id",
          "name",
          "full_name",
          "private",
          "owner",
          "description",
          "html_url",
          "updated_at",
          "installation_id"
        ],
        "description": "A GitHub repository reachable through the App that the caller administers."
      },
      "GitHubRepositoryOwner": {
        "type": "object",
        "properties": {
          "login": {
            "type": "string",
            "description": "Login of the repository owner.",
            "example": "acme"
          },
          "avatar_url": {
            "type": "string",
            "description": "URL of the owner's avatar image.",
            "example": "https://avatars.example.com/u/1234567"
          },
          "type": {
            "type": "string",
            "description": "Kind of GitHub account, such as `User` or `Organization`.",
            "example": "Organization"
          }
        },
        "required": [
          "login",
          "avatar_url",
          "type"
        ],
        "description": "The GitHub account that owns a repository."
      },
      "GitHubRepositoryPermissions": {
        "type": "object",
        "properties": {
          "admin": {
            "type": "boolean",
            "description": "Whether the caller can administer the repository.",
            "example": true
          },
          "push": {
            "type": "boolean",
            "description": "Whether the caller can push to the repository.",
            "example": true
          },
          "pull": {
            "type": "boolean",
            "description": "Whether the caller can read the repository.",
            "example": true
          }
        },
        "required": [
          "admin",
          "push",
          "pull"
        ],
        "description": "The caller's permissions on a repository."
      },
      "GitHubInstallation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "ID of the GitHub App installation.",
            "example": 51234567
          },
          "account": {
            "$ref": "#/components/schemas/GitHubInstallationAccount"
          },
          "repositories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Full names of the repositories in this response that came through this installation.",
            "example": [
              "acme/website"
            ]
          }
        },
        "required": [
          "id",
          "account",
          "repositories"
        ],
        "description": "A GitHub App installation that repositories came through."
      },
      "GitHubInstallationAccount": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "login": {
            "type": "string",
            "description": "Login of the account the App is installed on.",
            "example": "acme"
          },
          "type": {
            "type": "string",
            "description": "Kind of GitHub account, such as `User` or `Organization`.",
            "example": "Organization"
          }
        },
        "required": [
          "login",
          "type"
        ],
        "description": "The GitHub account an App installation belongs to, or null when GitHub did not report it."
      },
      "GitHubVerificationResult": {
        "type": "object",
        "properties": {
          "isInstalled": {
            "type": "boolean",
            "description": "Whether the GitHub App is installed on the repository.",
            "example": true
          },
          "installationId": {
            "type": [
              "number",
              "null"
            ],
            "description": "ID of the App installation that covers the repository, or null when the App is not installed.",
            "example": 51234567
          },
          "repositoryExists": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the installation can still read the repository. Null when the App is not installed, so it could not be checked.",
            "example": true
          },
          "repositoryPrivate": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the repository is private. Null when the repository could not be read.",
            "example": false
          },
          "permissions": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "string"
            },
            "description": "The permissions the installation currently grants, as a map of permission name to level such as `read` or `write`. Null when the App is not installed.",
            "example": {
              "issues": "write",
              "metadata": "read"
            }
          },
          "hasRequiredPermissions": {
            "type": "boolean",
            "description": "Whether the installation grants every required permission. The `issues` permission must be `write` or `admin`.",
            "example": true
          },
          "missingPermissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Permissions that must be granted before the link will work.",
            "example": []
          },
          "message": {
            "type": "string",
            "description": "A human-readable summary to show the user.",
            "example": "GitHub App is properly installed and has all required permissions"
          },
          "settingsUrl": {
            "type": "string",
            "description": "Where to adjust the installation on GitHub. When the App is not installed, the App's public page.",
            "example": "https://github.com/settings/installations/51234567"
          },
          "installationUrl": {
            "type": "string",
            "description": "Where to install the App or grant it more permissions. Absent when no App name is configured.",
            "example": "https://github.com/apps/acme-tasks/installations/new/permissions"
          }
        },
        "required": [
          "isInstalled",
          "installationId",
          "repositoryExists",
          "repositoryPrivate",
          "permissions",
          "hasRequiredPermissions",
          "missingPermissions",
          "message"
        ],
        "description": "Whether the GitHub App can reach a repository with the permissions the integration needs."
      },
      "GitHubIntegration": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the integration.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the repository is linked to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "repositoryOwner": {
            "type": "string",
            "description": "Login of the GitHub user or organization that owns the linked repository.",
            "example": "acme"
          },
          "repositoryName": {
            "type": "string",
            "description": "Name of the linked GitHub repository.",
            "example": "website"
          },
          "installationId": {
            "type": [
              "number",
              "null"
            ],
            "description": "ID of the GitHub App installation that grants access to the repository. Null when no installation is recorded.",
            "example": 51234567
          },
          "requiresVerification": {
            "type": "boolean",
            "description": "Whether a repository administrator must reconnect the repository before it syncs. When `true`, `isActive` is `false` and imports are refused.",
            "example": false
          },
          "importProgress": {
            "$ref": "#/components/schemas/IssueImportResult"
          },
          "branchPattern": {
            "type": "string",
            "description": "Template used to name branches created for a task. `{slug}` is the project slug, `{number}` the task number and `{title}` the task title. Defaults to `{slug}-{number}`.",
            "example": "{slug}-{number}"
          },
          "commentTaskLinkOnGitHubIssue": {
            "type": "boolean",
            "description": "When on, albus comments a link back to the task on the linked GitHub issue. Defaults to `true`.",
            "example": true
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the integration syncs. `false` when it is paused or the repository link still needs verification.",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "repositoryOwner",
          "repositoryName",
          "installationId",
          "requiresVerification",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "description": "A link between a project and a GitHub repository. `importProgress` is present when an issue import has run for the current repository."
      },
      "IssueImportResult": {
        "type": "object",
        "properties": {
          "runId": {
            "type": "string",
            "description": "ID of the import run. Send it back as `runId` to continue or to retry completion.",
            "example": "h7i3jtaehpaixygugf24uy51"
          },
          "pending": {
            "type": "boolean",
            "description": "Whether the run has more work left, either pages to read or change notifications to deliver. `false` means the import is complete.",
            "example": true
          },
          "imported": {
            "type": "number",
            "description": "Number of new tasks created from issues so far in this run.",
            "example": 12
          },
          "updated": {
            "type": "number",
            "description": "Number of existing linked tasks refreshed from their issue so far in this run.",
            "example": 3
          },
          "skipped": {
            "type": "number",
            "description": "Issues whose linked task or source disappeared or belongs to another project.",
            "example": 0
          }
        },
        "required": [
          "runId",
          "pending",
          "imported",
          "updated",
          "skipped"
        ],
        "description": "Progress of a GitHub issue import run. Counts are cumulative for the run."
      },
      "CreatedGitHubIntegration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the integration.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the repository is linked to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "repositoryOwner": {
            "type": "string",
            "description": "Login of the GitHub user or organization that owns the linked repository.",
            "example": "acme"
          },
          "repositoryName": {
            "type": "string",
            "description": "Name of the linked GitHub repository.",
            "example": "website"
          },
          "installationId": {
            "type": [
              "number",
              "null"
            ],
            "description": "ID of the GitHub App installation that grants access to the repository. Null when no installation is recorded.",
            "example": 51234567
          },
          "requiresVerification": {
            "type": "boolean",
            "description": "Whether a repository administrator must reconnect the repository before it syncs. When `true`, `isActive` is `false` and imports are refused.",
            "example": false
          },
          "importProgress": {
            "$ref": "#/components/schemas/IssueImportResult"
          },
          "branchPattern": {
            "type": "string",
            "description": "Template used to name branches created for a task. `{slug}` is the project slug, `{number}` the task number and `{title}` the task title. Defaults to `{slug}-{number}`.",
            "example": "{slug}-{number}"
          },
          "commentTaskLinkOnGitHubIssue": {
            "type": "boolean",
            "description": "When on, albus comments a link back to the task on the linked GitHub issue. Defaults to `true`.",
            "example": true
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the integration syncs. `false` when it is paused or the repository link still needs verification.",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "repositoryOwner",
          "repositoryName",
          "installationId",
          "requiresVerification"
        ],
        "description": "The integration as stored after linking. `requiresVerification` is always `false`; `branchPattern`, `commentTaskLinkOnGitHubIssue` and `importProgress` are not included."
      },
      "GitHubDeleteResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Always `true` when the integration was removed.",
            "example": true
          },
          "message": {
            "type": "string",
            "description": "A human-readable confirmation.",
            "example": "GitHub integration deleted"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "description": "Confirmation that a GitHub integration was removed."
      },
      "GiteaRepositoryList": {
        "type": "object",
        "properties": {
          "repositories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GiteaRepository"
            },
            "description": "Repositories the token's user can reach, in Gitea's order. At most 2,500 are returned."
          }
        },
        "required": [
          "repositories"
        ],
        "description": "Gitea repositories a token can link."
      },
      "GiteaRepository": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Gitea's numeric ID of the repository.",
            "example": 315
          },
          "name": {
            "type": "string",
            "description": "Name of the repository without the owner.",
            "example": "website"
          },
          "full_name": {
            "type": "string",
            "description": "Repository name with its owner, as `owner/name`.",
            "example": "acme/website"
          },
          "owner": {
            "$ref": "#/components/schemas/GiteaRepositoryOwner"
          },
          "private": {
            "type": "boolean",
            "description": "Whether the repository is private.",
            "example": false
          },
          "html_url": {
            "type": "string",
            "description": "URL of the repository on the Gitea instance.",
            "example": "https://gitea.example.com/acme/website"
          }
        },
        "required": [
          "id",
          "name",
          "full_name",
          "owner",
          "private",
          "html_url"
        ],
        "description": "A Gitea repository the token can reach."
      },
      "GiteaRepositoryOwner": {
        "type": "object",
        "properties": {
          "login": {
            "type": "string",
            "description": "Login of the repository owner. Empty when Gitea reported neither a login nor a username.",
            "example": "acme"
          }
        },
        "required": [
          "login"
        ],
        "description": "The Gitea account that owns a repository."
      },
      "GiteaVerificationResult": {
        "type": "object",
        "properties": {
          "isInstalled": {
            "type": "boolean",
            "description": "Whether the base URL answered as a Gitea instance and the repository was found.",
            "example": true
          },
          "hasRequiredPermissions": {
            "type": "boolean",
            "description": "Whether the token can push to or administer the repository, which is needed to manage issues.",
            "example": true
          },
          "repositoryExists": {
            "type": "boolean",
            "description": "Whether the token can see the repository.",
            "example": true
          },
          "repositoryPrivate": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the repository is private. Null when verification failed.",
            "example": false
          },
          "missingPermissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Permissions the token still needs. Contains `issues (write)` when the token cannot push; otherwise empty.",
            "example": []
          },
          "message": {
            "type": "string",
            "description": "A human-readable summary to show the user.",
            "example": "Token can access the repository."
          },
          "failureReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "not_a_gitea_instance",
              "redirected",
              "repository_not_found",
              null
            ],
            "description": "Why verification failed, or null when it succeeded. `not_a_gitea_instance`: the URL did not answer like Gitea. `redirected`: the server redirected the request, usually because it forces HTTPS; use the final URL. `repository_not_found`: the repository does not exist or the token cannot see it.",
            "example": "repository_not_found"
          }
        },
        "required": [
          "isInstalled",
          "hasRequiredPermissions",
          "repositoryExists",
          "repositoryPrivate",
          "missingPermissions",
          "message",
          "failureReason"
        ],
        "description": "Whether a Gitea token can reach a repository with the permissions the integration needs."
      },
      "GiteaIntegration": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the integration. Also the last segment of `webhookUrl`.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the Gitea repository is linked to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "baseUrl": {
            "type": "string",
            "description": "Root URL of the Gitea instance.",
            "example": "https://gitea.example.com"
          },
          "repositoryOwner": {
            "type": "string",
            "description": "Login of the Gitea user or organization that owns the linked repository.",
            "example": "acme"
          },
          "repositoryName": {
            "type": "string",
            "description": "Name of the linked Gitea repository.",
            "example": "website"
          },
          "maskedAccessToken": {
            "type": "string",
            "description": "The stored token with all but its first and last four characters hidden, or a fixed mask for short tokens. The full token is never returned.",
            "example": "exam••••••oken"
          },
          "webhookUrl": {
            "type": "string",
            "description": "Where Gitea should POST events for this project.",
            "example": "https://api.example.com/gitea-integration/webhook/rmj63dhunda6v4ufepcb35cq"
          },
          "webhookSecret": {
            "type": "string",
            "description": "Secret to enter in the Gitea webhook settings; Gitea uses it to sign each delivery with HMAC-SHA256. Only returned to callers with workspace:manage_settings; others get an empty string.",
            "example": "0f1e2d3c4b5a69780f1e2d3c4b5a69780f1e2d3c4b5a6978"
          },
          "branchPattern": {
            "type": "string",
            "description": "Template used to match and name branches for a task. `{slug}` is the project slug, `{number}` the task number and `{title}` the task title. Defaults to `{slug}-{number}`.",
            "example": "{slug}-{number}"
          },
          "commentTaskLinkOnGiteaIssue": {
            "type": "boolean",
            "description": "When on, albus comments a link back to the task on the linked Gitea issue. Defaults to `true`.",
            "example": true
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the integration syncs. `false` when syncing is paused.",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "baseUrl",
          "repositoryOwner",
          "repositoryName",
          "maskedAccessToken",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "description": "A link between a project and a Gitea repository. The access token is never returned in full."
      },
      "GiteaDeleteResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Always `true` when the integration was removed.",
            "example": true
          },
          "message": {
            "type": "string",
            "description": "A human-readable confirmation.",
            "example": "Gitea integration deleted"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "description": "Confirmation that a Gitea integration was removed."
      },
      "GiteaImportResult": {
        "type": "object",
        "properties": {
          "imported": {
            "type": "number",
            "description": "Number of new tasks created from issues.",
            "example": 12
          },
          "updated": {
            "type": "number",
            "description": "Existing tasks that were refreshed from their issue.",
            "example": 3
          },
          "skipped": {
            "type": "number",
            "description": "Number of issues left out: issues the sync rules exclude and linked issues whose task can no longer sync.",
            "example": 1
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Messages for pages or individual issues and pull requests that failed. Absent when nothing failed.",
            "example": [
              "Issue #42: Request timed out"
            ]
          }
        },
        "required": [
          "imported",
          "updated",
          "skipped"
        ],
        "description": "Summary of a Gitea issue import."
      },
      "GitlabProjectList": {
        "type": "object",
        "properties": {
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GitlabProject"
            },
            "description": "Projects the token is a member of, most recently active first. At most 2,500 are returned."
          }
        },
        "required": [
          "projects"
        ],
        "description": "GitLab projects a token can link."
      },
      "GitlabProject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "GitLab's numeric ID of the project.",
            "example": 4821
          },
          "name": {
            "type": "string",
            "description": "Display name of the project.",
            "example": "web"
          },
          "path_with_namespace": {
            "type": "string",
            "description": "Full path of the project including its groups. Send this as `projectPath`.",
            "example": "acme/platform/web"
          },
          "name_with_namespace": {
            "type": "string",
            "description": "Display name of the project including its groups.",
            "example": "Acme / Platform / web"
          },
          "visibility": {
            "type": "string",
            "description": "Visibility of the project as reported by GitLab: `private`, `internal` or `public`.",
            "example": "private"
          },
          "web_url": {
            "type": "string",
            "description": "URL of the project on the GitLab instance.",
            "example": "https://gitlab.example.com/acme/platform/web"
          }
        },
        "required": [
          "id",
          "name",
          "path_with_namespace",
          "name_with_namespace",
          "visibility",
          "web_url"
        ],
        "description": "A GitLab project the token is a member of."
      },
      "GitlabVerificationResult": {
        "type": "object",
        "properties": {
          "isInstalled": {
            "type": "boolean",
            "description": "The base URL answered as a GitLab instance for this token.",
            "example": true
          },
          "hasRequiredPermissions": {
            "type": "boolean",
            "description": "Whether the token has at least the Developer role on the project, which is needed to manage issues and labels. Always `true` for tokens that report no project role, such as group or instance tokens.",
            "example": true
          },
          "projectExists": {
            "type": "boolean",
            "description": "Whether the token can see the project.",
            "example": true
          },
          "projectVisibility": {
            "type": [
              "string",
              "null"
            ],
            "description": "Visibility of the project: `private`, `internal` or `public`. Null when verification failed.",
            "example": "private"
          },
          "missingPermissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Roles the token still needs. Contains `Developer` when the token's role is too low; otherwise empty.",
            "example": []
          },
          "message": {
            "type": "string",
            "description": "A human-readable summary to show the user.",
            "example": "Token can access the project."
          },
          "failureReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "not_a_gitlab_instance",
              "redirected",
              "project_not_found",
              null
            ],
            "description": "Why verification failed, or null when it succeeded. `not_a_gitlab_instance`: the URL did not answer like GitLab. `redirected`: the server redirected the request, usually because it forces HTTPS; use the final URL. `project_not_found`: the project does not exist or the token cannot see it.",
            "example": "project_not_found"
          }
        },
        "required": [
          "isInstalled",
          "hasRequiredPermissions",
          "projectExists",
          "projectVisibility",
          "missingPermissions",
          "message",
          "failureReason"
        ],
        "description": "Whether a GitLab token can reach a project with the permissions the integration needs."
      },
      "GitlabIntegration": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the integration. Also the last segment of `webhookUrl`.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the GitLab project is linked to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "baseUrl": {
            "type": "string",
            "description": "Root URL of the GitLab instance.",
            "example": "https://gitlab.example.com"
          },
          "projectPath": {
            "type": "string",
            "description": "Full path of the linked project, nested groups included.",
            "example": "acme/platform/web"
          },
          "tokenType": {
            "type": "string",
            "enum": [
              "private",
              "bearer"
            ],
            "description": "How the stored token is sent to GitLab. `private` uses the PRIVATE-TOKEN header; `bearer` uses the Authorization header.",
            "example": "private"
          },
          "maskedAccessToken": {
            "type": "string",
            "description": "The stored token with all but its first and last four characters hidden, or a fixed mask for short tokens. An empty string for callers without workspace:manage_settings.",
            "example": "exam••••••oken"
          },
          "webhookUrl": {
            "type": "string",
            "description": "Where GitLab should POST events for this project.",
            "example": "https://api.example.com/gitlab-integration/webhook/rmj63dhunda6v4ufepcb35cq"
          },
          "webhookSecret": {
            "type": "string",
            "description": "Secret token to enter in the GitLab webhook settings; GitLab sends it in the X-Gitlab-Token header. Only returned to callers with workspace:manage_settings; others get an empty string.",
            "example": "0f1e2d3c4b5a69780f1e2d3c4b5a69780f1e2d3c4b5a6978"
          },
          "branchPattern": {
            "type": "string",
            "description": "Template used to match and name branches for a task. `{slug}` is the project slug, `{number}` the task number and `{title}` the task title. Defaults to `{slug}-{number}`.",
            "example": "{slug}-{number}"
          },
          "commentTaskLinkOnGitlabIssue": {
            "type": "boolean",
            "description": "When on, albus comments a link back to the task on each issue opened in GitLab. Issues albus creates from tasks are not commented on. Defaults to `true`.",
            "example": true
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the integration syncs. `false` when syncing is paused.",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "baseUrl",
          "projectPath",
          "tokenType",
          "maskedAccessToken",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "description": "A link between a project and a GitLab project. The access token is never returned in full."
      },
      "GitlabDeleteResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Always `true` when the integration was removed.",
            "example": true
          },
          "message": {
            "type": "string",
            "description": "A human-readable confirmation.",
            "example": "GitLab integration deleted"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "description": "Confirmation that a GitLab integration was removed."
      },
      "GitlabImportResult": {
        "type": "object",
        "properties": {
          "imported": {
            "type": "number",
            "description": "Number of new tasks created from issues.",
            "example": 12
          },
          "updated": {
            "type": "number",
            "description": "Existing tasks that were refreshed from their issue.",
            "example": 3
          },
          "skipped": {
            "type": "number",
            "description": "Number of issues left out: confidential issues, issues the sync rules exclude, and linked issues whose task can no longer sync.",
            "example": 1
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Messages for pages or individual issues and merge requests that failed, and a note when more pages remain beyond the limit. Absent when nothing failed.",
            "example": [
              "Issue !42: Request timed out"
            ]
          }
        },
        "required": [
          "imported",
          "updated",
          "skipped"
        ],
        "description": "Summary of a GitLab issue import."
      },
      "GenericWebhookIntegration": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the integration.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the integration belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "webhookConfigured": {
            "type": "boolean",
            "description": "Whether a webhook URL is stored.",
            "example": true
          },
          "maskedWebhookUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "First and last four characters of the webhook URL joined by `…`, or `••••` when the URL has eight characters or fewer. Null when no URL is stored.",
            "example": "http…ents"
          },
          "secretConfigured": {
            "type": "boolean",
            "description": "Whether a signing secret is stored, so deliveries carry an `X-albus-Signature` header.",
            "example": true
          },
          "maskedSecret": {
            "type": [
              "string",
              "null"
            ],
            "description": "A preview of the HMAC signing secret used to sign outgoing deliveries: its first and last four characters joined by `…`, or `••••` when it has eight characters or fewer. Null when no secret is set.",
            "example": "exam…real"
          },
          "events": {
            "$ref": "#/components/schemas/GenericWebhookEvents"
          },
          "dueDateReminderLeadTimeMinutes": {
            "type": "number",
            "description": "How long before a due date the dueDateReminder event fires, in minutes. 1,440 (one day) when never set.",
            "example": 1440
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the webhook is turned on. Events are delivered only while it is `true`, the workspace is not archived and an administrator has not turned off the generic webhook provider. Null when no value was recorded.",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was last changed, in UTC. Also moves when a delivery result is recorded.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "webhookConfigured",
          "maskedWebhookUrl",
          "secretConfigured",
          "maskedSecret",
          "events",
          "dueDateReminderLeadTimeMinutes",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "description": "A project's outgoing webhook. Each selected task event is sent as a JSON POST with `event`, `timestamp`, `integration`, `project`, `task`, `actor` and `data` fields. The URL and secret are credentials, so only masked forms are returned."
      },
      "GenericWebhookEvents": {
        "allOf": [
          {
            "$ref": "#/components/schemas/IntegrationEvents"
          },
          {
            "type": "object",
            "properties": {
              "taskDeleted": {
                "type": "boolean",
                "description": "Whether a `task.deleted` event is delivered when a task is deleted. Defaults to `false`.",
                "example": false
              },
              "taskMoved": {
                "type": "boolean",
                "description": "Whether a `task.moved` event is delivered when a task is moved to another project. Defaults to `false`.",
                "example": false
              },
              "taskDueDateChanged": {
                "type": "boolean",
                "description": "Whether a `task.due_date_changed` event is delivered when a task's due date is set, changed or cleared. Defaults to `false`.",
                "example": false
              },
              "taskAssigneeChanged": {
                "type": "boolean",
                "description": "Whether a `task.assignee_changed` event is delivered when a task is assigned to someone. Defaults to `false`.",
                "example": false
              },
              "taskUnassigned": {
                "type": "boolean",
                "description": "Whether a `task.unassigned` event is delivered when a task's assignee is removed. Defaults to `false`.",
                "example": false
              },
              "dueDateReminder": {
                "type": "boolean",
                "description": "Whether a `task.due_date_reminder` event is delivered `dueDateReminderLeadTimeMinutes` before a task's due date. Tasks in a final column and archived tasks are skipped, and each task is reminded once per integration. Defaults to `false`.",
                "example": false
              }
            },
            "required": [
              "taskDeleted",
              "taskMoved",
              "taskDueDateChanged",
              "taskAssigneeChanged",
              "taskUnassigned",
              "dueDateReminder"
            ]
          }
        ],
        "description": "Task events the webhook delivers. Every key is present; a key that was never set shows its default. The six shared keys deliver `task.created`, `task.status_changed`, `task.priority_changed`, `task.title_changed`, `task.description_changed` and `task.comment_created` events."
      },
      "IntegrationEvents": {
        "type": "object",
        "properties": {
          "taskCreated": {
            "type": "boolean",
            "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
            "example": true
          },
          "taskStatusChanged": {
            "type": "boolean",
            "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
            "example": true
          },
          "taskPriorityChanged": {
            "type": "boolean",
            "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
            "example": false
          },
          "taskTitleChanged": {
            "type": "boolean",
            "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
            "example": false
          },
          "taskDescriptionChanged": {
            "type": "boolean",
            "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
            "example": false
          },
          "taskCommentCreated": {
            "type": "boolean",
            "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
            "example": true
          }
        },
        "required": [
          "taskCreated",
          "taskStatusChanged",
          "taskPriorityChanged",
          "taskTitleChanged",
          "taskDescriptionChanged",
          "taskCommentCreated"
        ],
        "description": "Task events the integration posts to its channel. Every key is present; a key that was never set shows its default."
      },
      "DiscordIntegration": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the integration.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the integration belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "channelName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the Discord channel as entered, for display only. Null when not set.",
            "example": "#releases"
          },
          "webhookConfigured": {
            "type": "boolean",
            "description": "Whether a webhook URL is stored.",
            "example": true
          },
          "maskedWebhookUrl": {
            "type": "string",
            "description": "Webhook URL with its last path segment (the webhook token) shortened to its first and last four characters, or to `••••` when that segment has eight characters or fewer. `Configured` when the stored URL cannot be parsed.",
            "example": "https://discord.com/api/webhooks/123456789012345678/EXAM…oken"
          },
          "events": {
            "$ref": "#/components/schemas/IntegrationEvents"
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the integration is turned on. Messages are posted only while it is `true`, the workspace is not archived and an administrator has not turned off the Discord provider. Null when no value was recorded.",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration settings were last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "channelName",
          "webhookConfigured",
          "maskedWebhookUrl",
          "events",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "description": "A project's Discord integration. It posts the selected task events to a Discord webhook. The webhook URL is a credential, so only a masked form is returned."
      },
      "MattermostIntegration": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the integration.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the integration belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "channelName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the Mattermost channel as entered, for display only. Null when not set.",
            "example": "town-square"
          },
          "webhookConfigured": {
            "type": "boolean",
            "description": "Whether a webhook URL is stored.",
            "example": true
          },
          "maskedWebhookUrl": {
            "type": "string",
            "description": "Webhook URL with its last path segment shortened to its first and last four characters, or to `••••` when that segment has eight characters or fewer. `Configured` when the stored URL cannot be parsed.",
            "example": "https://chat.example.com/hooks/xxxx…xxxx"
          },
          "events": {
            "$ref": "#/components/schemas/IntegrationEvents"
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the integration is turned on. Messages are posted only while it is `true`, the workspace is not archived and an administrator has not turned off the Mattermost provider. Null when no value was recorded.",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration settings were last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "channelName",
          "webhookConfigured",
          "maskedWebhookUrl",
          "events",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "description": "A project's Mattermost integration. It posts the selected task events to a Mattermost incoming webhook. The webhook URL is a credential, so only a masked form is returned."
      },
      "SlackIntegration": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the integration.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the integration belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "channelName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the Slack channel as entered, for display only. Null when not set.",
            "example": "#releases"
          },
          "webhookConfigured": {
            "type": "boolean",
            "description": "Whether a webhook URL is stored.",
            "example": true
          },
          "maskedWebhookUrl": {
            "type": "string",
            "description": "Webhook URL with its last path segment shortened to its first and last four characters, or to `••••` when that segment has eight characters or fewer. `Configured` when the stored URL cannot be parsed.",
            "example": "https://hooks.slack.com/services/T00000000/B00000000/XXXX…XXXX"
          },
          "events": {
            "$ref": "#/components/schemas/IntegrationEvents"
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the integration is turned on. Messages are posted only while it is `true`, the workspace is not archived and an administrator has not turned off the Slack provider. Null when no value was recorded.",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration settings were last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "channelName",
          "webhookConfigured",
          "maskedWebhookUrl",
          "events",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "description": "A project's Slack integration. It posts the selected task events to a Slack incoming webhook. The webhook URL is a credential, so only a masked form is returned."
      },
      "TelegramIntegration": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the integration.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the integration belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "serverUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base URL of your own Bot API server, without a trailing slash, or null for https://api.telegram.org.",
            "example": "https://telegram-bot-api.example.com"
          },
          "chatId": {
            "type": "string",
            "description": "ID of the Telegram chat, group, or channel messages are sent to.",
            "example": "-1001234567890"
          },
          "threadId": {
            "type": [
              "number",
              "null"
            ],
            "description": "ID of the forum topic messages are posted in. Null to post in the main chat.",
            "example": 42
          },
          "chatLabel": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name for the chat, shown in the integration settings. Null when not set.",
            "example": "Release announcements"
          },
          "botTokenConfigured": {
            "type": "boolean",
            "description": "Whether a bot token is stored.",
            "example": true
          },
          "maskedBotToken": {
            "type": "string",
            "description": "Bot token with the part after the colon shortened to its first and last four characters, or to `••••` when that part has eight characters or fewer. `Configured` when the stored token has no colon, and an empty string when no token is stored.",
            "example": "123456789:AAEx…9abc"
          },
          "events": {
            "$ref": "#/components/schemas/IntegrationEvents"
          },
          "isActive": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether the integration is turned on. Messages are posted only while it is `true`, the workspace is not archived and an administrator has not turned off the Telegram provider. Null when no value was recorded.",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the integration settings were last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "serverUrl",
          "chatId",
          "threadId",
          "chatLabel",
          "botTokenConfigured",
          "maskedBotToken",
          "events",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "description": "A project's Telegram integration. A Telegram bot posts the selected task events to one chat. The bot token is a credential, so only a masked form is returned."
      },
      "TaskRelation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the task relation.",
            "example": "pmb0jkv56js39ktxgnarw8sc"
          },
          "sourceTaskId": {
            "type": "string",
            "description": "ID of the source task: the parent for `subtask`, the blocking task for `blocks`.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "targetTaskId": {
            "type": "string",
            "description": "ID of the target task: the subtask for `subtask`, the blocked task for `blocks`.",
            "example": "p15q5mwm4dm31qgfyrygj35y"
          },
          "relationType": {
            "type": "string",
            "description": "How the two tasks relate: `subtask` (the target is a subtask of the source), `blocks` (the source blocks the target), or `related` (no direction).",
            "example": "blocks"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the relation was created, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          }
        },
        "required": [
          "id",
          "sourceTaskId",
          "targetTaskId",
          "relationType",
          "createdAt"
        ],
        "description": "A link between two tasks."
      },
      "TaskRelationWithTasks": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskRelation"
          },
          {
            "type": "object",
            "properties": {
              "sourceTask": {
                "$ref": "#/components/schemas/RelatedTask"
              },
              "targetTask": {
                "$ref": "#/components/schemas/RelatedTask"
              }
            },
            "required": [
              "sourceTask",
              "targetTask"
            ]
          }
        ],
        "description": "A relation with a summary of both tasks in `sourceTask` and `targetTask`. Both are always present in responses."
      },
      "RelatedTask": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the task.",
            "example": "p15q5mwm4dm31qgfyrygj35y"
          },
          "title": {
            "type": "string",
            "description": "Title of the task.",
            "example": "Update the pricing page"
          },
          "status": {
            "type": "string",
            "description": "The slug of the column the task sits in, or `planned` or `archived`.",
            "example": "to-do"
          },
          "isCompleted": {
            "type": "boolean",
            "description": "Whether the task is in a final column of its own project.",
            "example": false
          },
          "priority": {
            "type": [
              "string",
              "null"
            ],
            "description": "Priority of the task: `no-priority`, `low`, `medium`, `high` or `urgent`. Null when none is stored.",
            "example": "medium"
          },
          "number": {
            "type": [
              "number",
              "null"
            ],
            "description": "Per-project counter shown as {projectSlug}-{number}.",
            "example": 14
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the task belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "userId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the assignee. Null when the task is unassigned.",
            "example": "dvbh5d4ue1zvi3duyefsoqma"
          },
          "assigneeName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the assignee. Null when the task is unassigned.",
            "example": "Ben Okafor"
          }
        },
        "required": [
          "id",
          "title",
          "status",
          "isCompleted",
          "priority",
          "number",
          "projectId",
          "userId",
          "assigneeName"
        ],
        "description": "A summary of one of the two tasks in a relation."
      },
      "CreatedExternalLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the external link.",
            "example": "ghlz1fqn1h9zzgwvcyi4w4xd"
          },
          "taskId": {
            "type": "string",
            "description": "ID of the task the link is on.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "integrationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the integration that manages the link. Null for a manually added link.",
            "example": null
          },
          "resourceType": {
            "type": "string",
            "description": "Kind of resource: `url` or `pull_request` for a manual link, or an integration resource such as `issue` or `pull_request`.",
            "example": "pull_request"
          },
          "externalId": {
            "type": "string",
            "description": "Provider's identifier for the resource. For a manual link, the URL, or the pull request number when it can be read from the URL.",
            "example": "128"
          },
          "url": {
            "type": "string",
            "description": "URL the link opens.",
            "example": "https://github.com/acme/website/pull/128"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display title of the link. Null when none was set.",
            "example": "Fix login redirect"
          },
          "metadata": {
            "description": "Provider-specific payload, parsed from the stored JSON string. For a manual pull request link, `{ state, merged, draft }`. Null when the link has no metadata.",
            "example": {
              "state": "open",
              "merged": false,
              "draft": false
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the link was added, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the link was last changed, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          }
        },
        "required": [
          "id",
          "taskId",
          "integrationId",
          "resourceType",
          "externalId",
          "url",
          "title",
          "createdAt",
          "updatedAt"
        ],
        "description": "An external link as stored, without its integration summary."
      },
      "PullRequestLinkMetadata": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "open",
              "closed"
            ],
            "description": "Pull request state: `open` while it can still be merged, `closed` once merged or closed without merging.",
            "example": "open"
          },
          "merged": {
            "type": "boolean",
            "default": false,
            "description": "Whether the pull request was merged. Defaults to false.",
            "example": false
          },
          "draft": {
            "type": "boolean",
            "default": false,
            "description": "Whether the pull request is a draft. Defaults to false.",
            "example": false
          }
        },
        "required": [
          "state"
        ],
        "description": "Pull request status. Only accepted for `pull_request` links."
      },
      "DeletedExternalLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the removed link.",
            "example": "ghlz1fqn1h9zzgwvcyi4w4xd"
          }
        },
        "required": [
          "id"
        ],
        "description": "The removed link."
      },
      "ExternalLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the external link.",
            "example": "ghlz1fqn1h9zzgwvcyi4w4xd"
          },
          "taskId": {
            "type": "string",
            "description": "ID of the task the link is on.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "integrationId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the integration that manages the link. Null for a manually added link.",
            "example": null
          },
          "resourceType": {
            "type": "string",
            "description": "Kind of resource: `url` or `pull_request` for a manual link, or an integration resource such as `issue` or `pull_request`.",
            "example": "pull_request"
          },
          "externalId": {
            "type": "string",
            "description": "Provider's identifier for the resource. For a manual link, the URL, or the pull request number when it can be read from the URL.",
            "example": "128"
          },
          "url": {
            "type": "string",
            "description": "URL the link opens.",
            "example": "https://github.com/acme/website/pull/128"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display title of the link. Null when none was set.",
            "example": "Fix login redirect"
          },
          "metadata": {
            "description": "Provider-specific payload, parsed from the stored JSON string. For a manual pull request link, `{ state, merged, draft }`. Null when the link has no metadata.",
            "example": {
              "state": "open",
              "merged": false,
              "draft": false
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the link was added, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the link was last changed, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "integration": {
            "$ref": "#/components/schemas/ExternalLinkIntegration"
          }
        },
        "required": [
          "id",
          "taskId",
          "integrationId",
          "resourceType",
          "externalId",
          "url",
          "title",
          "createdAt",
          "updatedAt",
          "integration"
        ],
        "description": "A link from a task to an outside resource, added by hand or by a connected integration."
      },
      "ExternalLinkIntegration": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the integration.",
            "example": "rmj63dhunda6v4ufepcb35cq"
          },
          "type": {
            "type": "string",
            "description": "Integration type, such as `github` or `gitea`.",
            "example": "github"
          }
        },
        "required": [
          "id",
          "type"
        ],
        "description": "Integration that manages the link. Null for a manually added link."
      },
      "WorkflowRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the workflow rule.",
            "example": "vqjwk6a90kv81dixs3ndtyqd"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the rule belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "integrationType": {
            "type": "string",
            "description": "Integration whose events the rule handles: `github`, `gitlab`, `gitea` or `tangled`.",
            "example": "github"
          },
          "eventType": {
            "type": "string",
            "description": "Integration event that triggers the rule: `branch_push`, `pr_opened`, `pr_merged`, `issue_opened`, `issue_closed` or `issue_reopened`.",
            "example": "pr_merged"
          },
          "columnId": {
            "type": "string",
            "description": "ID of the column tasks are moved to when the event fires.",
            "example": "m4e9zz9dn4huwwyxp542ewhm"
          },
          "columnName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the target column. Null when the column cannot be found.",
            "example": "Done"
          },
          "columnSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "Slug of the target column, which becomes the task's status. Null when the column cannot be found.",
            "example": "done"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the rule was created, in UTC.",
            "example": "2026-10-03T12:15:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the rule was last changed, such as a new target column, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "integrationType",
          "eventType",
          "columnId",
          "columnName",
          "columnSlug",
          "createdAt",
          "updatedAt"
        ],
        "description": "A rule that moves a project's tasks to a column when an integration event fires, with the target column's name and slug."
      },
      "WorkflowRuleRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the workflow rule.",
            "example": "vqjwk6a90kv81dixs3ndtyqd"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the rule belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "integrationType": {
            "type": "string",
            "description": "Integration whose events the rule handles: `github`, `gitlab`, `gitea` or `tangled`.",
            "example": "github"
          },
          "eventType": {
            "type": "string",
            "description": "Integration event that triggers the rule: `branch_push`, `pr_opened`, `pr_merged`, `issue_opened`, `issue_closed` or `issue_reopened`.",
            "example": "pr_merged"
          },
          "columnId": {
            "type": "string",
            "description": "ID of the column tasks are moved to when the event fires.",
            "example": "m4e9zz9dn4huwwyxp542ewhm"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the rule was created, in UTC.",
            "example": "2026-10-03T12:15:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the rule was last changed, such as a new target column, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "integrationType",
          "eventType",
          "columnId",
          "createdAt",
          "updatedAt"
        ],
        "description": "A workflow rule as stored, without target column details."
      },
      "PendingInvitation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the invitation.",
            "example": "mjblnmjeznypc1wu03lscipk"
          },
          "email": {
            "type": "string",
            "description": "Email address the invitation was sent to.",
            "example": "jane@example.com"
          },
          "workspaceId": {
            "type": "string",
            "description": "ID of the workspace the invitation is for.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          },
          "workspaceName": {
            "type": "string",
            "description": "Name of the workspace the invitation is for.",
            "example": "Acme"
          },
          "inviterName": {
            "type": "string",
            "description": "Display name of the user who sent the invitation.",
            "example": "Sam Lee"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the invitation expires, in UTC.",
            "example": "2026-12-08T10:42:00.000Z"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the invitation was sent, in UTC.",
            "example": "2026-12-01T10:42:00.000Z"
          },
          "status": {
            "type": "string",
            "description": "Always `pending` here; expired and accepted ones are filtered out.",
            "example": "pending"
          }
        },
        "required": [
          "id",
          "email",
          "workspaceId",
          "workspaceName",
          "inviterName",
          "expiresAt",
          "createdAt",
          "status"
        ],
        "description": "An invitation to join a workspace that the current user can still accept."
      },
      "InvitationDetails": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "True only when the invitation can still be accepted.",
            "example": true
          },
          "invitation": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "ID of the invitation.",
                "example": "mjblnmjeznypc1wu03lscipk"
              },
              "email": {
                "type": "string",
                "description": "Email address the invitation was sent to.",
                "example": "jane@example.com"
              },
              "workspaceName": {
                "type": "string",
                "description": "Name of the workspace the invitation is for.",
                "example": "Acme"
              },
              "inviterName": {
                "type": "string",
                "description": "Display name of the user who sent the invitation.",
                "example": "Sam Lee"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "description": "Time the invitation expires, in UTC.",
                "example": "2026-12-08T10:42:00.000Z"
              },
              "status": {
                "type": "string",
                "description": "Status of the invitation as stored, normally `pending`. Accepted and canceled invitations never include this object.",
                "example": "pending"
              },
              "expired": {
                "type": "boolean",
                "description": "True when `expiresAt` has passed. An expired invitation is returned with `valid` set to false.",
                "example": false
              }
            },
            "required": [
              "id",
              "email",
              "workspaceName",
              "inviterName",
              "expiresAt",
              "status",
              "expired"
            ],
            "description": "Omitted when the invitation does not exist, belongs to an archived workspace, was already accepted, or was canceled -- the details are withheld rather than leaked. Included for an expired invitation."
          },
          "error": {
            "type": "string",
            "description": "Why the invitation is unusable, when valid is false: `Invitation not found`, `This invitation has already been accepted`, `This invitation has been canceled` or `This invitation has expired`.",
            "example": "This invitation has expired"
          }
        },
        "required": [
          "valid"
        ],
        "description": "Whether an invitation can be accepted, with its details when they can be shown."
      },
      "Workspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the workspace.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          },
          "name": {
            "type": "string",
            "description": "Display name of the workspace.",
            "example": "Acme"
          },
          "slug": {
            "type": "string",
            "description": "URL-friendly identifier of the workspace, unique across the instance.",
            "example": "acme"
          },
          "logo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Logo of the workspace as stored. Null when none is set.",
            "example": "https://example.com/acme-logo.png"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of the workspace. When the description is empty, a non-empty `description` value in the workspace metadata is used instead. Null when neither is set.",
            "example": "Product and engineering work for Acme."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the workspace was created, in UTC.",
            "example": "2026-03-14T09:00:00.000Z"
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "description": "The caller's workspace role: a built-in role (owner, admin, member, viewer) or the name of a custom role defined in the workspace. Several roles are comma-separated, for example owner,viewer. Null when an instance admin views a workspace they are not a member of.",
            "example": "owner"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "logo",
          "description",
          "createdAt",
          "role"
        ],
        "description": "A workspace, the top-level container for projects, members and settings, together with the caller's role in it."
      },
      "WorkspaceMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the user.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "name": {
            "type": "string",
            "description": "Display name of the user.",
            "example": "Jane Doe"
          },
          "email": {
            "type": "string",
            "description": "Email address of the user.",
            "example": "jane@example.com"
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the user's profile picture: an uploaded avatar under `/api/user/avatar/{id}` or a URL from a sign-in provider. Null when none is set.",
            "example": "/api/user/avatar/yodwh0iimi26g59fib7eqzer"
          },
          "role": {
            "type": "string",
            "description": "The member's workspace role: a built-in role (owner, admin, member, viewer) or the name of a custom role defined in the workspace. Several roles are comma-separated, for example owner,viewer.",
            "example": "member"
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "image",
          "role"
        ],
        "description": "A member of a workspace and their role in it."
      },
      "MemberProjectAccess": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "ID of the member.",
            "example": "dvbh5d4ue1zvi3duyefsoqma"
          },
          "projectAccess": {
            "type": "string",
            "enum": [
              "all",
              "selected"
            ],
            "description": "Project access mode. `all` means the member can access every project in the workspace, including projects created later. `selected` means the member can access only the projects in `projectIds`.",
            "example": "selected"
          },
          "projectIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the projects the member can access when `projectAccess` is `selected`. Always empty when `projectAccess` is `all`.",
            "example": [
              "cef5d6uaajgxwpe38vkp4khl"
            ]
          }
        },
        "required": [
          "userId",
          "projectAccess",
          "projectIds"
        ],
        "description": "Which projects of a workspace a member can access: every project, or a selected list."
      },
      "WorkspaceCapabilities": {
        "type": "object",
        "properties": {
          "readQuills": {
            "type": "boolean",
            "description": "Whether the caller can read customer support data. True when the caller's roles grant `workspace:read` and `quills:read`.",
            "example": true
          },
          "createQuills": {
            "type": "boolean",
            "description": "Whether the caller can create customer support records. True when the caller's roles grant `workspace:read` and `quills:create`.",
            "example": true
          },
          "updateQuills": {
            "type": "boolean",
            "description": "Whether the caller can change customer support records. True when the caller's roles grant `workspace:read` and `quills:update`.",
            "example": true
          },
          "deleteQuills": {
            "type": "boolean",
            "description": "Whether the caller can delete customer support records. True when the caller's roles grant `workspace:read` and `quills:delete`.",
            "example": true
          },
          "manageQuillsSettings": {
            "type": "boolean",
            "description": "Whether the caller can change customer support settings. True when the caller's roles grant `workspace:read` and `quills:manage_settings`.",
            "example": true
          },
          "viewQuillsRevenue": {
            "type": "boolean",
            "description": "Whether the caller can see customer revenue, such as company MRR, in customer support. True when the caller's roles grant `workspace:read` and `quills:view_revenue`.",
            "example": true
          },
          "commentInternalQuills": {
            "type": "boolean",
            "description": "Whether the caller can write internal notes and mentions in customer support. True when the caller's roles grant `workspace:read` and `quills:comment_internal`.",
            "example": true
          },
          "manageProjects": {
            "type": "boolean",
            "description": "Whether the caller can create, change and delete projects. True when the caller's roles grant `project:create`, `project:update` and `project:delete`.",
            "example": true
          },
          "createProjects": {
            "type": "boolean",
            "description": "Whether the caller can create projects. True when the caller's roles grant `project:create`.",
            "example": true
          },
          "updateProjects": {
            "type": "boolean",
            "description": "Whether the caller can change projects. True when the caller's roles grant `project:update`.",
            "example": true
          },
          "shareProjects": {
            "type": "boolean",
            "description": "Whether the caller can make projects public and manage project calendar feeds. True when the caller's roles grant `project:share`.",
            "example": true
          },
          "deleteProjects": {
            "type": "boolean",
            "description": "Whether the caller can delete projects. True when the caller's roles grant `project:delete`.",
            "example": true
          },
          "updateTasks": {
            "type": "boolean",
            "description": "Whether the caller can change tasks. True when the caller's roles grant `task:update`.",
            "example": true
          },
          "createTasks": {
            "type": "boolean",
            "description": "Whether the caller can create tasks. True when the caller's roles grant `task:create`.",
            "example": true
          },
          "deleteTasks": {
            "type": "boolean",
            "description": "Whether the caller can delete tasks. True when the caller's roles grant `task:delete`.",
            "example": true
          },
          "assignTasks": {
            "type": "boolean",
            "description": "Whether the caller can assign tasks. True when the caller's roles grant `task:assign`.",
            "example": true
          },
          "createLabels": {
            "type": "boolean",
            "description": "Whether the caller can create labels. True when the caller's roles grant `label:create`.",
            "example": true
          },
          "updateLabels": {
            "type": "boolean",
            "description": "Whether the caller can change labels. True when the caller's roles grant `label:update`.",
            "example": true
          },
          "deleteLabels": {
            "type": "boolean",
            "description": "Whether the caller can delete labels. True when the caller's roles grant `label:delete`.",
            "example": true
          },
          "manageWorkspace": {
            "type": "boolean",
            "description": "Whether the caller can change the workspace and its settings. True when the caller's roles grant `workspace:update` and `workspace:manage_settings`.",
            "example": true
          },
          "manageSettings": {
            "type": "boolean",
            "description": "Whether the caller can change workspace settings. True when the caller's roles grant `workspace:manage_settings`.",
            "example": true
          },
          "deleteWorkspace": {
            "type": "boolean",
            "description": "Whether the caller can delete the workspace. True when the caller's roles grant `workspace:delete`.",
            "example": true
          },
          "inviteUsers": {
            "type": "boolean",
            "description": "Whether the caller can invite people to the workspace. True when the caller's roles grant `invitation:create`.",
            "example": true
          },
          "manageTeam": {
            "type": "boolean",
            "description": "Whether the caller can change and remove members. True when the caller's roles grant `member:update` and `member:delete`.",
            "example": true
          },
          "updateMembers": {
            "type": "boolean",
            "description": "Whether the caller can change members, such as their project access. True when the caller's roles grant `member:update`.",
            "example": true
          },
          "removeMembers": {
            "type": "boolean",
            "description": "Whether the caller can remove members from the workspace. True when the caller's roles grant `member:delete`.",
            "example": true
          }
        },
        "required": [
          "readQuills",
          "createQuills",
          "updateQuills",
          "deleteQuills",
          "manageQuillsSettings",
          "viewQuillsRevenue",
          "commentInternalQuills",
          "manageProjects",
          "createProjects",
          "updateProjects",
          "shareProjects",
          "deleteProjects",
          "updateTasks",
          "createTasks",
          "deleteTasks",
          "assignTasks",
          "createLabels",
          "updateLabels",
          "deleteLabels",
          "manageWorkspace",
          "manageSettings",
          "deleteWorkspace",
          "inviteUsers",
          "manageTeam",
          "updateMembers",
          "removeMembers"
        ],
        "description": "Whether the caller's roles (and API key scope, if any) allow each named action in the workspace. Mirrors the checks the API enforces."
      },
      "OidcGroupRoleMapping": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the mapping.",
            "example": "kz3m0x8q2v7d1c4b9n6w5r0t"
          },
          "workspaceId": {
            "type": "string",
            "description": "ID of the workspace the mapping belongs to.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          },
          "groupName": {
            "type": "string",
            "description": "Name of the OIDC group, as sent by the identity provider. Unique within the workspace.",
            "example": "engineering"
          },
          "role": {
            "type": "string",
            "description": "Workspace role mapped to the group: a built-in role (owner, admin, member, viewer) or the name of a custom role, stored as given.",
            "example": "admin"
          },
          "priority": {
            "type": "integer",
            "description": "Priority of the mapping, from 0 to 1000. Mappings are listed from highest to lowest priority.",
            "example": 10
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the mapping was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the mapping was last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "groupName",
          "role",
          "priority",
          "createdAt",
          "updatedAt"
        ],
        "description": "A rule that maps an OIDC group from the identity provider to a workspace role."
      },
      "QuillsBrand": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The brand's ID",
            "example": "brand_01m8rxxee8esga9vdmcy42kw02"
          },
          "name": {
            "type": "string",
            "description": "The brand's display name. Branded emails use it as the default heading and the logo's alt text, and as the sender name when fromName is null.",
            "example": "Acme Support"
          },
          "slug": {
            "type": "string",
            "description": "The brand's URL-safe identifier: lowercase letters, digits and hyphens, unique in the workspace",
            "example": "acme-support"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the workspace's default brand. At most one brand is the default.",
            "example": true
          },
          "primaryColor": {
            "type": "string",
            "description": "The #rrggbb color of buttons in branded emails",
            "example": "#4f46e5"
          },
          "accentColor": {
            "type": "string",
            "description": "The #rrggbb color of headings in branded emails",
            "example": "#111827"
          },
          "logoKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "The storage key of the logo, an image uploaded to this workspace. Null: no logo."
          },
          "darkLogoKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "The storage key of the logo for dark mode, an image uploaded to this workspace. Null: the light logo only.",
            "example": null
          },
          "fromName": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sender name of the brand's emails. Null: the brand name.",
            "example": "Acme Support"
          },
          "fromEmail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The sender address of the brand's emails; its domain must be a verified sending domain. Null: the instance's default sender.",
            "example": "support@example.com"
          },
          "replyTo": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Reply-To address of the brand's emails. Null: none.",
            "example": "help@example.com"
          },
          "footerText": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text in the footer of the brand's emails. Null: none.",
            "example": "Acme Inc., 1 Example Street, Springfield"
          },
          "hidePoweredBy": {
            "type": "boolean",
            "description": "Whether the brand's emails leave out the \"Powered by\" footer line",
            "example": false
          },
          "createdAt": {
            "type": "string",
            "description": "When the brand was created (ISO 8601)",
            "example": "2026-11-30T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "When the brand last changed (ISO 8601)",
            "example": "2026-11-30T14:05:00.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "isDefault",
          "primaryColor",
          "accentColor",
          "logoKey",
          "darkLogoKey",
          "fromName",
          "fromEmail",
          "replyTo",
          "footerText",
          "hidePoweredBy",
          "createdAt",
          "updatedAt"
        ],
        "description": "A brand: colors, logos and sender identity for branded email"
      },
      "QuillsEmailTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The template's ID",
            "example": "email_template_01m8rxxee8esga9vdwhjg6dy5h"
          },
          "brandId": {
            "type": "string",
            "description": "The brand the template belongs to",
            "example": "brand_01m8rxxee8esga9vdmcy42kw02"
          },
          "templateKey": {
            "type": "string",
            "description": "The template's key: lowercase letters, digits, dots, underscores and hyphens. One template exists per brand, key and locale.",
            "example": "ticket.reply"
          },
          "locale": {
            "type": "string",
            "description": "The template's language tag",
            "example": "en"
          },
          "subject": {
            "type": "string",
            "description": "The subject line. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
            "example": "We replied to your request"
          },
          "mode": {
            "type": "string",
            "enum": [
              "blocks",
              "html"
            ],
            "description": "blocks: the email is built from blocksJson. html: the email body is htmlBody, cleaned against an allowlist of tags and attributes.",
            "example": "blocks"
          },
          "blocksJson": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "A client-chosen ID of the block, unique in the template",
                  "example": "intro"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "header",
                    "text",
                    "button",
                    "divider",
                    "footer"
                  ],
                  "description": "The block kind. header: a heading under the brand logo (content defaults to the brand name). text: a paragraph; line breaks are kept. button: a link button in the primary color. divider: a horizontal rule. footer: small print.",
                  "example": "text"
                },
                "content": {
                  "type": "string",
                  "maxLength": 5000,
                  "description": "The text of a header, text or footer block. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                  "example": "Hi {{name}}, we replied to your request."
                },
                "label": {
                  "type": "string",
                  "maxLength": 120,
                  "description": "The label of a button block. Absent: Open. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                  "example": "View the reply"
                },
                "url": {
                  "type": "string",
                  "maxLength": 2048,
                  "description": "The link of a button block. Placeholders are replaced first; a link that is not http, https or mailto renders as #.",
                  "example": "https://help.example.com/requests/{{ticketNumber}}"
                },
                "align": {
                  "type": "string",
                  "enum": [
                    "left",
                    "center",
                    "right"
                  ],
                  "description": "The block's alignment. Absent: left. Dividers ignore it.",
                  "example": "left"
                }
              },
              "required": [
                "id",
                "type"
              ]
            },
            "description": "The blocks of a blocks-mode template, in order"
          },
          "htmlBody": {
            "type": [
              "string",
              "null"
            ],
            "description": "The HTML body in html mode. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty. Null when none is set.",
            "example": null
          },
          "updatedAt": {
            "type": "string",
            "description": "When the template last changed (ISO 8601)",
            "example": "2026-11-30T14:05:00.000Z"
          }
        },
        "required": [
          "id",
          "brandId",
          "templateKey",
          "locale",
          "subject",
          "mode",
          "blocksJson",
          "htmlBody",
          "updatedAt"
        ],
        "description": "A brand's email template"
      },
      "QuillsWebsiteBranding": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "domain": {
            "type": "string",
            "description": "The website's domain that the lookup reads, or would read",
            "example": "example.com"
          },
          "status": {
            "type": "string",
            "enum": [
              "eligible",
              "offered",
              "applied",
              "declined",
              "undone",
              "skipped",
              "failed"
            ],
            "description": "eligible: no lookup ran and POST /settings/website-branding/start would run for the caller. offered: a logo was found and waits for accept or decline. applied: the logo was accepted. declined: the offer was declined. undone: the applied branding was undone. skipped: the workspace already had a logo. failed: no usable logo was found.",
            "example": "offered"
          },
          "logoUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "A short-lived URL of the logo, while it is offered or applied. Null otherwise.",
            "example": "https://storage.example.com/logo.png?X-Amz-Expires=900"
          },
          "colorApplied": {
            "type": "boolean",
            "description": "Whether accept also set the website's color as the theme's primary color",
            "example": false
          },
          "canUndo": {
            "type": "boolean",
            "description": "Whether POST /settings/website-branding/undo can restore the previous values",
            "example": false
          },
          "canUse": {
            "type": "boolean",
            "description": "Whether POST /settings/website-branding/accept can apply the offered logo",
            "example": true
          }
        },
        "required": [
          "domain",
          "status",
          "logoUrl",
          "colorApplied",
          "canUndo",
          "canUse"
        ],
        "description": "The lookup to show. Null when there is nothing to show: no lookup and none would start, an offer answered by a logo set by hand, or an applied change that was edited since or is more than 3 days old."
      },
      "QuillsWebhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Webhook ID (TypeID).",
            "example": "webhook_01m8rz8mp2eshrhd0a8nhmyenk"
          },
          "url": {
            "type": "string",
            "description": "URL that receives the deliveries, as normalized when saved.",
            "example": "https://hooks.example.com/support"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Event types the webhook receives.",
            "example": [
              "post.created",
              "post.status_changed",
              "comment.created"
            ]
          },
          "boardIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Board IDs (TypeIDs) that limit deliveries about posts and comments to those boards. Null when there's no board filter. Events that aren't about a board are always delivered.",
            "example": [
              "board_01m8rz8mp3eshrhd0rsxjkejgn"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disabled"
            ],
            "description": "Whether the webhook gets deliveries. `active`: new events are delivered; `disabled`: nothing is delivered and queued deliveries are skipped.",
            "example": "active"
          },
          "failureCount": {
            "type": "number",
            "description": "Number of failed delivery attempts in a row. Reset to 0 by a successful delivery or by setting `status` to `active`.",
            "example": 0
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error of the latest failed delivery attempt, for example `HTTP 500` or `Destination is not a public address`. Null after a successful delivery or when the webhook is turned back on.",
            "example": null
          },
          "lastTriggeredAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Time of the latest queued delivery attempt, successful or not, in ISO 8601 UTC. Test sends don't change it. Null before the first delivery.",
            "example": "2026-03-14T09:26:53.000Z"
          },
          "createdAt": {
            "type": "string",
            "description": "Time the webhook was created, in ISO 8601 UTC. The webhook receives only events that occurred after this time.",
            "example": "2026-03-01T15:04:12.000Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "Time the webhook's settings or secret last changed, in ISO 8601 UTC.",
            "example": "2026-03-10T08:30:00.000Z"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "boardIds",
          "status",
          "failureCount",
          "lastError",
          "lastTriggeredAt",
          "createdAt",
          "updatedAt"
        ],
        "description": "An outgoing webhook of the workspace. Its signing secret is never included; it's shown only when the webhook is created or its secret is rotated."
      },
      "QuillsWebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Delivery attempt ID (TypeID).",
            "example": "webhook_delivery_01m8rz8mp3eshrhd0kwm636acn"
          },
          "webhookId": {
            "type": "string",
            "description": "ID of the webhook the attempt was sent to (TypeID).",
            "example": "webhook_01m8rz8mp2eshrhd0a8nhmyenk"
          },
          "eventId": {
            "type": "string",
            "description": "ID of the delivered event, the `id` in the delivery body. A test send has a `test_` ID that matches no event.",
            "example": "evt_01m8rzadndf21vwmg1q6myz3ar"
          },
          "eventType": {
            "type": "string",
            "description": "Type of the delivered event, or `webhook.test` for a test send.",
            "example": "post.status_changed"
          },
          "attempt": {
            "type": "number",
            "description": "Attempt number of the delivery job, starting at 1. A test send is always 1.",
            "example": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "succeeded",
              "failed",
              "retrying"
            ],
            "description": "Outcome of the attempt. `succeeded`: the receiver answered 2xx; `failed`: the attempt failed and won't be retried; `retrying`: the attempt failed and another is scheduled.",
            "example": "succeeded"
          },
          "httpStatus": {
            "type": [
              "number",
              "null"
            ],
            "description": "HTTP status code the receiver answered with. Null when no response arrived, for example after a timeout or a refused destination.",
            "example": 200
          },
          "durationMs": {
            "type": [
              "number",
              "null"
            ],
            "description": "Time the attempt took, in milliseconds.",
            "example": 182
          },
          "responseSnippet": {
            "type": [
              "string",
              "null"
            ],
            "description": "Start of the receiver's response body, up to 2,048 characters. Null when no response was read.",
            "example": "{\"ok\":true}"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the attempt failed, for example `HTTP 503`, `Destination is not a public address` or `Webhook outcome uncertain; not sent again`. Null when it succeeded.",
            "example": null
          },
          "deliveredAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Time the receiver accepted the delivery, in ISO 8601 UTC. Null unless `status` is `succeeded`.",
            "example": "2026-03-14T09:26:53.000Z"
          },
          "createdAt": {
            "type": "string",
            "description": "Time the attempt was logged, in ISO 8601 UTC.",
            "example": "2026-03-14T09:26:53.000Z"
          }
        },
        "required": [
          "id",
          "webhookId",
          "eventId",
          "eventType",
          "attempt",
          "status",
          "httpStatus",
          "durationMs",
          "responseSnippet",
          "error",
          "deliveredAt",
          "createdAt"
        ],
        "description": "One attempt to send an event, or a test event, to a webhook. Each retry is a separate attempt."
      },
      "QuillsNotification": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Notification ID (TypeID).",
            "example": "notification_01m8rz8mp3eshrhd1cxk5hp2pk"
          },
          "type": {
            "type": "string",
            "description": "Kind of notification, for example `comment_created`, `post_status_changed` or `task_create_failed`. The same keys name the types in the notification preferences matrix.",
            "example": "comment_created"
          },
          "title": {
            "type": "string",
            "description": "Short heading of the notification.",
            "example": "New comment on Dark mode for the dashboard"
          },
          "body": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text of the notification. Null when it has only a title.",
            "example": "Jordan Lee: This would help our night shift a lot."
          },
          "postId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the feedback post the notification is about (TypeID). Null when it isn't about a post or the post is hidden from the caller.",
            "example": "post_01m8rz8mp3eshrhd1nt2x5sfqm"
          },
          "commentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the comment the notification is about (TypeID). Null when it isn't about a comment or the post is hidden from the caller.",
            "example": "post_comment_01m8rz8mp3eshrhd1wpq1mqfd9"
          },
          "readAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Time the caller marked the notification as read, in ISO 8601 UTC. Null while it's unread.",
            "example": null
          },
          "createdAt": {
            "type": "string",
            "description": "Time the notification was created, in ISO 8601 UTC.",
            "example": "2026-03-14T09:26:53.000Z"
          },
          "post": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Post ID (TypeID).",
                "example": "post_01m8rz8mp3eshrhd1nt2x5sfqm"
              },
              "title": {
                "type": "string",
                "description": "Current title of the post.",
                "example": "Dark mode for the dashboard"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "description": "The post the notification is about, with its current title. Null when it isn't about a post or the post is hidden from the caller."
          }
        },
        "required": [
          "id",
          "type",
          "title",
          "body",
          "postId",
          "commentId",
          "readAt",
          "createdAt",
          "post"
        ],
        "description": "An in-app notification sent to the caller. A notification about a post that was deleted, or whose board the caller can no longer see, keeps its row but shows the title `Notification`, the body `This activity is no longer visible to you.` and no post or comment."
      },
      "QuillsNotificationPreferences": {
        "type": "object",
        "properties": {
          "emailStatusChange": {
            "type": "boolean",
            "description": "Whether the caller is emailed when a followed post's status changes (`post_status_changed`). Used only when neither the matrix nor the workspace defaults set the email channel for that type.",
            "example": true
          },
          "emailNewComment": {
            "type": "boolean",
            "description": "Whether the caller is emailed about new comments on followed posts (`comment_created`). Used only when neither the matrix nor the workspace defaults set the email channel for that type.",
            "example": true
          },
          "emailMuted": {
            "type": "boolean",
            "description": "Whether every notification email and the digest are turned off for the caller, whatever the other settings.",
            "example": false
          },
          "digestFrequency": {
            "type": "string",
            "enum": [
              "off",
              "hourly",
              "daily"
            ],
            "description": "How often the caller's unread in-app notifications are summarized in a digest. `off`: no digest; `hourly`: at most once an hour; `daily`: at most once a day. A digest covers up to 25 unread, unarchived notifications created since the previous one, and is skipped when there are none or `emailMuted` is true.",
            "example": "daily"
          },
          "matrix": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Notification type the override applies to, the same key as a notification's `type`, for example `comment_created`, `post_status_changed`, `conversation_assigned`, `ticket_assigned`, `note_mention` or `ticket_watch`.",
                  "example": "comment_created"
                },
                "inApp": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the caller gets this type in the in-app inbox. Null when the caller hasn't overridden this channel, so the workspace default applies, then the built-in default.",
                  "example": true
                },
                "email": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the caller gets this type by email. Null when the caller hasn't overridden this channel, so the workspace default applies, then the built-in default.",
                  "example": false
                },
                "push": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the caller gets this type as a mobile push notification. Null when the caller hasn't overridden this channel, so the workspace default applies, then the built-in default.",
                  "example": null
                },
                "slackDm": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "description": "Whether the caller gets this type as a Slack direct message. Null when the caller hasn't overridden this channel, so the workspace default applies, then the built-in default.",
                  "example": null
                }
              },
              "required": [
                "type",
                "inApp",
                "email",
                "push",
                "slackDm"
              ],
              "description": "The caller's saved overrides for one notification type."
            },
            "description": "The caller's saved per-type channel overrides, one entry per type. Types that aren't listed use the workspace defaults, then the built-in defaults."
          }
        },
        "required": [
          "emailStatusChange",
          "emailNewComment",
          "emailMuted",
          "digestFrequency",
          "matrix"
        ],
        "description": "The caller's own notification settings in this workspace. For each type and channel, a matrix override wins, then the workspace default, then the built-in default: mentions and direct assignments on every channel; team routing, unassigned conversations and ticket watches in-app only; failing webhooks in-app and by email; other types in-app and by email, but not push or Slack. `emailMuted` stops email first."
      },
      "QuillsTag": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Post tag ID",
            "example": "post_tag_01jd3k8m2q5r7t9v1w3x5y7z9a"
          },
          "name": {
            "type": "string",
            "description": "Tag name, unique in the workspace without regard to case",
            "example": "Integrations"
          },
          "color": {
            "type": "string",
            "description": "Color as a six-digit hex code in `#RRGGBB` form",
            "example": "#6b7280"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tag description, or null when the tag has none",
            "example": "Requests about third-party integrations"
          },
          "aiPrompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Matching rule for AI auto-tagging: a plain-language description of the posts that this tag fits. Null when none is set.",
            "example": "Posts that ask for a connection to another tool"
          },
          "isPublic": {
            "type": "boolean",
            "description": "Whether customers see the tag. False makes it internal: portal and widget viewers never see it in filter lists or on posts, while teammates see every tag."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the tag was created",
            "example": "2026-11-18T14:32:05.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "description",
          "aiPrompt",
          "isPublic",
          "createdAt"
        ]
      },
      "QuillsStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Post status ID",
            "example": "post_status_01jd3k8m2q5r7t9v1w3x5y7z9a"
          },
          "name": {
            "type": "string",
            "description": "Status name",
            "example": "In progress"
          },
          "slug": {
            "type": "string",
            "description": "Stable key of the status: lowercase letters, digits and underscores, unique in the workspace",
            "example": "in_progress"
          },
          "color": {
            "type": "string",
            "description": "Color as a six-digit hex code in `#RRGGBB` form",
            "example": "#3b82f6"
          },
          "category": {
            "type": "string",
            "enum": [
              "active",
              "complete",
              "closed"
            ],
            "description": "Status group. `active`: open work. `complete`: shipped. `closed`: no longer pursued, for example declined.",
            "example": "active"
          },
          "position": {
            "type": "number",
            "description": "Sort position within the category, lowest first. Reordering sets it to the status's 0-based index in the new order.",
            "example": 2
          },
          "showOnRoadmap": {
            "type": "boolean",
            "description": "Whether posts in this status show on the public roadmap. A new column roadmap also starts with one column per status that has it."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the default status, which new posts get when none is named. At most one status is the default."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the status was created",
            "example": "2026-11-18T14:32:05.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "color",
          "category",
          "position",
          "showOnRoadmap",
          "isDefault",
          "createdAt"
        ]
      },
      "QuillsRoadmap": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Roadmap ID",
            "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
          },
          "name": {
            "type": "string",
            "description": "Roadmap name",
            "example": "Product roadmap"
          },
          "slug": {
            "type": "string",
            "description": "URL slug of the roadmap, unique in the workspace",
            "example": "product-roadmap"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Roadmap description, or null when it has none",
            "example": "What we are working on next"
          },
          "type": {
            "type": "string",
            "enum": [
              "column",
              "date"
            ],
            "description": "`column`: one column per chosen post status. `date`: posts grouped into date buckets by their ETA; no columns."
          },
          "baseFilter": {
            "type": "object",
            "properties": {
              "statusIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Only posts in one of these post statuses",
                "example": [
                  "post_status_03m8n0q4s6v9w1x3y5z7a9b2c4"
                ]
              },
              "boardIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Only posts on one of these boards",
                "example": [
                  "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                ]
              },
              "tagIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Only posts with at least one of these tags",
                "example": [
                  "post_tag_04n9p1r5t7w0x2y4z6a8b0c3d5"
                ]
              },
              "segmentIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Only posts whose author is in one of these segments",
                "example": [
                  "segment_05p0q2s6v8x1y3z5a7b9c1d4e6"
                ]
              }
            },
            "description": "Stored filter that limits which posts the roadmap shows. Every list that is present and not empty must match; a post matches a list when it matches any ID in it. It can name internal tags."
          },
          "dateSource": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "eta",
              null
            ],
            "description": "Post date that places posts in date buckets: `eta` for a date roadmap, null for a column roadmap"
          },
          "frequency": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "monthly",
              "quarterly",
              "semiannual",
              null
            ],
            "description": "Bucket size of a date roadmap. `monthly`: calendar months. `quarterly`: three-month quarters. `semiannual`: half years. Null for a column roadmap."
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "team",
              "segment"
            ],
            "description": "Who sees the roadmap on the portal. `public`: every portal viewer. `team`: teammates only; it never shows on the portal. `segment`: signed-in customers in one of `visibleSegmentIds`."
          },
          "visibleSegmentIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Segment IDs whose signed-in members see a `segment` roadmap. Null for other visibilities.",
            "example": [
              "segment_05p0q2s6v8x1y3z5a7b9c1d4e6"
            ]
          },
          "position": {
            "type": "number",
            "description": "Sort position among the workspace's roadmaps, lowest first",
            "example": 0
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuillsRoadmapColumn"
            },
            "description": "Columns in position order. Empty for a date roadmap."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the roadmap was created",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the roadmap's settings were last changed",
            "example": "2026-11-20T09:15:42.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "description",
          "type",
          "baseFilter",
          "dateSource",
          "frequency",
          "visibility",
          "visibleSegmentIds",
          "position",
          "columns",
          "createdAt",
          "updatedAt"
        ]
      },
      "QuillsRoadmapColumn": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Roadmap column ID",
            "example": "roadmap_col_01jd3k8m2q5r7t9v1w3x5y7z9a"
          },
          "roadmapId": {
            "type": "string",
            "description": "ID of the roadmap that the column belongs to",
            "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
          },
          "statusId": {
            "type": "string",
            "description": "ID of the post status whose posts the column shows",
            "example": "post_status_03m8n0q4s6v9w1x3y5z7a9b2c4"
          },
          "name": {
            "type": "string",
            "description": "Column name",
            "example": "In progress"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short icon identifier of the column, or null for none"
          },
          "color": {
            "type": "string",
            "description": "Column color, such as a hex code",
            "example": "#3b82f6"
          },
          "position": {
            "type": "number",
            "description": "Sort position of the column in its roadmap, lowest first",
            "example": 1
          }
        },
        "required": [
          "id",
          "roadmapId",
          "statusId",
          "name",
          "icon",
          "color",
          "position"
        ]
      },
      "QuillsChangelogCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Changelog category ID",
            "example": "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9e"
          },
          "name": {
            "type": "string",
            "description": "Category name, unique in the workspace regardless of case",
            "example": "Improvement"
          },
          "color": {
            "type": "string",
            "description": "Category color as a hex code",
            "example": "#3b82f6"
          },
          "segmentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the customer segments that may see entries in this category. Empty: no restriction. Otherwise an entry in the category shows only to signed-in members of one of these segments.",
            "example": [
              "segment_01jd3k8m2q5r7t9v1w3x5y7z9b"
            ]
          },
          "position": {
            "type": "number",
            "description": "Sort position, starting at 0; lower comes first",
            "example": 2
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the category was created, in ISO 8601 UTC",
            "example": "2026-09-01T10:00:00.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "segmentIds",
          "position",
          "createdAt"
        ]
      },
      "QuillsChangelogSettings": {
        "type": "object",
        "properties": {
          "audience": {
            "type": "string",
            "enum": [
              "public",
              "authenticated"
            ],
            "description": "Who can read the portal changelog. `public`: anyone, signed in or not. `authenticated`: signed-in customers only. Defaults to `public`."
          },
          "collaborationDisabled": {
            "type": "boolean",
            "description": "Stored collaboration flag. Defaults to false; the update operation does not change it."
          },
          "autoSubscribe": {
            "type": "boolean",
            "description": "Whether customers identified through the widget are subscribed to the changelog automatically. A customer who unsubscribed is never subscribed again. Defaults to true."
          },
          "emailsDisabled": {
            "type": "boolean",
            "description": "Changelog email preference. It is stored and returned, but it does not stop the shipped notices sent when an entry is published; use `notify` on the entry for that. Defaults to false."
          },
          "widgetAutoOpen": {
            "type": "boolean",
            "description": "The widget opens the newest unread entry on a customer's next visit, once. Off by default."
          }
        },
        "required": [
          "audience",
          "collaborationDisabled",
          "autoSubscribe",
          "emailsDisabled",
          "widgetAutoOpen"
        ]
      },
      "QuillsChangelogEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Changelog entry ID",
            "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9a"
          },
          "title": {
            "type": "string",
            "description": "Entry title",
            "example": "Faster board filters"
          },
          "content": {
            "type": "string",
            "description": "Entry body in Markdown",
            "example": "Filters now apply instantly, even on boards with thousands of posts."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "published"
            ],
            "description": "Publish state, derived from `publishedAt`. `draft`: no publish time; hidden from customers. `scheduled`: publish time in the future; goes live then. `published`: publish time now or in the past; visible to customers who can see the changelog."
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Publish time in ISO 8601 UTC: past for a published entry, future for a scheduled one. Null for a draft.",
            "example": "2026-11-19T09:10:00.000Z"
          },
          "displayDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Date shown to readers instead of the publish date, in ISO 8601 UTC. Null when the publish date is shown.",
            "example": "2026-11-15T00:00:00.000Z"
          },
          "segmentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the customer segments that may see the entry. Empty: everyone who can see the changelog. Otherwise only signed-in members of one of these segments.",
            "example": [
              "segment_01jd3k8m2q5r7t9v1w3x5y7z9b"
            ]
          },
          "viewCount": {
            "type": "number",
            "description": "Times customers viewed the entry",
            "example": 860
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the entry was created, in ISO 8601 UTC",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the entry last changed, in ISO 8601 UTC",
            "example": "2026-11-19T09:10:00.000Z"
          },
          "author": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Author's principal ID",
                "example": "principal_01jd3k8m2q5r7t9v1w3x5y7z9c"
              },
              "name": {
                "type": "string",
                "description": "Author's display name",
                "example": "Ada Park"
              },
              "avatarUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Author's avatar image URL. Null when there is none.",
                "example": "https://cdn.example.com/avatars/ada.png"
              }
            },
            "required": [
              "id",
              "name",
              "avatarUrl"
            ],
            "description": "Teammate who created the entry. Null when unknown or the author has no display name."
          },
          "linkedPosts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Post ID",
                  "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9d"
                },
                "title": {
                  "type": "string",
                  "description": "Post title",
                  "example": "Filter posts by tag"
                },
                "voteCount": {
                  "type": "number",
                  "description": "Post's vote count",
                  "example": 57
                },
                "status": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Status name",
                      "example": "Shipped"
                    },
                    "color": {
                      "type": "string",
                      "description": "Status color as a hex code",
                      "example": "#22c55e"
                    }
                  },
                  "required": [
                    "name",
                    "color"
                  ],
                  "description": "Post's status. Null when it has none."
                }
              },
              "required": [
                "id",
                "title",
                "voteCount",
                "status"
              ]
            },
            "description": "Feedback posts the entry announces, in the order they were linked. Posts the caller cannot see are left out."
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Changelog category ID",
                  "example": "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9e"
                },
                "name": {
                  "type": "string",
                  "description": "Category name",
                  "example": "Improvement"
                },
                "color": {
                  "type": "string",
                  "description": "Category color as a hex code",
                  "example": "#3b82f6"
                }
              },
              "required": [
                "id",
                "name",
                "color"
              ]
            },
            "description": "Categories of the entry, in category order"
          }
        },
        "required": [
          "id",
          "title",
          "content",
          "status",
          "publishedAt",
          "displayDate",
          "segmentIds",
          "viewCount",
          "createdAt",
          "updatedAt",
          "author",
          "linkedPosts",
          "categories"
        ]
      },
      "QuillsPostView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Saved view ID",
            "example": "post_view_01jd3kq4e6g8j0m2p4r6t8w0y2"
          },
          "name": {
            "type": "string",
            "description": "View name",
            "example": "Enterprise asks"
          },
          "isShared": {
            "type": "boolean",
            "description": "Whether every teammate sees the view; false for a view only its creator sees"
          },
          "mine": {
            "type": "boolean",
            "description": "Whether the caller created the view"
          },
          "filters": {
            "type": "object",
            "properties": {
              "status": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Saved status filter values, at most 50"
              },
              "board": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Saved board filter values, at most 50"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Saved tag filter values, at most 50"
              },
              "segmentIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Saved customer segment IDs, at most 50"
              },
              "owner": {
                "type": "string",
                "description": "Saved owner filter value"
              },
              "responded": {
                "type": "string",
                "enum": [
                  "responded",
                  "unresponded"
                ],
                "description": "Saved team-response filter. `responded`: posts the team has answered. `unresponded`: posts without a team answer."
              },
              "minVotes": {
                "type": "number",
                "description": "Saved minimum vote count",
                "example": 10
              },
              "minComments": {
                "type": "number",
                "description": "Saved minimum comment count",
                "example": 2
              },
              "hasDuplicates": {
                "type": "boolean",
                "description": "Saved filter for posts with merged duplicates; only `true` is stored"
              },
              "showDeleted": {
                "type": "boolean",
                "description": "Saved filter for deleted posts; only `true` is stored"
              },
              "sort": {
                "type": "string",
                "enum": [
                  "newest",
                  "oldest",
                  "votes",
                  "priority",
                  "rice",
                  "trending",
                  "stale"
                ],
                "description": "Saved sort order: `newest`, `oldest`, `votes`, `priority`, `rice`, `trending` or `stale`"
              },
              "dateFrom": {
                "type": "string",
                "description": "Saved start of the creation date range, as the client stored it",
                "example": "2026-11-01"
              },
              "dateTo": {
                "type": "string",
                "description": "Saved end of the creation date range, as the client stored it",
                "example": "2026-11-30"
              },
              "updatedBefore": {
                "type": "string",
                "description": "Saved last-changed-before bound, as the client stored it",
                "example": "2026-10-01"
              }
            },
            "description": "The saved inbox filters, as stored"
          }
        },
        "required": [
          "id",
          "name",
          "isShared",
          "mine",
          "filters"
        ]
      },
      "QuillsHelpCenterCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Category ID",
            "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
          },
          "urlId": {
            "type": "number",
            "description": "Public numeric ID in help-center URLs. It never changes.",
            "example": 12
          },
          "parentId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the parent category; null for a top-level category. Categories nest at most three levels deep.",
            "example": "kb_category_01jd3m4n5p6q7r8s9t0v1w2x3y"
          },
          "slug": {
            "type": "string",
            "description": "URL slug, unique among the workspace's categories, deleted ones included",
            "example": "billing"
          },
          "name": {
            "type": "string",
            "description": "Display name in the default locale",
            "example": "Billing"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short description in the default locale; null when empty",
            "example": "Invoices, payment methods and plan changes"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "Icon shown with the category, as stored; null when not set"
          },
          "isPublic": {
            "type": "boolean",
            "description": "Whether visitors can see the category on the public help center. A non-public category and its articles are hidden from public reads."
          },
          "segmentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Customer segments that can see the category publicly. Empty: no segment restriction.",
            "example": [
              "segment_01jd3p8q2r5s7t9v1w3x5y7z9b"
            ]
          },
          "position": {
            "type": "number",
            "description": "Sort position among sibling categories, lowest first",
            "example": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the category was created",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the category was last changed",
            "example": "2026-11-20T09:15:42.000Z"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the category was deleted; null for a live category. A deleted category can be restored for 30 days.",
            "example": null
          }
        },
        "required": [
          "id",
          "urlId",
          "parentId",
          "slug",
          "name",
          "description",
          "icon",
          "isPublic",
          "segmentIds",
          "position",
          "createdAt",
          "updatedAt",
          "deletedAt"
        ]
      },
      "QuillsHelpCenterArticle": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Article ID",
            "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
          },
          "urlId": {
            "type": "number",
            "description": "Public numeric ID in help-center URLs. Updates and translations never change it.",
            "example": 42
          },
          "slug": {
            "type": "string",
            "description": "URL slug, unique among the workspace's articles, deleted ones included",
            "example": "reset-your-password"
          },
          "title": {
            "type": "string",
            "description": "Title in the default locale",
            "example": "Reset your password"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short summary in the default locale; null when empty",
            "example": "Get back into your account in two minutes"
          },
          "content": {
            "type": "string",
            "description": "Body in Markdown, in the default locale",
            "example": "## Steps\n\n1. Open **Sign in**.\n2. Choose **Forgot password**."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "published"
            ],
            "description": "Publish state, derived from `publishedAt`. `draft`: not published. `scheduled`: publishes at a future `publishedAt`. `published`: live now. Public help-center reads show published articles only. Drafts are teammate data."
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the article was or will be published; null for a draft",
            "example": "2026-11-19T10:00:00.000Z"
          },
          "position": {
            "type": [
              "number",
              "null"
            ],
            "description": "Sort position in its category, lowest first; null sorts after positioned articles",
            "example": 1
          },
          "segmentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Customer segments that can see the article publicly. Empty: no segment restriction beyond the category's.",
            "example": []
          },
          "viewCount": {
            "type": "number",
            "description": "Stored view count of the article",
            "example": 318
          },
          "helpfulCount": {
            "type": "number",
            "description": "Number of current \"helpful\" votes",
            "example": 27
          },
          "notHelpfulCount": {
            "type": "number",
            "description": "Number of current \"not helpful\" votes",
            "example": 3
          },
          "category": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Category ID",
                "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
              },
              "urlId": {
                "type": "number",
                "description": "Public numeric ID of the category in help-center URLs",
                "example": 12
              },
              "slug": {
                "type": "string",
                "description": "URL slug of the category",
                "example": "account"
              },
              "name": {
                "type": "string",
                "description": "Category name in the default locale",
                "example": "Account"
              }
            },
            "required": [
              "id",
              "urlId",
              "slug",
              "name"
            ],
            "description": "The category the article is filed in"
          },
          "author": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Principal ID of the author",
                "example": "principal_01jd3v5w7x9y1z3a5b7c9d1e3f"
              },
              "name": {
                "type": "string",
                "description": "Display name of the author",
                "example": "Ada Park"
              },
              "avatarUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Avatar image URL; null when the author has none",
                "example": "https://example.com/avatars/ada.png"
              }
            },
            "required": [
              "id",
              "name",
              "avatarUrl"
            ],
            "description": "The teammate who created the article; null when unknown or without a display name"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the article was created",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the article was last changed",
            "example": "2026-11-20T09:15:42.000Z"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the article was deleted; null for a live article. A deleted article can be restored for 30 days.",
            "example": null
          }
        },
        "required": [
          "id",
          "urlId",
          "slug",
          "title",
          "description",
          "content",
          "status",
          "publishedAt",
          "position",
          "segmentIds",
          "viewCount",
          "helpfulCount",
          "notHelpfulCount",
          "category",
          "author",
          "createdAt",
          "updatedAt",
          "deletedAt"
        ]
      },
      "QuillsHelpCenterArticleTranslation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Translation ID",
            "example": "kb_article_translation_01jd3a1b3c5d7e9f1g3h5j7k9m"
          },
          "locale": {
            "type": "string",
            "description": "Locale code of the translation",
            "example": "fr"
          },
          "title": {
            "type": "string",
            "description": "Translated title",
            "example": "Réinitialiser votre mot de passe"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Translated summary; null when empty",
            "example": "Retrouvez l'accès à votre compte en deux minutes"
          },
          "content": {
            "type": "string",
            "description": "Translated body in Markdown",
            "example": "## Étapes\n\n1. Ouvrez **Connexion**."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published"
            ],
            "description": "`draft`: hidden from visitors. `published`: shown when the article itself is published and the locale is enabled. Independent of the article's own state. Public reads show published translations only."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the translation was created",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the translation's text or status last changed",
            "example": "2026-11-20T09:15:42.000Z"
          }
        },
        "required": [
          "id",
          "locale",
          "title",
          "description",
          "content",
          "status",
          "createdAt",
          "updatedAt"
        ]
      },
      "QuillsHelpCenterCategoryTranslation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Translation ID",
            "example": "kb_category_translation_01jd3b2c4d6e8f0g2h4j6k8m0n"
          },
          "locale": {
            "type": "string",
            "description": "Locale code of the translation",
            "example": "fr"
          },
          "name": {
            "type": "string",
            "description": "Translated name; empty means untranslated, and the category is then hidden in that locale",
            "example": "Facturation"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Translated description; null when empty",
            "example": "Factures, moyens de paiement et changements de forfait"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the translation was created",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the translation last changed",
            "example": "2026-11-20T09:15:42.000Z"
          }
        },
        "required": [
          "id",
          "locale",
          "name",
          "description",
          "createdAt",
          "updatedAt"
        ]
      },
      "QuillsHelpCenterRedirectRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Redirect rule ID",
            "example": "hc_redirect_rule_01jd3z5a7b9c1d3e5f7g9h1j3k"
          },
          "path": {
            "type": "string",
            "description": "The old help-center path that redirects, normalized: repeated slashes collapsed and no trailing slash",
            "example": "/kb/old-password-guide"
          },
          "targetType": {
            "type": "string",
            "enum": [
              "article",
              "category"
            ],
            "description": "`article`: redirects to an article. `category`: redirects to a category."
          },
          "targetId": {
            "type": "string",
            "description": "ID of the target article or category",
            "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
          },
          "targetLabel": {
            "type": [
              "string",
              "null"
            ],
            "description": "The target's title or name; null when the target is gone",
            "example": "Reset your password"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the rule was created",
            "example": "2026-11-18T14:32:05.000Z"
          }
        },
        "required": [
          "id",
          "path",
          "targetType",
          "targetId",
          "targetLabel",
          "createdAt"
        ]
      },
      "QuillsHelpCenterSettings": {
        "type": "object",
        "properties": {
          "homepageTitle": {
            "type": "string",
            "description": "Homepage heading in the default locale. Defaults to \"How can we help?\".",
            "example": "How can we help?"
          },
          "homepageDescription": {
            "type": "string",
            "description": "Homepage text under the heading in the default locale. Defaults to \"Search our knowledge base or browse by category\".",
            "example": "Search our knowledge base or browse by category"
          },
          "headerLinks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "Link text",
                  "example": "Status"
                },
                "url": {
                  "type": "string",
                  "description": "Absolute http(s) URL or a path starting with `/`",
                  "example": "https://status.example.com"
                }
              },
              "required": [
                "label",
                "url"
              ]
            },
            "description": "Links in the public help-center header, in display order"
          },
          "locales": {
            "type": "object",
            "properties": {
              "default": {
                "type": "string",
                "description": "The default locale, always `en`",
                "example": "en"
              },
              "additional": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Enabled locales besides the default, in the order they were enabled",
                "example": [
                  "fr",
                  "pt-br"
                ]
              },
              "chrome": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "locale": {
                      "type": "string",
                      "description": "An enabled additional locale",
                      "example": "fr"
                    },
                    "homepageTitle": {
                      "type": "string",
                      "description": "Homepage heading in this locale; empty when not set",
                      "example": "Comment pouvons-nous vous aider ?"
                    },
                    "homepageDescription": {
                      "type": "string",
                      "description": "Homepage text in this locale; empty when not set",
                      "example": "Cherchez dans notre base de connaissances ou parcourez les catégories"
                    },
                    "searchPlaceholder": {
                      "type": "string",
                      "description": "Search box placeholder in this locale; empty when not set",
                      "example": "Rechercher des articles"
                    }
                  },
                  "required": [
                    "locale",
                    "homepageTitle",
                    "homepageDescription",
                    "searchPlaceholder"
                  ]
                },
                "description": "Homepage text for each enabled additional locale, in the order of `additional`"
              }
            },
            "required": [
              "default",
              "additional",
              "chrome"
            ],
            "description": "Languages the public help center offers"
          },
          "autoTranslate": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "Whether publishing an article asks a background worker to write draft AI translations into the additional locales after the request. Needs AI to be configured on the instance. Defaults to false."
              },
              "protectedTerms": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Terms that AI translation keeps as written, such as product names",
                "example": [
                  "Acme Sync"
                ]
              }
            },
            "required": [
              "enabled",
              "protectedTerms"
            ],
            "description": "AI translation of published articles"
          },
          "seo": {
            "type": "object",
            "properties": {
              "metaDescription": {
                "type": "string",
                "description": "Meta description for the help-center homepage; empty when not set",
                "example": "Guides and answers for Acme customers"
              },
              "sitemapEnabled": {
                "type": "boolean",
                "description": "Whether the public sitemap is served. It also needs `indexable`. Defaults to true; this API cannot change it."
              },
              "structuredDataEnabled": {
                "type": "boolean",
                "description": "Whether public pages tell the web client to add structured data for search engines. Defaults to true."
              },
              "indexable": {
                "type": "boolean",
                "description": "Whether search engines may index the help center. False also turns off the sitemap. Defaults to true."
              }
            },
            "required": [
              "metaDescription",
              "sitemapEnabled",
              "structuredDataEnabled",
              "indexable"
            ],
            "description": "Search engine settings"
          }
        },
        "required": [
          "homepageTitle",
          "homepageDescription",
          "headerLinks",
          "locales",
          "autoTranslate",
          "seo"
        ]
      },
      "QuillsStatusComponent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Component ID",
            "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
          },
          "groupId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Group the component belongs to. Null: ungrouped.",
            "example": "status_group_01jd3j8fssz5awsh8vhtpre95b"
          },
          "name": {
            "type": "string",
            "description": "Component name shown on the status page",
            "example": "API"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short description shown with the component. Null when none is set.",
            "example": "REST API and webhooks"
          },
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "under_maintenance",
              "degraded_performance",
              "partial_outage",
              "major_outage"
            ],
            "description": "Component status, least to most severe. `operational`: working normally. `under_maintenance`: in planned maintenance; counts as up for uptime. `degraded_performance`: working, but slower or less reliable than usual. `partial_outage`: unavailable for some users or functions. `major_outage`: unavailable for most or all users."
          },
          "position": {
            "type": "number",
            "description": "Sort position across all components, starting at 0; lower comes first",
            "example": 0
          },
          "showUptime": {
            "type": "boolean",
            "description": "Whether the public status page shows the component's 90-day uptime"
          },
          "segmentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Segment IDs whose members can see the component on the public page. Empty: every viewer of the page sees it.",
            "example": [
              "segment_11jd3pq5e6eycndy0yp57rcybv"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the component was created, in ISO 8601 UTC",
            "example": "2026-10-01T09:00:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the component's details or status last changed, in ISO 8601 UTC",
            "example": "2026-11-18T14:32:05.000Z"
          }
        },
        "required": [
          "id",
          "groupId",
          "name",
          "description",
          "status",
          "position",
          "showUptime",
          "segmentIds",
          "createdAt",
          "updatedAt"
        ]
      },
      "QuillsStatusGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Group ID",
            "example": "status_group_01jd3j8fssz5awsh8vhtpre95b"
          },
          "name": {
            "type": "string",
            "description": "Group name shown on the status page",
            "example": "Core services"
          },
          "position": {
            "type": "number",
            "description": "Sort position among groups, starting at 0; lower comes first",
            "example": 0
          },
          "collapsed": {
            "type": "boolean",
            "description": "Whether the public status page shows the group collapsed"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the group was created, in ISO 8601 UTC",
            "example": "2026-10-01T09:00:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the group was last renamed or collapsed, in ISO 8601 UTC",
            "example": "2026-11-18T14:32:05.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "position",
          "collapsed",
          "createdAt",
          "updatedAt"
        ]
      },
      "QuillsStatusIncident": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Incident or maintenance window ID",
            "example": "status_incident_01jd3e28jt97kb6cq643dzvmxx"
          },
          "kind": {
            "type": "string",
            "enum": [
              "incident",
              "maintenance"
            ],
            "description": "Item type. `incident`: an unplanned problem. `maintenance`: a planned maintenance window."
          },
          "title": {
            "type": "string",
            "description": "Title shown on the status page",
            "example": "Elevated error rates on the API"
          },
          "status": {
            "type": "string",
            "enum": [
              "investigating",
              "identified",
              "monitoring",
              "resolved",
              "scheduled",
              "in_progress",
              "verifying",
              "completed"
            ],
            "description": "Current lifecycle status, set by the latest timeline update. Incidents: `investigating`, `identified`, `monitoring`, `resolved`. Maintenance windows: `scheduled`, `in_progress`, `verifying`, `completed`."
          },
          "impact": {
            "type": "string",
            "enum": [
              "none",
              "minor",
              "major",
              "critical",
              "maintenance"
            ],
            "description": "Impact level. `none`, `minor`, `major` and `critical` rate an incident; without an override they derive from the worst affected component status (operational or under maintenance: `none`, degraded performance: `minor`, partial outage: `major`, major outage: `critical`). `maintenance`: always set on maintenance windows."
          },
          "impactOverride": {
            "type": "boolean",
            "description": "Whether a teammate set `impact` by hand. False: an incident's impact derives from its affected component statuses. Always false for maintenance windows."
          },
          "scheduledStartAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Planned start of the maintenance window, in ISO 8601 UTC. Null when no planned start is set.",
            "example": "2026-11-20T02:00:00.000Z"
          },
          "scheduledEndAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Planned end of the maintenance window, in ISO 8601 UTC. Null when no planned end is set.",
            "example": "2026-11-20T04:00:00.000Z"
          },
          "autoStart": {
            "type": "boolean",
            "description": "Maintenance windows: whether a scheduled sweep starts the window at `scheduledStartAt`, applying its component statuses. A start missed by more than a day is left for a teammate."
          },
          "autoComplete": {
            "type": "boolean",
            "description": "Maintenance windows: whether a scheduled sweep completes the window at `scheduledEndAt` and restores its components"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the incident started or the window began, in ISO 8601 UTC. A window that has not started holds its planned start here.",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the incident was resolved or the window completed, in ISO 8601 UTC. Null while it is open.",
            "example": "2026-11-18T16:05:41.000Z"
          },
          "backfilled": {
            "type": "boolean",
            "description": "Whether this is a past incident logged after the fact. A backfilled item never notifies subscribers and cannot be reopened."
          },
          "notifiedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the item was published, in ISO 8601 UTC; set at creation even when `notifySubscribers` is false. Null for backfilled items.",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "notifySubscribers": {
            "type": "boolean",
            "description": "Whether the item emails status page subscribers: an incident's publish, updates and resolution, and a maintenance window's start. Always false for backfilled items."
          },
          "detailsEditedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When an edit last changed the title, the planned window or the publicly visible components, in ISO 8601 UTC. Null when never edited that way. The status RSS feed adds an entry for an edit made after the latest update.",
            "example": "2026-11-18T15:10:00.000Z"
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Principal ID of the teammate who created it. Null when no author is recorded.",
            "example": "principal_01jd3gqapenecfseczp11hygcp"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the record was created, in ISO 8601 UTC",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the record last changed, in ISO 8601 UTC",
            "example": "2026-11-18T16:05:41.000Z"
          },
          "affectedComponents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "componentId": {
                  "type": "string",
                  "description": "Affected component ID",
                  "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                },
                "componentStatus": {
                  "type": "string",
                  "enum": [
                    "operational",
                    "under_maintenance",
                    "degraded_performance",
                    "partial_outage",
                    "major_outage"
                  ],
                  "description": "Status the item holds the component at: while an incident is open, or while a maintenance window is `in_progress` or `verifying`. A component affected by several items shows the most severe one."
                },
                "name": {
                  "type": "string",
                  "description": "Component name",
                  "example": "API"
                },
                "segmentIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Segment IDs the component is gated to. Empty: every status page viewer sees it.",
                  "example": [
                    "segment_11jd3pq5e6eycndy0yp57rcybv"
                  ]
                }
              },
              "required": [
                "componentId",
                "componentStatus",
                "name",
                "segmentIds"
              ]
            },
            "description": "Live components the item affects, in page order. Deleted components are left out."
          },
          "updates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Timeline update ID",
                  "example": "status_update_01jd3ee0zbgj09tqm83xssss6y"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "investigating",
                    "identified",
                    "monitoring",
                    "resolved",
                    "scheduled",
                    "in_progress",
                    "verifying",
                    "completed"
                  ],
                  "description": "Lifecycle status that this update set"
                },
                "body": {
                  "type": "string",
                  "description": "Update text shown on the status page",
                  "example": "We identified a faulty deploy and are rolling it back."
                },
                "createdBy": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Principal ID of the teammate who posted it. Null for updates the system posts, such as automatic maintenance starts and completions.",
                  "example": "principal_01jd3gqapenecfseczp11hygcp"
                },
                "templateId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Incident template the update cites. Null when none was used or the template was deleted.",
                  "example": "status_tmpl_11jd3y77zxyyk596ngya1dq91k"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the update was posted, in ISO 8601 UTC",
                  "example": "2026-11-18T14:48:12.000Z"
                }
              },
              "required": [
                "id",
                "status",
                "body",
                "createdBy",
                "templateId",
                "createdAt"
              ]
            },
            "description": "Timeline updates, oldest first"
          }
        },
        "required": [
          "id",
          "kind",
          "title",
          "status",
          "impact",
          "impactOverride",
          "scheduledStartAt",
          "scheduledEndAt",
          "autoStart",
          "autoComplete",
          "startedAt",
          "resolvedAt",
          "backfilled",
          "notifiedAt",
          "notifySubscribers",
          "detailsEditedAt",
          "createdBy",
          "createdAt",
          "updatedAt",
          "affectedComponents",
          "updates"
        ]
      },
      "QuillsStatusTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Template ID",
            "example": "status_tmpl_11jd3y77zxyyk596ngya1dq91k"
          },
          "name": {
            "type": "string",
            "description": "Template name that teammates pick it by",
            "example": "Database degradation"
          },
          "title": {
            "type": "string",
            "description": "Incident title the template suggests",
            "example": "Degraded database performance"
          },
          "body": {
            "type": "string",
            "description": "Update text the template suggests",
            "example": "We are seeing slow responses from our primary database and are investigating."
          },
          "impact": {
            "type": "string",
            "enum": [
              "none",
              "minor",
              "major",
              "critical",
              "maintenance"
            ],
            "description": "Impact the template suggests: `none`, `minor`, `major`, `critical` or `maintenance`"
          },
          "componentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Component IDs the template suggests. Live components only: a deleted one is left out.",
            "example": [
              "status_component_11jd3kfbf5kznwj47tan9zt24m"
            ]
          },
          "usageCount": {
            "type": "number",
            "description": "Number of timeline updates that cite the template",
            "example": 4
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the template was created, in ISO 8601 UTC",
            "example": "2026-10-01T09:00:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the template last changed, in ISO 8601 UTC",
            "example": "2026-11-02T11:20:00.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "title",
          "body",
          "impact",
          "componentIds",
          "usageCount",
          "createdAt",
          "updatedAt"
        ]
      },
      "QuillsStatusSettings": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "The page publish switch; the statusPage module flag also applies. Default false."
          },
          "audience": {
            "type": "string",
            "enum": [
              "public",
              "authenticated",
              "segments"
            ],
            "description": "Who can open the public status page. `public`: anyone. `authenticated`: signed-in visitors only. `segments`: members of `allowedSegmentIds` only. Default `public`."
          },
          "allowedSegmentIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Segment IDs whose members can open the page when `audience` is `segments`. Default empty.",
            "example": [
              "segment_11jd3pq5e6eycndy0yp57rcybv"
            ]
          },
          "emailsDisabled": {
            "type": "boolean",
            "description": "Stored switch for turning off status subscriber emails. Default false. Subscriber email delivery does not read it at present."
          },
          "pageDescription": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description shown on the public status page. Null when none is set.",
            "example": "Live status of the Example Co. app and API."
          }
        },
        "required": [
          "enabled",
          "audience",
          "allowedSegmentIds",
          "emailsDisabled",
          "pageDescription"
        ]
      },
      "QuillsIntegrationChannel": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "description": "Target inside the provider account, such as a Slack channel ID, a GitHub `owner:repo` or a Shortcut group ID.",
            "example": "C08ABCD1234"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "eventType": {
                  "type": "string",
                  "description": "Event type: `post.created`, `post.status_changed` or `comment.created`.",
                  "example": "post.created"
                },
                "enabled": {
                  "type": "boolean",
                  "description": "True when this event type is sent; false when it is off."
                }
              },
              "required": [
                "eventType",
                "enabled"
              ]
            },
            "description": "Event types mapped to this channel, ordered by type."
          },
          "boardIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Board filter: only events about posts on these boards are sent. Null: events from every board.",
            "example": [
              "board_01m8rxs5z8e8mtfnj44azyp4ds"
            ]
          }
        },
        "required": [
          "channel",
          "events",
          "boardIds"
        ],
        "description": "A notification channel: one target inside the provider account and the state of each event type sent to it"
      },
      "QuillsIntegrationSync": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Sync operation ID (a UUID).",
            "example": "0193f6a2-7c4e-7b1a-9d3e-5f2a8c1b4e6d"
          },
          "provider": {
            "type": "string",
            "description": "Provider key of the integration that the operation sends to.",
            "example": "github"
          },
          "direction": {
            "type": "string",
            "description": "Direction of the operation. Currently always `outbound`.",
            "example": "outbound"
          },
          "kind": {
            "type": "string",
            "description": "`create`: creates an item in the provider, such as an issue for a new post. `notify`: sends a message about an event.",
            "example": "create"
          },
          "state": {
            "type": "string",
            "description": "Delivery state. `queued`, `running` and `retry_wait`: in progress. `succeeded`: delivered. `failed`: certainly not delivered. `auth_required`: not delivered because the credentials were refused or unreadable. `uncertain`: may have reached the provider (no answer, or a run that stopped after its claim); never sent again automatically. `cancelled`: stopped before delivery.",
            "example": "succeeded"
          },
          "version": {
            "type": "number",
            "description": "Revision of the operation, incremented by each change. Send it with a recovery action.",
            "example": 1
          },
          "sourceType": {
            "type": "string",
            "description": "What triggered the delivery: `post`, `comment` or `ticket`.",
            "example": "post"
          },
          "post": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Post ID.",
                "example": "post_01m8rxs5z8e8mtfnj9zmkr0n4g"
              },
              "title": {
                "type": "string",
                "description": "Post title.",
                "example": "Export boards to CSV"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "description": "The post that the operation is about (for a comment, its post). Null when the caller cannot see the post's board, or the source is not a post or comment."
          },
          "destination": {
            "type": "string",
            "description": "Target of the delivery: a channel of the integration, or `default` for the connection itself.",
            "example": "acme:roadmap"
          },
          "remoteUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTPS link to the created item in the provider. Null when there is none, or when `post` is null.",
            "example": "https://github.com/acme/roadmap/issues/142"
          },
          "remoteDisplayId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider's label for the created item, such as `#142` or `QUA-24`, else its external ID. Null when there is none, or when `post` is null.",
            "example": "#142"
          },
          "attempts": {
            "type": "number",
            "description": "Delivery attempts made so far.",
            "example": 1
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fixed, human-readable reason for the current state, such as `The provider rejected the saved credentials.` Provider and SQL errors never appear here. Null when there is no error.",
            "example": null
          },
          "cancelRequested": {
            "type": "boolean",
            "description": "True when a teammate cancelled the operation."
          },
          "createdAt": {
            "type": "string",
            "description": "When the operation was queued (ISO 8601, UTC).",
            "example": "2026-11-30T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "When the operation last changed (ISO 8601, UTC).",
            "example": "2026-11-30T14:05:03.000Z"
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "retry",
                "cancel"
              ],
              "description": "Recovery action. `retry`: queue the delivery again. `cancel`: stop a queued delivery, or record that a teammate checked a failed or uncertain one.",
              "example": "retry"
            },
            "description": "Recovery actions available now. `retry` only for `failed` or `auth_required` on the active connection that the operation was made for; `cancel` for those and for `queued`, `retry_wait` or `uncertain` operations not yet cancelled. Empty when `post` is null.",
            "example": [
              "retry",
              "cancel"
            ]
          }
        },
        "required": [
          "id",
          "provider",
          "direction",
          "kind",
          "state",
          "version",
          "sourceType",
          "post",
          "destination",
          "remoteUrl",
          "remoteDisplayId",
          "attempts",
          "error",
          "cancelRequested",
          "createdAt",
          "updatedAt",
          "actions"
        ],
        "description": "An outbound sync operation to an integration's provider, with its delivery state and the recovery actions available now"
      },
      "QuillsStatusSync": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "True when status sync is on for this connection."
          },
          "target": {
            "type": [
              "string",
              "null"
            ],
            "description": "Repository or project whose issue events are synced: a GitHub repository as `owner:repo`, or a GitLab project ID. Null when status sync is off.",
            "example": "acme:roadmap"
          },
          "state": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "active",
              "uncertain",
              null
            ],
            "description": "`active`: the provider confirmed the webhook. `uncertain`: the provider did not answer the registration and may have created the webhook; check its webhook list before enabling again. Null when status sync is off.",
            "example": "active"
          },
          "webhookUrl": {
            "type": "string",
            "description": "This instance's signed webhook URL for the connection, which the provider calls with issue events.",
            "example": "https://api.example.com/api/quills-public/signed/integrations/github/integration_01m8rxs5z7e8mtfnhk1f9zhgnz/webhook"
          }
        },
        "required": [
          "enabled",
          "target",
          "state",
          "webhookUrl"
        ],
        "description": "An integration's status sync state and its mappings from provider issue statuses to post statuses"
      },
      "QuillsCrmContact": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Contact's name in the provider. Null when the record has none.",
            "example": "Jane Doe"
          },
          "company": {
            "type": [
              "string",
              "null"
            ],
            "description": "Company or account that the contact belongs to in the provider. Null when unknown.",
            "example": "Acme Corp"
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTPS link to the record in the provider's own tool. Null when the provider gives none.",
            "example": "https://app.hubspot.com/contacts/1234567/contact/987654"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "Field label, as the provider integration names it.",
                  "example": "Job title"
                },
                "value": {
                  "type": "string",
                  "description": "Field value, as text.",
                  "example": "Head of Support"
                }
              },
              "required": [
                "label",
                "value"
              ]
            },
            "description": "Selected fields of the record, at most 10, in the provider's order. Empty fields are left out."
          }
        },
        "required": [
          "name",
          "company",
          "url",
          "fields"
        ],
        "description": "The provider's first matching record. Null when none matches."
      },
      "QuillsTicket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Ticket ID (TypeID).",
            "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
          },
          "number": {
            "type": "number",
            "description": "Sequential ticket number, unique within the workspace and assigned on creation.",
            "example": 1042
          },
          "reference": {
            "type": "string",
            "description": "Human-readable reference: the number prefixed with `#`.",
            "example": "#1042"
          },
          "type": {
            "type": "string",
            "enum": [
              "customer",
              "back_office",
              "tracker"
            ],
            "description": "Ticket category. `customer`: a request from a customer, paired with their conversation and visible to them in the portal; `back_office`: internal work customers don't see; `tracker`: an issue that groups other tickets, whose status changes and replies can cascade to them.",
            "example": "customer"
          },
          "ticketType": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Ticket type ID (TypeID).",
                "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
              },
              "name": {
                "type": "string",
                "description": "Display name of the type.",
                "example": "Refund request"
              },
              "slug": {
                "type": "string",
                "description": "Unique machine name of the type.",
                "example": "refund_request"
              },
              "category": {
                "type": "string",
                "enum": [
                  "customer",
                  "back_office",
                  "tracker"
                ],
                "description": "Category the type belongs to; matches `type`.",
                "example": "customer"
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Icon name of the type. Null when it has none.",
                "example": "receipt"
              },
              "color": {
                "type": "string",
                "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                "example": "#2563eb"
              }
            },
            "required": [
              "id",
              "name",
              "slug",
              "category",
              "icon",
              "color"
            ],
            "description": "Workspace-defined ticket type, which may be archived. Null for older tickets created before ticket types existed."
          },
          "title": {
            "type": "string",
            "description": "Ticket title.",
            "example": "Refund for duplicate charge on invoice INV-2291"
          },
          "status": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Ticket status ID (TypeID).",
                "example": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3"
              },
              "name": {
                "type": "string",
                "description": "Status name shown to teammates. `Unknown` if the status row can't be found.",
                "example": "Waiting on engineering"
              },
              "color": {
                "type": "string",
                "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                "example": "#f59e0b"
              },
              "category": {
                "type": "string",
                "enum": [
                  "open",
                  "pending",
                  "closed"
                ],
                "description": "Coarse category of the status. `open`: waiting on the team; `pending`: waiting on someone else; `closed`: done.",
                "example": "pending"
              }
            },
            "required": [
              "id",
              "name",
              "color",
              "category"
            ],
            "description": "Current status, including a status that was deleted after the ticket moved to it."
          },
          "stage": {
            "type": "object",
            "properties": {
              "slot": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "received",
                  "in_progress",
                  "awaiting_requester",
                  "resolved",
                  null
                ],
                "description": "Requester-facing stage of the current status: `received`, `in_progress`, `awaiting_requester` or `resolved`. Null when the status is internal and hidden from requesters.",
                "example": "in_progress"
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Label requesters see for the stage, from the workspace's stage labels. Null when `slot` is null.",
                "example": "In progress"
              },
              "closed": {
                "type": "boolean",
                "description": "Whether the current status is in the `closed` category.",
                "example": false
              }
            },
            "required": [
              "slot",
              "label",
              "closed"
            ],
            "description": "What the requester sees of the status."
          },
          "priority": {
            "type": "string",
            "enum": [
              "none",
              "low",
              "medium",
              "high",
              "urgent"
            ],
            "description": "Priority, from `none` (unset, the default) through `low`, `medium` and `high` to `urgent`.",
            "example": "high"
          },
          "requester": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "principalId": {
                "type": "string",
                "description": "Principal ID of the requester (TypeID).",
                "example": "principal_01m8ry2xt8fzv9y3vahq9h816h"
              },
              "displayName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Requester's display name. Null when unknown.",
                "example": "Jordan Lee"
              },
              "avatarUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "URL of the requester's avatar. Null when unset.",
                "example": "https://example.com/avatars/jordan.png"
              }
            },
            "required": [
              "principalId",
              "displayName",
              "avatarUrl"
            ],
            "description": "Person the ticket is for. Null when the ticket has no requester, or the requester was removed."
          },
          "assignee": {
            "type": "object",
            "properties": {
              "principalId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Principal ID of the assigned teammate (TypeID). Null when no teammate is assigned.",
                "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
              },
              "displayName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Display name of the assigned teammate. Null when unassigned or unknown.",
                "example": "Dana Whitaker"
              },
              "teamId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ID of the assigned team (TypeID). Null when no team is assigned. Independent of the teammate assignee.",
                "example": "team_01m8rxs1h9fk3s7qq9q8v971hw"
              },
              "teamName": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Name of the assigned team. Null when no team is assigned.",
                "example": "Billing"
              }
            },
            "required": [
              "principalId",
              "displayName",
              "teamId",
              "teamName"
            ],
            "description": "Teammate and team the ticket is assigned to."
          },
          "company": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Company ID (TypeID).",
                "example": "company_01m8ry2xt8fzv9y3v0x01a68jg"
              },
              "name": {
                "type": "string",
                "description": "Company name. `Unknown` if the company can't be found.",
                "example": "Northwind Traders"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "description": "Company the ticket is about. Null when none is set."
          },
          "customAttributes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Attribute key, usually a field key of the ticket type's form.",
                  "example": "order_number"
                },
                "value": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Attribute value: a string, number, boolean or null. A nested object or array is returned as its JSON text.",
                  "example": "A-10442"
                }
              },
              "required": [
                "key",
                "value"
              ]
            },
            "description": "Custom attributes and intake form answers as key/value pairs. Answers to fields later removed from the type stay listed."
          },
          "firstResponseAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time a teammate first acted on the ticket, such as a reply or a status change, in ISO 8601 UTC. Null until then.",
            "example": "2026-03-14T09:41:10.000Z"
          },
          "dueAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Due time of the ticket's service level target, in ISO 8601 UTC. Null when none is set.",
            "example": "2026-03-15T09:26:53.000Z"
          },
          "resolvedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time the ticket last moved into a `closed` status, in ISO 8601 UTC. Null while it's not closed; cleared when it reopens.",
            "example": null
          },
          "reopenedCount": {
            "type": "number",
            "description": "Number of times the ticket moved from a `closed` status back to an open one.",
            "example": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the ticket was created, in ISO 8601 UTC.",
            "example": "2026-03-14T09:26:53.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the ticket last changed, in ISO 8601 UTC.",
            "example": "2026-03-14T10:02:37.000Z"
          }
        },
        "required": [
          "id",
          "number",
          "reference",
          "type",
          "ticketType",
          "title",
          "status",
          "stage",
          "priority",
          "requester",
          "assignee",
          "company",
          "customAttributes",
          "firstResponseAt",
          "dueAt",
          "resolvedAt",
          "reopenedCount",
          "createdAt",
          "updatedAt"
        ],
        "description": "A support ticket as teammates see it: its type, status, requester-facing stage, assignment, company and custom attributes."
      },
      "QuillsSurvey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Survey ID",
            "example": "survey_01jd3k8m2q5r7t9v1w3x5y7z9a"
          },
          "type": {
            "type": "string",
            "enum": [
              "nps",
              "csat",
              "ces",
              "pmf",
              "poll",
              "open"
            ],
            "description": "Survey type. `nps`: Net Promoter Score, a 0-10 score. `csat`: customer satisfaction, a 1-5 score. `ces`: customer effort, a 1-7 score. `pmf`: product-market fit, one of three fixed answers. `poll`: one of the survey's own answers. `open`: a written answer."
          },
          "question": {
            "type": "string",
            "description": "The question that customers see",
            "example": "How likely are you to recommend us to a friend?"
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Answer options: a poll's own answers, the three fixed answers of a PMF survey, or empty for other types",
            "example": [
              "Very disappointed",
              "Somewhat disappointed",
              "Not disappointed"
            ]
          },
          "targetSegmentIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Segment IDs of the customers that the survey targets. Null targets every customer.",
            "example": [
              "segment_05p0q2s6v8x1y3z5a7b9c1d4e6"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "active",
              "closed"
            ],
            "description": "`draft`: not shown to customers yet; it can be edited or deleted. `active`: shown to the targeted customers. `closed`: no longer collects responses and cannot change."
          },
          "responseCount": {
            "type": "number",
            "description": "Number of responses, without those of test customers",
            "example": 214
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the survey was created",
            "example": "2026-11-18T14:32:05.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the survey was last changed, including when it was activated or closed",
            "example": "2026-11-20T09:15:42.000Z"
          }
        },
        "required": [
          "id",
          "type",
          "question",
          "options",
          "targetSegmentIds",
          "status",
          "responseCount",
          "createdAt",
          "updatedAt"
        ]
      },
      "QuillsSurveyResults": {
        "type": "object",
        "properties": {
          "survey": {
            "$ref": "#/components/schemas/QuillsSurvey"
          },
          "total": {
            "type": "number",
            "description": "Number of responses, including poll answers that are no longer an option",
            "example": 214
          },
          "score": {
            "type": [
              "number",
              "null"
            ],
            "description": "The type's score. `nps`: -100 to 100. `csat` and `pmf`: a percentage, 0 to 100. `ces`: the average score, to one decimal. Percentages are rounded to whole numbers. Null without responses and for `poll` and `open` surveys.",
            "example": 42
          },
          "scores": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "number",
                  "description": "A score on the type's scale",
                  "example": 9
                },
                "count": {
                  "type": "number",
                  "description": "Number of responses with this score",
                  "example": 61
                }
              },
              "required": [
                "value",
                "count"
              ]
            },
            "description": "One entry per score of the scale, lowest first, including scores with no responses. Empty for `pmf`, `poll` and `open` surveys."
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "An answer option",
                  "example": "Very disappointed"
                },
                "count": {
                  "type": "number",
                  "description": "Number of responses that picked it",
                  "example": 38
                }
              },
              "required": [
                "label",
                "count"
              ]
            },
            "description": "One entry per current answer option, in option order. Empty for scored and `open` surveys."
          },
          "comments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Survey response ID",
                  "example": "survey_response_07r2s4v8x0z3a5b7c9d1e3f6g8"
                },
                "comment": {
                  "type": "string",
                  "description": "The respondent's written comment",
                  "example": "The new reports save me an hour every week."
                },
                "score": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "The response's score, or null for unscored types",
                  "example": 9
                },
                "choice": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The answer the respondent picked, or null for types without choices"
                },
                "respondent": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Display name of the respondent, or null when none is known",
                  "example": "Ada Park"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When the response was given",
                  "example": "2026-11-19T11:20:00.000Z"
                }
              },
              "required": [
                "id",
                "comment",
                "score",
                "choice",
                "respondent",
                "createdAt"
              ]
            },
            "description": "The latest 20 responses with a comment, newest first"
          }
        },
        "required": [
          "survey",
          "total",
          "score",
          "scores",
          "choices",
          "comments"
        ]
      },
      "QuillsWorkspaceContext": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "slug"
            ]
          },
          "actor": {
            "type": "object",
            "properties": {
              "principalId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "workspaceId": {
                "type": "string"
              }
            },
            "required": [
              "principalId",
              "userId",
              "workspaceId"
            ]
          }
        },
        "required": [
          "workspace",
          "actor"
        ]
      },
      "CustomFieldDefinition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the custom field definition.",
            "example": "ga74wz2otc2lghrx19chi8ni"
          },
          "projectId": {
            "type": "string",
            "description": "ID of the project the field belongs to.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "name": {
            "type": "string",
            "description": "Display name of the field.",
            "example": "Priority level"
          },
          "type": {
            "type": "string",
            "description": "Value type of the field: `text`, `number`, `date`, `dropdown`, `boolean` or `multiselect`.",
            "example": "dropdown"
          },
          "required": {
            "type": "boolean",
            "description": "Whether every task must have a value.",
            "example": false
          },
          "defaultValue": {
            "type": [
              "string",
              "null"
            ],
            "description": "Value new tasks start with, in the field type's format. Null when there is no default.",
            "example": "Medium"
          },
          "options": {
            "description": "Options of a `dropdown` or `multiselect` field, as an array of strings in display order. Null for other types.",
            "example": [
              "Low",
              "Medium",
              "High"
            ]
          },
          "hiddenOptions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Options no longer offered for new selections. Tasks that already use them keep them.",
            "example": []
          },
          "position": {
            "type": "number",
            "description": "Sort position of the field within the project, in ascending order.",
            "example": 1
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the field was created, in UTC.",
            "example": "2026-11-02T14:05:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the field was last changed, in UTC.",
            "example": "2026-11-20T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "projectId",
          "name",
          "type",
          "required",
          "defaultValue",
          "hiddenOptions",
          "position",
          "createdAt",
          "updatedAt"
        ],
        "description": "A custom field that tasks in a project can have a value for."
      },
      "CustomFieldValue": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the custom field value.",
            "example": "d90zj9vs2cbgp4twt50q5aps"
          },
          "taskId": {
            "type": "string",
            "description": "ID of the task the value belongs to.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "fieldId": {
            "type": "string",
            "description": "ID of the custom field definition.",
            "example": "ga74wz2otc2lghrx19chi8ni"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stored value as a string in the field type's format; multiselect values are a JSON array. Null or an empty string when the task has no value.",
            "example": "High"
          },
          "fieldName": {
            "type": "string",
            "description": "Display name of the field.",
            "example": "Priority level"
          },
          "fieldPosition": {
            "type": "number",
            "description": "Sort position of the field within the project.",
            "example": 1
          },
          "fieldType": {
            "type": "string",
            "description": "Value type of the field: `text`, `number`, `date`, `dropdown`, `boolean` or `multiselect`.",
            "example": "dropdown"
          },
          "fieldOptions": {
            "description": "Options of a `dropdown` or `multiselect` field, as an array of strings in display order. Null for other types.",
            "example": [
              "Low",
              "Medium",
              "High"
            ]
          }
        },
        "required": [
          "id",
          "taskId",
          "fieldId",
          "value",
          "fieldName",
          "fieldPosition",
          "fieldType"
        ],
        "description": "A task's value for a custom field, with the field's details."
      },
      "CustomFieldFilterValues": {
        "type": "object",
        "properties": {
          "fieldId": {
            "type": "string",
            "description": "ID of the custom field definition.",
            "example": "ga74wz2otc2lghrx19chi8ni"
          },
          "fieldName": {
            "type": "string",
            "description": "Display name of the field.",
            "example": "Priority level"
          },
          "fieldType": {
            "type": "string",
            "description": "Value type of the field: `text`, `number`, `date`, `dropdown`, `boolean` or `multiselect`.",
            "example": "dropdown"
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Distinct non-empty values that tasks in the project currently have for the field, as stored. Empty when no task has a value.",
            "example": [
              "High",
              "Medium"
            ]
          }
        },
        "required": [
          "fieldId",
          "fieldName",
          "fieldType",
          "values"
        ],
        "description": "Values in use for one custom field, for building filters."
      },
      "ReorderCustomFieldsResponse": {
        "description": "All custom field definitions of the project after the change, sorted by position."
      },
      "SetCustomFieldValueResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the custom field value.",
            "example": "d90zj9vs2cbgp4twt50q5aps"
          },
          "taskId": {
            "type": "string",
            "description": "ID of the task.",
            "example": "bkh59p9dpz3efjy7e59v55jd"
          },
          "fieldId": {
            "type": "string",
            "description": "ID of the custom field definition.",
            "example": "ga74wz2otc2lghrx19chi8ni"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stored value after trimming. An empty string clears the field.",
            "example": "5"
          }
        },
        "required": [
          "id",
          "taskId",
          "fieldId",
          "value"
        ],
        "description": "The task's stored value for the field."
      },
      "ImportSourceProjectList": {
        "type": "object",
        "properties": {
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportSourceProject"
            },
            "description": "Projects the source account can import, in the source's order."
          }
        },
        "required": [
          "projects"
        ],
        "description": "Projects available in an import source."
      },
      "ImportSourceProject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the project in the source. Send it in `projectIds` to import the project.",
            "example": "1357924680"
          },
          "name": {
            "type": "string",
            "description": "Name of the project in the source.",
            "example": "Website redesign"
          },
          "detail": {
            "type": "string",
            "description": "Extra context shown next to the name, such as the source workspace or team.",
            "example": "Marketing team"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "description": "A project the source account can import."
      },
      "ImportConnection": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/PlankaImportConnection"
          },
          {
            "$ref": "#/components/schemas/PlaneImportConnection"
          },
          {
            "$ref": "#/components/schemas/LinearImportConnection"
          },
          {
            "$ref": "#/components/schemas/JiraImportConnection"
          },
          {
            "$ref": "#/components/schemas/TrelloImportConnection"
          },
          {
            "$ref": "#/components/schemas/KaneoImportConnection"
          }
        ],
        "discriminator": {
          "propertyName": "source",
          "mapping": {
            "planka": "#/components/schemas/PlankaImportConnection",
            "plane": "#/components/schemas/PlaneImportConnection",
            "linear": "#/components/schemas/LinearImportConnection",
            "jira": "#/components/schemas/JiraImportConnection",
            "trello": "#/components/schemas/TrelloImportConnection",
            "kaneo": "#/components/schemas/KaneoImportConnection"
          }
        },
        "description": "Where to import from and how to sign in. Credentials are used only for this request and the import it starts; they are never stored, logged, or returned."
      },
      "PlankaImportConnection": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "planka"
            ],
            "description": "Import source: PLANKA."
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "description": "Address of the PLANKA instance.",
            "example": "https://planka.example.com"
          },
          "apiKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096,
            "description": "A PLANKA API key. Send it, or username and password. Used only for this import and never stored or logged."
          },
          "username": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Username or email of a PLANKA account, used with password when no API key is sent."
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096,
            "description": "Password of that PLANKA account. Used only for this import and never stored or logged."
          }
        },
        "required": [
          "source",
          "url"
        ],
        "description": "Sign-in for a PLANKA instance, with an API key or a username and password."
      },
      "PlaneImportConnection": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "plane"
            ],
            "description": "Import source: Plane."
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "description": "Address of the Plane instance, e.g. https://app.plane.so for Plane Cloud.",
            "example": "https://planka.example.com"
          },
          "apiKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096,
            "description": "A Plane personal access token. Used only for this import and never stored or logged."
          },
          "workspaceSlug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Slug of the Plane workspace to read. Optional when the URL already names it.",
            "example": "acme"
          }
        },
        "required": [
          "source",
          "url",
          "apiKey"
        ],
        "description": "Sign-in for Plane Cloud or another Plane instance, with a personal access token."
      },
      "LinearImportConnection": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "linear"
            ],
            "description": "Import source: Linear."
          },
          "apiKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096,
            "description": "A Linear personal API key. Used only for this import and never stored or logged."
          }
        },
        "required": [
          "source",
          "apiKey"
        ],
        "description": "Sign-in for Linear, with a personal API key."
      },
      "JiraImportConnection": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "jira"
            ],
            "description": "Import source: Jira."
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "description": "Address of the Jira site, e.g. https://your-site.atlassian.net for Jira Cloud, or your own domain for Jira Data Center.",
            "example": "https://your-site.atlassian.net"
          },
          "email": {
            "type": "string",
            "minLength": 1,
            "maxLength": 320,
            "description": "Email of the Atlassian account the API token belongs to. Required for Jira Cloud; leave it out for Jira Data Center.",
            "example": "alex@example.com"
          },
          "apiToken": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096,
            "description": "A Jira Cloud API token, sent with email, or a Jira Data Center personal access token, sent without email. Used only for this import and never stored or logged."
          }
        },
        "required": [
          "source",
          "url",
          "apiToken"
        ],
        "description": "Sign-in for Jira Cloud, with an email and API token, or for Jira Data Center, with a personal access token."
      },
      "TrelloImportConnection": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "trello"
            ],
            "description": "Import source: Trello."
          },
          "token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096,
            "description": "A Trello token authorized for this albus instance. Used only for this import and never stored or logged."
          },
          "apiKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Trello API key, a public app identifier. Defaults to the server's TRELLO_API_KEY."
          }
        },
        "required": [
          "source",
          "token"
        ],
        "description": "Sign-in for Trello, with a token from the Trello authorize page and, when the server has no Trello app, your own Trello API key."
      },
      "KaneoImportConnection": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "kaneo"
            ],
            "description": "Import source: another albus instance."
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048,
            "description": "Address of the albus instance to import from.",
            "example": "https://planka.example.com"
          },
          "apiKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096,
            "description": "An API key from that albus instance. Used only for this import and never stored or logged."
          }
        },
        "required": [
          "source",
          "url",
          "apiKey"
        ],
        "description": "Sign-in for another albus instance, with an API key from it."
      },
      "ImportRunEnvelope": {
        "type": "object",
        "properties": {
          "run": {
            "$ref": "#/components/schemas/ImportRun"
          }
        },
        "required": [
          "run"
        ],
        "description": "One import run."
      },
      "ImportRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the import run.",
            "example": "h7i3jtaehpaixygugf24uy51"
          },
          "workspaceId": {
            "type": "string",
            "description": "ID of the workspace the projects are imported into.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          },
          "source": {
            "type": "string",
            "enum": [
              "planka",
              "plane",
              "linear",
              "jira",
              "trello",
              "kaneo"
            ],
            "description": "Source the projects are imported from. `kaneo` is another instance of this app, reached by URL and API key.",
            "example": "linear"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "completed",
              "failed"
            ],
            "description": "completed once every selected project was attempted, even if some failed; check each project's status. failed means the run itself stopped.",
            "example": "running"
          },
          "includeComments": {
            "type": "boolean",
            "description": "Whether task comments are imported.",
            "example": true
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Latest progress line while the run is running.",
            "example": "Reading Website redesign"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why the run stopped. Null unless `status` is `failed`.",
            "example": "The import was interrupted before it finished."
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportRunProject"
            },
            "description": "The selected source projects, in import order."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the import started, in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time the import finished or stopped, in UTC. Null while it is running.",
            "example": "2026-11-18T10:47:30.000Z"
          }
        },
        "required": [
          "id",
          "workspaceId",
          "source",
          "status",
          "includeComments",
          "message",
          "error",
          "projects",
          "createdAt",
          "finishedAt"
        ],
        "description": "An import of one or more source projects into a workspace, with its progress and outcome. A run whose server stopped reporting progress for more than two minutes is reported as failed."
      },
      "ImportRunProject": {
        "type": "object",
        "properties": {
          "sourceId": {
            "type": "string",
            "description": "ID of the project in the source.",
            "example": "1357924680"
          },
          "name": {
            "type": "string",
            "description": "Name of the project in the source, or `Untitled project` when it has none.",
            "example": "Website redesign"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "completed",
              "failed"
            ],
            "description": "Progress of this project: `pending` (not started yet), `running` (being read or saved), `completed` (saved as a new project), or `failed` (see `error`).",
            "example": "completed"
          },
          "projectId": {
            "type": [
              "string",
              "null"
            ],
            "description": "The albus project created by the import, once completed.",
            "example": "cef5d6uaajgxwpe38vkp4khl"
          },
          "projectSlug": {
            "type": [
              "string",
              "null"
            ],
            "description": "Key of the created project, taken from the source project's key when it has one or derived from its name, and made unique in the workspace. Null until the project is completed.",
            "example": "WEB"
          },
          "counts": {
            "$ref": "#/components/schemas/ImportCounts"
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Notes about data that could not be imported as is, such as tasks assigned to people who are not workspace members.",
            "example": [
              "1 task was assigned to someone who is not a member of this workspace (Sam Lee). Invite them, then assign the task."
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why this project failed. Null unless `status` is `failed`.",
            "example": "The source took too long to answer."
          }
        },
        "required": [
          "sourceId",
          "name",
          "status",
          "projectId",
          "projectSlug",
          "counts",
          "warnings",
          "error"
        ],
        "description": "One selected source project and its import outcome."
      },
      "ImportCounts": {
        "type": "object",
        "properties": {
          "columns": {
            "type": "integer",
            "description": "Number of columns on the new project. When the source has no columns, the default columns are kept and counted.",
            "example": 4
          },
          "tasks": {
            "type": "integer",
            "description": "Number of tasks imported.",
            "example": 120
          },
          "labels": {
            "type": "integer",
            "description": "Number of distinct label names used on the imported tasks. Workspace labels with the same name are reused.",
            "example": 8
          },
          "comments": {
            "type": "integer",
            "description": "Number of comments imported. 0 when comments were not included.",
            "example": 315
          },
          "assignees": {
            "type": "integer",
            "description": "Tasks that were assigned to a workspace member.",
            "example": 96
          },
          "relations": {
            "type": "integer",
            "description": "Number of relations between tasks imported.",
            "example": 12
          }
        },
        "required": [
          "columns",
          "tasks",
          "labels",
          "comments",
          "assignees",
          "relations"
        ],
        "description": "What was written for one project. All zero until the project is completed."
      },
      "ImportRunList": {
        "type": "object",
        "properties": {
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportRun"
            },
            "description": "Up to 20 import runs, newest first."
          }
        },
        "required": [
          "runs"
        ],
        "description": "Recent import runs."
      },
      "TrelloAuthorizeUrl": {
        "type": "object",
        "properties": {
          "authorizeUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Trello page where the user approves read access for albus and copies a token. The token is read-only and expires after one day. null when the server has no TRELLO_API_KEY; the user then sends their own Trello API key with the token."
          }
        },
        "required": [
          "authorizeUrl"
        ],
        "description": "Link for getting a Trello token to import with."
      },
      "CurrentUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the user.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "name": {
            "type": "string",
            "description": "Display name of the user.",
            "example": "Jane Doe"
          },
          "email": {
            "type": "string",
            "description": "Email address of the user.",
            "example": "jane@example.com"
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the user's profile picture: an uploaded avatar under `/api/user/avatar/{id}` or a URL from a sign-in provider. Null when none is set.",
            "example": "/api/user/avatar/yodwh0iimi26g59fib7eqzer"
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "description": "Instance role of the user: `admin` for an instance administrator, `user`, or the name of a custom instance role. Several roles are comma-separated. Null when no role is set. This is not a workspace role.",
            "example": "user"
          },
          "managedProfileFields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "name",
                "image",
                "locale"
              ]
            },
            "description": "Profile fields the custom OAuth/OIDC provider manages for this user. albus updates them at sign-in and refuses changes to them.",
            "example": [
              "name",
              "image"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "image",
          "role",
          "managedProfileFields"
        ],
        "description": "The signed-in user's profile."
      },
      "UserAvatar": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the stored avatar. A new ID is issued every time the avatar is replaced.",
            "example": "yodwh0iimi26g59fib7eqzer"
          },
          "url": {
            "type": "string",
            "description": "Root-relative public URL of the stored avatar, served by `getUserAvatar` at /api/user/avatar/{id}.",
            "example": "/api/user/avatar/yodwh0iimi26g59fib7eqzer"
          },
          "size": {
            "type": "number",
            "description": "Decoded size of the image, in bytes.",
            "example": 48213
          }
        },
        "required": [
          "id",
          "url",
          "size"
        ],
        "description": "An avatar image uploaded for the current user."
      },
      "UserAvatarDeleted": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean",
            "description": "False when the user had no uploaded avatar to remove.",
            "example": true
          }
        },
        "required": [
          "deleted"
        ],
        "description": "Result of removing the current user's uploaded avatar."
      },
      "ActiveSessionList": {
        "type": "object",
        "properties": {
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActiveSession"
            },
            "description": "The user's unexpired sessions. The session making the request comes first when it is in the list, then the others from most to least recently active."
          }
        },
        "required": [
          "sessions"
        ],
        "description": "A user's unexpired sessions."
      },
      "ActiveSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the session. Session tokens are never returned.",
            "example": "soermrtacx0z70uq94qjhn8o"
          },
          "browser": {
            "type": [
              "string",
              "null"
            ],
            "description": "Browser read from the session's user agent: Edge, Opera, Samsung Internet, Firefox, Chrome or Safari. Null when the user agent is missing or not recognized.",
            "example": "Firefox"
          },
          "os": {
            "type": [
              "string",
              "null"
            ],
            "description": "Operating system or device read from the session's user agent: iPhone, iPad, Android, ChromeOS, macOS, Windows or Linux. Null when the user agent is missing or not recognized.",
            "example": "macOS"
          },
          "ipAddress": {
            "type": [
              "string",
              "null"
            ],
            "description": "IP address the session was created from, as recorded at sign-in. Null when it was not recorded.",
            "example": "203.0.113.24"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the session was created (the sign-in), in UTC.",
            "example": "2026-11-18T10:42:00.000Z"
          },
          "lastActiveAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the session was last refreshed, in UTC. Sessions refresh about once a day while in use.",
            "example": "2026-11-30T08:15:00.000Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the session expires unless it is refreshed or signed out first, in UTC.",
            "example": "2026-12-07T08:15:00.000Z"
          },
          "current": {
            "type": "boolean",
            "description": "True for the session making this request.",
            "example": false
          }
        },
        "required": [
          "id",
          "browser",
          "os",
          "ipAddress",
          "createdAt",
          "lastActiveAt",
          "expiresAt",
          "current"
        ],
        "description": "An unexpired sign-in session of a user, with the device it was created from."
      },
      "RevokedSessions": {
        "type": "object",
        "properties": {
          "revoked": {
            "type": "integer",
            "description": "Number of sessions that were signed out.",
            "example": 1
          }
        },
        "required": [
          "revoked"
        ],
        "description": "Result of signing out sessions. Signed-out sessions are deleted and their realtime connections closed."
      },
      "AdminOverview": {
        "type": "object",
        "properties": {
          "users": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "description": "Number of user accounts, guests included.",
                "example": 42
              },
              "activeLast30Days": {
                "type": "integer",
                "description": "Non-deactivated users with a session refreshed in the last 30 days, counted once per user. Expired bans do not deactivate an account. Revoked or removed sessions do not contribute.",
                "example": 31
              },
              "deactivated": {
                "type": "integer",
                "description": "Number of accounts that are deactivated.",
                "example": 2
              }
            },
            "required": [
              "total",
              "activeLast30Days",
              "deactivated"
            ],
            "description": "User counts."
          },
          "workspaces": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "description": "Number of workspaces, archived ones included.",
                "example": 6
              },
              "archived": {
                "type": "integer",
                "description": "Number of archived workspaces.",
                "example": 1
              }
            },
            "required": [
              "total",
              "archived"
            ],
            "description": "Workspace counts."
          },
          "recentUsers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "ID of the user.",
                  "example": "dvbh5d4ue1zvi3duyefsoqma"
                },
                "name": {
                  "type": "string",
                  "description": "Display name of the user.",
                  "example": "Ada Lovelace"
                },
                "email": {
                  "type": "string",
                  "description": "Email address the user signs in with.",
                  "example": "ada@example.com"
                },
                "image": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "URL of the user's profile picture: a picture from their sign-in provider, or the path of an uploaded picture under `/api/user/avatar/`. Null when they have none.",
                  "example": "/api/user/avatar/yodwh0iimi26g59fib7eqzer"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Time the account was created, in UTC.",
                  "example": "2026-10-04T08:15:00.000Z"
                }
              },
              "required": [
                "id",
                "name",
                "email",
                "image",
                "createdAt"
              ]
            },
            "maxItems": 5,
            "description": "Up to five newest accounts, newest first."
          },
          "recentActions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "ID of the audit log entry.",
                  "example": "uytnprmbr8mey08ra7pb28qm"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Time the action happened, in UTC.",
                  "example": "2026-11-30T14:22:05.000Z"
                },
                "action": {
                  "type": "string",
                  "description": "Dotted action name in the form `<category>.<verb>`, for example `user.role_changed` or `workspace.archived`.",
                  "example": "user.role_changed"
                },
                "actor": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the user who performed the action. Null when that account was deleted.",
                      "example": "vpptt8t3d7ft91y45poatb3p"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the actor when the action happened, or null when unknown.",
                      "example": "Grace Hopper"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Email address of the actor when the action happened, or null when unknown.",
                      "example": "grace@example.com"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "email"
                  ],
                  "description": "User who performed the action."
                },
                "targetType": {
                  "type": "string",
                  "description": "Kind of target the action was about, such as `user`, `workspace`, `role`, `webhook` or `instance`.",
                  "example": "user"
                },
                "targetId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ID of the target, or null when the action has no single target, such as a settings change.",
                  "example": "dvbh5d4ue1zvi3duyefsoqma"
                },
                "targetLabel": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Name or email of the target when the action happened, kept after the target is renamed or deleted. Null when not recorded.",
                  "example": "ada@example.com"
                }
              },
              "required": [
                "id",
                "createdAt",
                "action",
                "actor",
                "targetType",
                "targetId",
                "targetLabel"
              ]
            },
            "maxItems": 5,
            "description": "Up to five newest audit log entries, newest first, without metadata, IP address or user agent."
          },
          "services": {
            "type": "object",
            "properties": {
              "checkedAt": {
                "type": "string",
                "format": "date-time",
                "description": "Time the checks ran, in UTC.",
                "example": "2026-12-01T10:15:30.000Z"
              },
              "api": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "database": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "realtime": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "redis": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "email": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "storage": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              }
            },
            "required": [
              "checkedAt",
              "api",
              "database",
              "realtime",
              "redis",
              "email",
              "storage"
            ],
            "description": "Status of each service, as in the system status response without details."
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "smtp_not_configured",
                "smtp_unreachable",
                "redis_unreachable",
                "storage_incomplete",
                "storage_unreachable",
                "registration_without_email",
                "no_second_admin"
              ],
              "description": "Configuration warning. `smtp_not_configured`: email delivery is not set up. `smtp_unreachable`: the SMTP server is configured but not reachable. `redis_unreachable`: Redis is configured but not healthy. `storage_incomplete`: object storage is only partly configured. `storage_unreachable`: object storage is configured but not reachable. `registration_without_email`: registration is open without email delivery. `no_second_admin`: fewer than two active administrators.",
              "example": "no_second_admin"
            },
            "description": "Configuration problems to fix. Empty when there are none."
          }
        },
        "required": [
          "users",
          "workspaces",
          "recentUsers",
          "recentActions",
          "services",
          "warnings"
        ],
        "description": "Summary of the instance for the administration home page."
      },
      "InstanceAccess": {
        "type": "object",
        "properties": {
          "permissions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "users:read",
                "users:create",
                "users:update",
                "users:disable",
                "users:delete",
                "users:credentials",
                "users:sessions",
                "users:api_keys",
                "workspaces:read",
                "workspaces:manage",
                "workspaces:archive",
                "workspaces:delete",
                "audit:read",
                "system:read",
                "instance:settings",
                "roles:manage"
              ]
            },
            "description": "Instance permissions the caller's roles grant. Every permission for the built-in `admin` role; empty for users with only the `user` role. Instance permissions. `users:*` cover reading, creating, updating, deactivating and deleting users and managing their credentials, sessions and API keys; `workspaces:*` cover reading, managing members, archiving and deleting workspaces; `audit:read` reads the audit log; `system:read` reads system status and sends test emails; `instance:settings` changes instance settings, providers and webhooks; `roles:manage` manages custom roles.",
            "example": [
              "users:read",
              "audit:read"
            ]
          }
        },
        "required": [
          "permissions"
        ],
        "description": "The instance permissions of the signed-in user."
      },
      "AdminUserList": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminUser"
            },
            "description": "Users on this page, newest account first."
          },
          "total": {
            "type": "integer",
            "description": "Number of users matching the search, across all pages.",
            "example": 42
          }
        },
        "required": [
          "users",
          "total"
        ],
        "description": "One page of users."
      },
      "AdminUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the user.",
            "example": "dvbh5d4ue1zvi3duyefsoqma"
          },
          "name": {
            "type": "string",
            "description": "Display name of the user.",
            "example": "Ada Lovelace"
          },
          "email": {
            "type": "string",
            "description": "Email address the user signs in with.",
            "example": "ada@example.com"
          },
          "emailVerified": {
            "type": "boolean",
            "description": "Whether the user has confirmed their email address.",
            "example": true
          },
          "isAnonymous": {
            "type": "boolean",
            "description": "Whether this is a guest account created without an email address.",
            "example": false
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL of the user's profile picture: a picture from their sign-in provider, or the path of an uploaded picture under `/api/user/avatar/`. Null when they have none.",
            "example": "/api/user/avatar/yodwh0iimi26g59fib7eqzer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the account was created, in UTC.",
            "example": "2026-10-04T08:15:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the account was last changed, in UTC.",
            "example": "2026-11-18T16:42:10.000Z"
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "description": "Instance roles as a comma-separated list: `admin`, `user`, or custom role names. Null when no role is stored, which grants no instance permissions.",
            "example": "user"
          },
          "banned": {
            "type": "boolean",
            "description": "Whether the account is deactivated and cannot sign in. False once a ban's expiry time has passed.",
            "example": false
          },
          "banReason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason stored with the deactivation, or null when the account was never deactivated or has been reactivated.",
            "example": null
          },
          "banExpires": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time a deactivation ends, in UTC. Null when the account is not deactivated or the deactivation has no end; administrators deactivate without an end.",
            "example": null
          },
          "lastActiveAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time one of the user's current sessions was last refreshed, in UTC. Null when they have no session.",
            "example": "2026-11-30T21:03:44.000Z"
          },
          "signInMethods": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Linked sign-in methods in alphabetical order: `credential` (password), `github`, `google`, `discord`, or `custom` (OIDC). Empty when the user has none, for example before they choose a password.",
            "example": [
              "credential",
              "github"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "email",
          "emailVerified",
          "isAnonymous",
          "image",
          "createdAt",
          "updatedAt",
          "role",
          "banned",
          "banReason",
          "banExpires",
          "lastActiveAt",
          "signInMethods"
        ],
        "description": "A user account as administrators see it."
      },
      "AdminWorkspaceList": {
        "type": "object",
        "properties": {
          "workspaces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminWorkspace"
            },
            "description": "Workspaces on this page, newest first."
          },
          "total": {
            "type": "integer",
            "description": "Number of workspaces matching the search, across all pages.",
            "example": 3
          }
        },
        "required": [
          "workspaces",
          "total"
        ],
        "description": "One page of workspaces."
      },
      "AdminWorkspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the workspace.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          },
          "name": {
            "type": "string",
            "description": "Display name of the workspace.",
            "example": "Acme Engineering"
          },
          "slug": {
            "type": "string",
            "description": "URL-safe identifier of the workspace.",
            "example": "acme-engineering"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the workspace was created, in UTC.",
            "example": "2026-09-12T10:00:00.000Z"
          },
          "memberCount": {
            "type": "integer",
            "description": "Number of members, owners included.",
            "example": 12
          },
          "projectCount": {
            "type": "integer",
            "description": "Number of projects, archived projects included.",
            "example": 7
          },
          "owners": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "ID of the user.",
                  "example": "vpptt8t3d7ft91y45poatb3p"
                },
                "name": {
                  "type": "string",
                  "description": "Display name of the user.",
                  "example": "Grace Hopper"
                },
                "email": {
                  "type": "string",
                  "description": "Email address of the user.",
                  "example": "grace@example.com"
                }
              },
              "required": [
                "id",
                "name",
                "email"
              ]
            },
            "description": "Members who hold the `owner` role. Empty when the workspace has no owner, for example after the owner's account was deleted."
          },
          "archivedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time an administrator archived the workspace, in UTC, or null when it is active.",
            "example": null
          },
          "archivedBy": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "ID of the user.",
                "example": "vpptt8t3d7ft91y45poatb3p"
              },
              "name": {
                "type": "string",
                "description": "Display name of the user.",
                "example": "Grace Hopper"
              },
              "email": {
                "type": "string",
                "description": "Email address of the user.",
                "example": "grace@example.com"
              }
            },
            "required": [
              "id",
              "name",
              "email"
            ],
            "description": "Administrator who archived the workspace. Null when it is active or when that account was deleted."
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "createdAt",
          "memberCount",
          "projectCount",
          "owners",
          "archivedAt",
          "archivedBy"
        ],
        "description": "A workspace as administrators see it."
      },
      "AdminWorkspaceMember": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "ID of the member's user account.",
            "example": "vpptt8t3d7ft91y45poatb3p"
          },
          "name": {
            "type": "string",
            "description": "Display name of the member.",
            "example": "Grace Hopper"
          },
          "email": {
            "type": "string",
            "description": "Email address of the member.",
            "example": "grace@example.com"
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL or API path of the member's profile picture, or null when they have none.",
            "example": null
          },
          "role": {
            "type": "string",
            "description": "Workspace role: `owner`, `admin`, `member`, `collaborator`, `viewer`, or a custom role name.",
            "example": "member"
          },
          "joinedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the user joined the workspace, in UTC.",
            "example": "2026-09-15T13:20:00.000Z"
          }
        },
        "required": [
          "userId",
          "name",
          "email",
          "image",
          "role",
          "joinedAt"
        ],
        "description": "A member of a workspace and their role."
      },
      "AdminSystemStatus": {
        "type": "object",
        "properties": {
          "checkedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the checks ran, in UTC.",
            "example": "2026-12-01T10:15:30.000Z"
          },
          "version": {
            "type": [
              "string",
              "null"
            ],
            "description": "albus release version of this API instance, or null when it is unknown.",
            "example": "2.14.0"
          },
          "api": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "uptimeSeconds": {
                "type": "integer",
                "description": "Seconds since this API process started.",
                "example": 86400
              },
              "nodeVersion": {
                "type": "string",
                "description": "Node.js version running this API instance.",
                "example": "v22.12.0"
              }
            },
            "required": [
              "status",
              "uptimeSeconds",
              "nodeVersion"
            ],
            "description": "This API process. Its status is always `ok`."
          },
          "database": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "serverVersion": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "PostgreSQL server version, or null when the database could not be reached.",
                "example": "16.6"
              },
              "latencyMs": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Round-trip time of a test query in milliseconds, or null when the database could not be reached.",
                "example": 3
              },
              "migrationsApplied": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Number of applied database migrations, or null when they could not be counted.",
                "example": 128
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Short failure category such as TIMEOUT, ECONNREFUSED or HTTP_403, or null when the check passed or did not run. Never contains hosts, credentials or server messages.",
                "example": null
              }
            },
            "required": [
              "status",
              "serverVersion",
              "latencyMs",
              "migrationsApplied",
              "errorCode"
            ],
            "description": "Connection to PostgreSQL."
          },
          "realtime": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "adapter": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "in-memory",
                  "redis",
                  null
                ],
                "description": "How events reach WebSocket clients: `in-memory` for a single instance, `redis` to fan out across instances. Null before WebSockets start.",
                "example": "in-memory"
              },
              "connections": {
                "type": "integer",
                "description": "Open WebSocket connections on this API instance.",
                "example": 14
              },
              "connectedUsers": {
                "type": "integer",
                "description": "Distinct people with an open connection to this instance.",
                "example": 9
              }
            },
            "required": [
              "status",
              "adapter",
              "connections",
              "connectedUsers"
            ],
            "description": "Realtime delivery on this API instance. `warning` when Redis fan-out is used but Redis is not healthy; `down` before WebSockets start."
          },
          "redis": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "mode": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "standalone",
                  "sentinel",
                  "cluster",
                  null
                ],
                "description": "Redis deployment mode, or null when Redis is not configured or its configuration is invalid.",
                "example": null
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Short failure category such as TIMEOUT, ECONNREFUSED or HTTP_403, or null when the check passed or did not run. Never contains hosts, credentials or server messages.",
                "example": null
              }
            },
            "required": [
              "status",
              "mode",
              "errorCode"
            ],
            "description": "Redis, used only to fan realtime events out across API instances. `not_configured` is healthy for a single instance."
          },
          "email": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "configured": {
                "type": "boolean",
                "description": "Whether the service is configured on this instance.",
                "example": true
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Short failure category such as TIMEOUT, ECONNREFUSED or HTTP_403, or null when the check passed or did not run. Never contains hosts, credentials or server messages.",
                "example": null
              }
            },
            "required": [
              "status",
              "configured",
              "errorCode"
            ],
            "description": "Connection to the SMTP server."
          },
          "storage": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ok",
                  "warning",
                  "not_configured",
                  "down"
                ],
                "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                "example": "ok"
              },
              "configured": {
                "type": "boolean",
                "description": "Whether the service is configured on this instance.",
                "example": true
              },
              "errorCode": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Short failure category such as TIMEOUT, ECONNREFUSED or HTTP_403, or null when the check passed or did not run. Never contains hosts, credentials or server messages.",
                "example": null
              }
            },
            "required": [
              "status",
              "configured",
              "errorCode"
            ],
            "description": "Object storage for uploads. `warning` when an S3 bucket answers with 403, which upload-only access policies do on purpose."
          },
          "auth": {
            "type": "object",
            "properties": {
              "passwordSignIn": {
                "type": "boolean",
                "description": "Whether the email and password sign-in form is offered.",
                "example": true
              },
              "emailOtpSignIn": {
                "type": "boolean",
                "description": "Whether people can sign in with a one-time code sent by email.",
                "example": true
              },
              "registration": {
                "type": "boolean",
                "description": "Whether new accounts can be created.",
                "example": true
              },
              "passwordRegistration": {
                "type": "boolean",
                "description": "Whether new accounts can sign up with a password.",
                "example": true
              },
              "guestAccess": {
                "type": "boolean",
                "description": "Whether people can continue as a guest without an email address.",
                "example": false
              },
              "workspaceCreation": {
                "type": "boolean",
                "description": "Whether every user can create workspaces. False when only administrators can.",
                "example": true
              },
              "providers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "enum": [
                        "github",
                        "google",
                        "discord",
                        "custom"
                      ],
                      "description": "Sign-in provider: `github`, `google`, `discord`, or `custom` for the OIDC provider.",
                      "example": "github"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the provider.",
                      "example": "GitHub"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "warning",
                        "not_configured",
                        "down"
                      ],
                      "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                      "example": "ok"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "status"
                  ]
                },
                "description": "Social and OIDC sign-in providers. `warning` means the provider is only partly configured."
              }
            },
            "required": [
              "passwordSignIn",
              "emailOtpSignIn",
              "registration",
              "passwordRegistration",
              "guestAccess",
              "workspaceCreation",
              "providers"
            ],
            "description": "Sign-in options this instance offers. Never includes client IDs, secrets or provider URLs."
          },
          "integrations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Provider type, such as `github` or `slack`.",
                  "example": "github"
                },
                "name": {
                  "type": "string",
                  "description": "Display name of the provider.",
                  "example": "GitHub"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "warning",
                    "not_configured",
                    "down"
                  ],
                  "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                  "example": "ok"
                },
                "requiresInstanceSetup": {
                  "type": "boolean",
                  "description": "Whether the provider needs instance settings. Others are connected per project.",
                  "example": true
                },
                "connectedProjects": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Projects with an active connection to this provider. Null when the database could not be read.",
                  "example": 4
                }
              },
              "required": [
                "type",
                "name",
                "status",
                "requiresInstanceSetup",
                "connectedProjects"
              ]
            },
            "description": "Integration providers and their use."
          },
          "doctor": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "enum": [
                    "public_url",
                    "pgvector",
                    "storage",
                    "email",
                    "inbound_email",
                    "ai_provider"
                  ],
                  "description": "Check name: `public_url` (web app URL and HTTPS), `pgvector` (PostgreSQL vector extension), `storage`, `email` (outbound SMTP), `inbound_email` or `ai_provider`.",
                  "example": "public_url"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "warning",
                    "not_configured",
                    "down"
                  ],
                  "description": "Health of the service. `ok`: working. `warning`: works with a problem, or is only partly configured. `not_configured`: optional and switched off, which is a healthy state. `down`: configured but not reachable.",
                  "example": "ok"
                },
                "detail": {
                  "type": "string",
                  "description": "Short human-readable result of the check.",
                  "example": "Public URL configured"
                },
                "remediation": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Suggested fix, or null when nothing needs to be done.",
                  "example": null
                }
              },
              "required": [
                "id",
                "status",
                "detail",
                "remediation"
              ]
            },
            "description": "Setup diagnostics with suggested fixes. Never contains secrets or credentials."
          }
        },
        "required": [
          "checkedAt",
          "version",
          "api",
          "database",
          "realtime",
          "redis",
          "email",
          "storage",
          "auth",
          "integrations"
        ],
        "description": "Health of this API instance and the services it uses. Only statuses, counts and short error categories are included."
      },
      "AdminTestEmailResult": {
        "type": "object",
        "properties": {
          "sent": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Always `true`: the mail server accepted the email."
          },
          "to": {
            "type": "string",
            "description": "The administrator's own address, the only recipient.",
            "example": "grace@example.com"
          }
        },
        "required": [
          "sent",
          "to"
        ],
        "description": "Confirmation that the test email was accepted."
      },
      "AdminWorkspaceArchiveState": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the workspace.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          },
          "archivedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time the workspace was archived, in UTC, or null when it is active.",
            "example": "2026-12-01T09:30:00.000Z"
          }
        },
        "required": [
          "id",
          "archivedAt"
        ],
        "description": "Whether a workspace is archived."
      },
      "AdminDeletedWorkspace": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the deleted workspace.",
            "example": "cfklow33tpuxgpxko9nxqllg"
          }
        },
        "required": [
          "id"
        ],
        "description": "The workspace that was deleted."
      },
      "AdminAuditLog": {
        "type": "object",
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminAuditLogEntry"
            },
            "description": "Entries on this page, newest first."
          },
          "total": {
            "type": "integer",
            "description": "Number of entries matching the filters, across all pages.",
            "example": 318
          }
        },
        "required": [
          "entries",
          "total"
        ],
        "description": "One page of audit log entries."
      },
      "AdminAuditLogEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the audit log entry.",
            "example": "uytnprmbr8mey08ra7pb28qm"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the action happened, in UTC.",
            "example": "2026-11-30T14:22:05.000Z"
          },
          "action": {
            "type": "string",
            "description": "Dotted action name in the form `<category>.<verb>`, for example `user.role_changed` or `workspace.archived`.",
            "example": "user.role_changed"
          },
          "actor": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ID of the user who performed the action. Null when that account was deleted.",
                "example": "vpptt8t3d7ft91y45poatb3p"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Name of the actor when the action happened, or null when unknown.",
                "example": "Grace Hopper"
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Email address of the actor when the action happened, or null when unknown.",
                "example": "grace@example.com"
              }
            },
            "required": [
              "id",
              "name",
              "email"
            ],
            "description": "User who performed the action."
          },
          "targetType": {
            "type": "string",
            "description": "Kind of target the action was about, such as `user`, `workspace`, `role`, `webhook` or `instance`.",
            "example": "user"
          },
          "targetId": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of the target, or null when the action has no single target, such as a settings change.",
            "example": "dvbh5d4ue1zvi3duyefsoqma"
          },
          "targetLabel": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name or email of the target when the action happened, kept after the target is renamed or deleted. Null when not recorded.",
            "example": "ada@example.com"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {},
            "description": "Action-specific details, such as the old and new role for `user.role_changed`. Never contains passwords, tokens, reset links or API key values. Null when the action has none.",
            "example": {
              "from": "user",
              "to": "support"
            }
          },
          "ipAddress": {
            "type": [
              "string",
              "null"
            ],
            "description": "IP address the request came from, or null when it was not known.",
            "example": "203.0.113.24"
          },
          "userAgent": {
            "type": [
              "string",
              "null"
            ],
            "description": "User agent of the request, cut to 512 characters, or null when it was not known.",
            "example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15"
          }
        },
        "required": [
          "id",
          "createdAt",
          "action",
          "actor",
          "targetType",
          "targetId",
          "targetLabel",
          "metadata",
          "ipAddress",
          "userAgent"
        ],
        "description": "One recorded administrative action."
      },
      "CreatedAdminUser": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/AdminUser"
          },
          "passwordSetupEmail": {
            "type": "string",
            "enum": [
              "sent",
              "failed",
              "not_configured",
              "not_needed"
            ],
            "description": "Whether the link to choose a password was emailed. `sent`: the mail server accepted it. `failed`: sending failed, so send a password reset email later. `not_configured`: email delivery is not set up. `not_needed`: the account is for single sign-on and has no password. The link itself is never returned.",
            "example": "sent"
          }
        },
        "required": [
          "user",
          "passwordSetupEmail"
        ],
        "description": "A newly created user and whether their password link was sent."
      },
      "AdminEmailSent": {
        "type": "object",
        "properties": {
          "sent": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Always `true`: the mail server accepted the email."
          }
        },
        "required": [
          "sent"
        ],
        "description": "Confirmation that an email was sent."
      },
      "AdminEmailVerified": {
        "type": "object",
        "properties": {
          "emailVerified": {
            "type": "boolean",
            "enum": [
              true
            ],
            "description": "Always `true`: the address is verified, whether or not it already was."
          }
        },
        "required": [
          "emailVerified"
        ],
        "description": "Confirmation that the user's email address is verified."
      },
      "AdminUserAvatar": {
        "type": "object",
        "properties": {
          "image": {
            "type": "string",
            "description": "Path of the user's new profile picture, relative to the API origin.",
            "example": "/api/user/avatar/yodwh0iimi26g59fib7eqzer"
          }
        },
        "required": [
          "image"
        ],
        "description": "The user's new profile picture."
      },
      "AdminUserAvatarRemoved": {
        "type": "object",
        "properties": {
          "removed": {
            "type": "boolean",
            "description": "Whether a picture was removed. False when the user had no picture to remove.",
            "example": true
          }
        },
        "required": [
          "removed"
        ],
        "description": "Result of removing a user's profile picture."
      },
      "AdminDeletedUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the deleted user.",
            "example": "dvbh5d4ue1zvi3duyefsoqma"
          }
        },
        "required": [
          "id"
        ],
        "description": "The user that was deleted."
      },
      "InstanceRoleList": {
        "type": "object",
        "properties": {
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstanceRole"
            },
            "description": "Custom instance roles in alphabetical order by name."
          }
        },
        "required": [
          "roles"
        ],
        "description": "The custom instance roles."
      },
      "InstanceRole": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the role.",
            "example": "lwsddfbnw8ypo2y9nfsqay3p"
          },
          "name": {
            "type": "string",
            "description": "Name of the role, used to assign it to users.",
            "example": "support"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "users:read",
                "users:create",
                "users:update",
                "users:disable",
                "users:delete",
                "users:credentials",
                "users:sessions",
                "users:api_keys",
                "workspaces:read",
                "workspaces:manage",
                "workspaces:archive",
                "workspaces:delete",
                "audit:read",
                "system:read",
                "instance:settings"
              ]
            },
            "description": "Permissions the role grants. Instance permissions. `users:*` cover reading, creating, updating, deactivating and deleting users and managing their credentials, sessions and API keys; `workspaces:*` cover reading, managing members, archiving and deleting workspaces; `audit:read` reads the audit log; `system:read` reads system status and sends test emails; `instance:settings` changes instance settings, providers and webhooks; `roles:manage` manages custom roles.",
            "example": [
              "users:read",
              "users:credentials",
              "audit:read"
            ]
          },
          "userCount": {
            "type": "integer",
            "description": "Number of users who currently have this role.",
            "example": 3
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the role was created, in UTC.",
            "example": "2026-10-01T09:00:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the role was last changed, in UTC.",
            "example": "2026-11-12T15:30:00.000Z"
          }
        },
        "required": [
          "id",
          "name",
          "permissions",
          "userCount",
          "createdAt",
          "updatedAt"
        ],
        "description": "A custom instance role and the permissions it grants."
      },
      "DeletedInstanceRole": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the deleted role.",
            "example": "lwsddfbnw8ypo2y9nfsqay3p"
          }
        },
        "required": [
          "id"
        ],
        "description": "The role that was deleted."
      },
      "InstanceSettings": {
        "type": "object",
        "properties": {
          "instanceName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Saved name of the instance, or null for the default albus.",
            "example": "Acme Projects"
          },
          "instanceUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Web app URL from `KANEO_CLIENT_URL`. Read-only. Null when it is not set.",
            "example": "https://projects.example.com"
          },
          "registrationEnabled": {
            "type": "boolean",
            "description": "Whether anyone can create an account. When false, only people with a valid invitation can.",
            "example": true
          },
          "passwordRegistrationEnabled": {
            "type": "boolean",
            "description": "Whether new accounts can sign up with a password.",
            "example": true
          },
          "requireEmailVerification": {
            "type": "boolean",
            "description": "Whether new password sign-ups must confirm their email before they can sign in.",
            "example": false
          },
          "defaultRole": {
            "type": "string",
            "description": "Instance role given to new users: `user` or a custom role name.",
            "example": "user"
          },
          "workspaceCreationRestricted": {
            "type": "boolean",
            "description": "Whether only administrators can create workspaces.",
            "example": false
          },
          "disabledIntegrations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Integration provider types that are turned off, in alphabetical order.",
            "example": [
              "telegram"
            ]
          },
          "lockedByEnv": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "registrationEnabled",
                "passwordRegistrationEnabled",
                "workspaceCreationRestricted"
              ]
            },
            "description": "Settings an environment variable forces. Their values here are the effective ones, and changing them returns 409.",
            "example": []
          },
          "emailDeliveryConfigured": {
            "type": "boolean",
            "description": "Whether SMTP is configured, which `requireEmailVerification` needs.",
            "example": true
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Custom instance roles that can be the default role, in alphabetical order.",
            "example": [
              "support"
            ]
          },
          "integrationProviders": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Provider type used in `disabledIntegrations`: `github`, `gitea`, `gitlab`, `slack`, `mattermost`, `discord`, `generic-webhook`, `telegram` or `tangled`.",
                  "example": "slack"
                },
                "name": {
                  "type": "string",
                  "description": "Display name of the provider.",
                  "example": "Slack"
                }
              },
              "required": [
                "type",
                "name"
              ]
            },
            "description": "Integration providers that can be turned off."
          }
        },
        "required": [
          "instanceName",
          "instanceUrl",
          "registrationEnabled",
          "passwordRegistrationEnabled",
          "requireEmailVerification",
          "defaultRole",
          "workspaceCreationRestricted",
          "disabledIntegrations",
          "lockedByEnv",
          "emailDeliveryConfigured",
          "roles",
          "integrationProviders"
        ],
        "description": "Instance-wide settings with environment overrides applied, and the choices for the default role and integrations."
      },
      "AdminSmtpProviderConfig": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean",
            "description": "Whether an SMTP host is set.",
            "example": true
          },
          "lockedByEnv": {
            "type": "boolean",
            "description": "Whether environment variables set this configuration. When true, the values shown come from the environment and saving returns 409.",
            "example": false
          },
          "host": {
            "type": "string",
            "description": "SMTP server host name, or an empty string when not set.",
            "example": "smtp.example.com"
          },
          "port": {
            "type": "integer",
            "description": "SMTP server port. 587 when not set.",
            "example": 587
          },
          "secure": {
            "type": "boolean",
            "description": "Whether the connection uses TLS from the start (usually port 465) instead of upgrading with STARTTLS.",
            "example": false
          },
          "username": {
            "type": "string",
            "description": "User name for SMTP authentication, or an empty string for none.",
            "example": "mailer@example.com"
          },
          "hasPassword": {
            "type": "boolean",
            "description": "Whether a password is stored. The password itself is never returned.",
            "example": true
          },
          "from": {
            "type": "string",
            "description": "Sender address for outgoing email.",
            "example": "Projects <noreply@example.com>"
          }
        },
        "required": [
          "configured",
          "lockedByEnv",
          "host",
          "port",
          "secure",
          "username",
          "hasPassword",
          "from"
        ],
        "description": "Saved SMTP settings with the password redacted."
      },
      "AdminOidcProviderConfig": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean",
            "description": "Whether both an issuer and a client ID are set.",
            "example": true
          },
          "lockedByEnv": {
            "type": "boolean",
            "description": "Whether environment variables set this configuration. When true, the values shown come from the environment and saving returns 409.",
            "example": false
          },
          "issuer": {
            "type": "string",
            "description": "Issuer or discovery URL of the OIDC provider, or an empty string when not set.",
            "example": "https://id.example.com/realms/acme"
          },
          "clientId": {
            "type": "string",
            "description": "OAuth client ID registered with the provider, or an empty string when not set.",
            "example": "acme-web"
          },
          "hasClientSecret": {
            "type": "boolean",
            "description": "Whether a client secret is stored. The secret itself is never returned.",
            "example": true
          },
          "scopes": {
            "type": "string",
            "description": "Space-separated OAuth scopes requested at sign-in.",
            "example": "openid email profile groups"
          },
          "groupsClaim": {
            "type": "string",
            "description": "Name of the ID token claim that lists the user's groups.",
            "example": "groups"
          },
          "lockProfileFields": {
            "type": "boolean",
            "description": "Whether profile fields that come from the provider are locked against editing.",
            "example": false
          }
        },
        "required": [
          "configured",
          "lockedByEnv",
          "issuer",
          "clientId",
          "hasClientSecret",
          "scopes",
          "groupsClaim",
          "lockProfileFields"
        ],
        "description": "Saved OIDC settings with the client secret redacted."
      },
      "InstanceWebhookList": {
        "type": "object",
        "properties": {
          "webhooks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstanceWebhook"
            },
            "description": "Instance webhooks, newest first."
          },
          "signingConfigured": {
            "type": "boolean",
            "description": "Whether `NOTIFICATION_SECRET_ENCRYPTION_KEY` is set. Without it, webhooks can't be created and secrets can't be rotated.",
            "example": true
          }
        },
        "required": [
          "webhooks",
          "signingConfigured"
        ],
        "description": "The instance webhooks."
      },
      "InstanceWebhook": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri",
            "description": "URL that receives the deliveries as signed JSON POST requests. It must resolve to a public address, use HTTPS in production, and have no credentials or fragment.",
            "example": "https://hooks.example.com/support/audit"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "user",
                "session",
                "api_key",
                "workspace",
                "role",
                "instance",
                "email",
                "webhook"
              ]
            },
            "minItems": 1,
            "maxItems": 8,
            "description": "Audit log categories to deliver, matched against the part of the action before the dot: `user`, `session`, `api_key`, `workspace`, `role`, `instance`, `email` or `webhook`. Duplicates are removed.",
            "example": [
              "user",
              "workspace"
            ]
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the webhook receives deliveries. Disabling it fails its queued deliveries.",
            "example": true
          },
          "id": {
            "type": "string",
            "description": "ID of the instance webhook.",
            "example": "gnm03jdrqyti0vfrx300a17l"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the webhook was created, in UTC.",
            "example": "2026-11-01T12:00:00.000Z"
          }
        },
        "required": [
          "url",
          "categories",
          "enabled",
          "id",
          "createdAt"
        ],
        "description": "An instance webhook that receives administrative audit events. The signing secret is not included."
      },
      "InstanceWebhookSecret": {
        "type": "object",
        "properties": {
          "webhook": {
            "$ref": "#/components/schemas/InstanceWebhook"
          },
          "secret": {
            "type": "string",
            "description": "Signing secret, shown only in this response. Each delivery carries `x-kaneo-timestamp` and `x-kaneo-signature: sha256=<hex>`, the HMAC-SHA256 of `<timestamp>.<body>` with this secret.",
            "example": "pK3v9QxW2mZr7tYb4nLs8dHf6jCa1eUo0gRi5wVy-Xs"
          }
        },
        "required": [
          "webhook",
          "secret"
        ],
        "description": "A webhook and its signing secret."
      },
      "InstanceWebhookQueued": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the deleted webhook or of the queued delivery.",
            "example": "gnm03jdrqyti0vfrx300a17l"
          }
        },
        "required": [
          "id"
        ],
        "description": "ID of the affected webhook or delivery."
      },
      "InstanceWebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the delivery, also sent in the `x-kaneo-delivery` header.",
            "example": "k2r9w0d4n8yq1ztc6mhs3vbe"
          },
          "action": {
            "type": "string",
            "description": "Audit action that was delivered, such as `user.created`.",
            "example": "user.created"
          },
          "eventId": {
            "type": "string",
            "description": "ID of the audit log entry that was delivered, or of the generated test event.",
            "example": "uytnprmbr8mey08ra7pb28qm"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "failed"
            ],
            "description": "Delivery state. `pending`: queued or waiting for a retry. `succeeded`: the endpoint answered with a 2xx status. `failed`: no more attempts will be made.",
            "example": "succeeded"
          },
          "attempts": {
            "type": "integer",
            "description": "Number of sending attempts so far. A delivery is tried up to 3 times; network errors, timeouts and 408, 429 and 5xx responses are retried.",
            "example": 1
          },
          "statusCode": {
            "type": [
              "integer",
              "null"
            ],
            "description": "HTTP status of the last attempt, or null when there was no response.",
            "example": 200
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Failure category of the last attempt, such as `network`, `timeout`, `http` or `disabled`, or null when it succeeded or has not run.",
            "example": null
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the delivery was queued, in UTC.",
            "example": "2026-11-30T14:22:05.000Z"
          }
        },
        "required": [
          "id",
          "action",
          "eventId",
          "state",
          "attempts",
          "statusCode",
          "errorCode",
          "createdAt"
        ],
        "description": "One delivery attempt record, without its payload."
      },
      "AdminApiKeyList": {
        "type": "object",
        "properties": {
          "apiKeys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdminApiKey"
            },
            "description": "The user's API keys, newest first."
          }
        },
        "required": [
          "apiKeys"
        ],
        "description": "A user's API keys."
      },
      "AdminApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the API key.",
            "example": "wu1eutp17e82v57sxvtkz4tg"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name the owner gave the key, or null when unnamed.",
            "example": "CI deploys"
          },
          "start": {
            "type": [
              "string",
              "null"
            ],
            "description": "The first characters of the key, kept for recognizing it. Null when not stored. The key itself and its hash are never returned.",
            "example": "Xk3mQ9"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the key can be used. Disabled keys are rejected.",
            "example": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time the key was created, in UTC.",
            "example": "2026-10-20T11:00:00.000Z"
          },
          "lastUsedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time of the key's last recorded request, in UTC, or null when it has not been used.",
            "example": "2026-11-30T07:45:12.000Z"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Time the key stops working, in UTC, or null when it never expires.",
            "example": null
          }
        },
        "required": [
          "id",
          "name",
          "start",
          "enabled",
          "createdAt",
          "lastUsedAt",
          "expiresAt"
        ],
        "description": "Metadata of a user's API key, without the key itself."
      },
      "AdminRevokedApiKey": {
        "type": "object",
        "properties": {
          "revoked": {
            "type": "integer",
            "description": "Number of API keys revoked. Always 1 on success.",
            "example": 1
          }
        },
        "required": [
          "revoked"
        ],
        "description": "Result of revoking an API key."
      },
      "PluginList": {
        "type": "object",
        "properties": {
          "plugins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Plugin"
            },
            "description": "Every plugin installed on this instance."
          }
        },
        "required": [
          "plugins"
        ],
        "description": "The plugins installed on this instance."
      },
      "Plugin": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the plugin, unique on this instance.",
            "example": "acme-standup"
          },
          "name": {
            "type": "string",
            "description": "Display name of the plugin.",
            "example": "Standup"
          },
          "packageName": {
            "type": "string",
            "description": "Name of the package the plugin was loaded from.",
            "example": "@acme/standup-plugin"
          },
          "version": {
            "type": "string",
            "description": "Version of the installed plugin package.",
            "example": "1.2.0"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short description of the plugin. Null when it has none.",
            "example": "Posts a daily standup reminder."
          },
          "official": {
            "type": "boolean",
            "description": "Ships with albus. Official plugins are enabled in every workspace until a workspace admin turns them off.",
            "example": false
          },
          "settings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/PluginSettingField"
            },
            "description": "The workspace settings the plugin declares, keyed by setting key."
          },
          "web": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "entry": {
                "type": "string",
                "description": "Path of the plugin's web script, relative to the API base URL, with the plugin version as the `v` query parameter.",
                "example": "/plugins/acme-standup/assets/index.js?v=1.2.0"
              },
              "styles": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Path of the plugin's stylesheet, in the same form as `entry`. Null when the plugin has no stylesheet.",
                "example": "/plugins/acme-standup/assets/style.css?v=1.2.0"
              }
            },
            "required": [
              "entry",
              "styles"
            ],
            "description": "Web bundle paths, relative to the API base URL. Null when the plugin has no web entry."
          },
          "workspace": {
            "$ref": "#/components/schemas/WorkspacePluginState"
          }
        },
        "required": [
          "id",
          "name",
          "packageName",
          "version",
          "description",
          "official",
          "settings",
          "web",
          "workspace"
        ],
        "description": "A plugin installed on this instance. `workspace` holds its state in the requested workspace, and is null unless `workspaceId` was given."
      },
      "PluginSettingField": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "Label shown for the setting.",
                "example": "Reminder hour"
              },
              "description": {
                "type": "string",
                "description": "Help text shown with the setting. Absent when the plugin gives none.",
                "example": "Hour of the day, in UTC, to post the reminder."
              },
              "type": {
                "type": "string",
                "enum": [
                  "text"
                ],
                "description": "`text`: a string value."
              },
              "placeholder": {
                "type": "string",
                "description": "Placeholder text shown while the input is empty.",
                "example": "#general"
              },
              "multiline": {
                "type": "boolean",
                "description": "Whether the input is a multi-line text area.",
                "example": false
              },
              "required": {
                "type": "boolean",
                "description": "Whether the setting must have a value before the plugin can be turned on in a workspace. Absent means optional.",
                "example": true
              },
              "default": {
                "type": "string",
                "description": "Value used while the setting is unset.",
                "example": "#standup"
              }
            },
            "required": [
              "label",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "Label shown for the setting.",
                "example": "Reminder hour"
              },
              "description": {
                "type": "string",
                "description": "Help text shown with the setting. Absent when the plugin gives none.",
                "example": "Hour of the day, in UTC, to post the reminder."
              },
              "type": {
                "type": "string",
                "enum": [
                  "secret"
                ],
                "description": "`secret`: a string value that is stored but never returned; `configuredSecrets` reports whether it is set."
              },
              "placeholder": {
                "type": "string",
                "description": "Placeholder text shown while the input is empty.",
                "example": "#general"
              },
              "required": {
                "type": "boolean",
                "description": "Whether the setting must have a value before the plugin can be turned on in a workspace. Absent means optional.",
                "example": true
              }
            },
            "required": [
              "label",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "Label shown for the setting.",
                "example": "Reminder hour"
              },
              "description": {
                "type": "string",
                "description": "Help text shown with the setting. Absent when the plugin gives none.",
                "example": "Hour of the day, in UTC, to post the reminder."
              },
              "type": {
                "type": "string",
                "enum": [
                  "number"
                ],
                "description": "`number`: a finite number."
              },
              "min": {
                "type": "number",
                "description": "Smallest allowed value.",
                "example": 0
              },
              "max": {
                "type": "number",
                "description": "Largest allowed value.",
                "example": 23
              },
              "step": {
                "type": "number",
                "description": "Increment the input moves in.",
                "example": 1
              },
              "required": {
                "type": "boolean",
                "description": "Whether the setting must have a value before the plugin can be turned on in a workspace. Absent means optional.",
                "example": true
              },
              "default": {
                "type": "number",
                "description": "Value used while the setting is unset.",
                "example": 9
              }
            },
            "required": [
              "label",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "Label shown for the setting.",
                "example": "Reminder hour"
              },
              "description": {
                "type": "string",
                "description": "Help text shown with the setting. Absent when the plugin gives none.",
                "example": "Hour of the day, in UTC, to post the reminder."
              },
              "type": {
                "type": "string",
                "enum": [
                  "boolean"
                ],
                "description": "`boolean`: an on or off value."
              },
              "default": {
                "type": "boolean",
                "description": "Value used while the setting is unset. When absent, an unset boolean reads as `false`.",
                "example": false
              }
            },
            "required": [
              "label",
              "type"
            ]
          },
          {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "Label shown for the setting.",
                "example": "Reminder hour"
              },
              "description": {
                "type": "string",
                "description": "Help text shown with the setting. Absent when the plugin gives none.",
                "example": "Hour of the day, in UTC, to post the reminder."
              },
              "type": {
                "type": "string",
                "enum": [
                  "select"
                ],
                "description": "`select`: one value from `options`."
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string",
                      "description": "Value stored when this option is chosen.",
                      "example": "daily"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label shown for the option.",
                      "example": "Every day"
                    }
                  },
                  "required": [
                    "value",
                    "label"
                  ]
                },
                "description": "Choices the value must come from."
              },
              "required": {
                "type": "boolean",
                "description": "Whether the setting must have a value before the plugin can be turned on in a workspace. Absent means optional.",
                "example": true
              },
              "default": {
                "type": "string",
                "description": "Option value used while the setting is unset.",
                "example": "daily"
              }
            },
            "required": [
              "label",
              "type",
              "options"
            ]
          },
          {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "Label shown for the setting.",
                "example": "Reminder hour"
              },
              "description": {
                "type": "string",
                "description": "Help text shown with the setting. Absent when the plugin gives none.",
                "example": "Hour of the day, in UTC, to post the reminder."
              },
              "type": {
                "type": "string",
                "enum": [
                  "multiselect"
                ],
                "description": "`multiselect`: a list of values from `options`, without duplicates."
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string",
                      "description": "Value stored when this option is chosen.",
                      "example": "daily"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label shown for the option.",
                      "example": "Every day"
                    }
                  },
                  "required": [
                    "value",
                    "label"
                  ]
                },
                "description": "Choices the value must come from."
              },
              "default": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Option values used while the setting is unset. When absent, an unset multiselect reads as an empty list.",
                "example": [
                  "daily"
                ]
              }
            },
            "required": [
              "label",
              "type",
              "options"
            ]
          }
        ],
        "description": "A setting a plugin declares for workspaces, shown as a form field. `type` selects the field kind."
      },
      "WorkspacePluginState": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether the plugin is on in the workspace. Until a workspace changes it, official plugins are on and other plugins are off.",
            "example": true
          },
          "settings": {
            "type": "object",
            "additionalProperties": {},
            "description": "Current settings values, keyed by setting key, with declared defaults filled in for unset settings. Secret fields are never returned.",
            "example": {
              "channel": "#standup",
              "reminderHour": 9
            }
          },
          "configuredSecrets": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Keys of the secret settings that have a stored value.",
            "example": [
              "apiToken"
            ]
          }
        },
        "required": [
          "enabled",
          "settings",
          "configuredSecrets"
        ],
        "description": "A plugin's state and settings in one workspace."
      },
      "PluginSettingsError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Summary of the problem: `Some settings are invalid` or `Fill in the required settings before enabling this plugin`.",
            "example": "Some settings are invalid"
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Error message per settings field.",
            "example": {
              "reminderHour": "Must be at most 23"
            }
          }
        },
        "required": [
          "message",
          "errors"
        ],
        "description": "Settings that failed validation, with a message per field."
      },
      "UpdateWorkspacePlugin": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether the plugin is on in the workspace. `true` fails unless every required setting has a value. Omitted keeps the current state; a workspace that never set it has official plugins on and other plugins off.",
            "example": true
          },
          "settings": {
            "type": "object",
            "additionalProperties": {},
            "description": "Settings to change. Omitted settings keep their stored value. Use null to clear optional settings.",
            "example": {
              "channel": "#standup",
              "reminderHour": 9
            }
          }
        },
        "description": "Changes to a plugin's state in one workspace. Settings are checked against the types, options and limits the plugin declares, and keys the plugin does not declare are dropped."
      },
      "PluginDataPurge": {
        "type": "object",
        "properties": {
          "storage": {
            "type": "integer",
            "description": "Rows deleted from the plugin's stored data.",
            "example": 42
          },
          "workspaces": {
            "type": "integer",
            "description": "Rows deleted from the plugin's per-workspace state and settings.",
            "example": 3
          }
        },
        "required": [
          "storage",
          "workspaces"
        ],
        "description": "How many rows a plugin data purge deleted."
      }
    },
    "parameters": {}
  },
  "paths": {
    "/instance/status": {
      "get": {
        "operationId": "getInstanceStatus",
        "tags": [
          "Instance"
        ],
        "summary": "Get instance status",
        "description": "Returns the setup state of the instance: whether any user account exists and whether an instance administrator exists. Needs no authentication. While `hasUsers` is false, the next account to sign up becomes the instance administrator.",
        "security": [],
        "responses": {
          "200": {
            "description": "Instance status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceStatus"
                }
              }
            }
          }
        }
      }
    },
    "/public-project/{id}": {
      "get": {
        "operationId": "getPublicProject",
        "tags": [
          "Projects"
        ],
        "summary": "Get a public project board",
        "description": "Returns one page of a public project's board without authentication. The project must be public and its workspace not archived; visibility is checked before tasks are loaded. The query parameters filter, sort and paginate tasks as on the private board. On public boards `isSubtask` is always false and external links leave out the integration ID and private sync metadata. Continue through `pagination.totalPages` for all tasks and, for each task page, through `relatedPage` up to `pagination.relatedTotalPages` for all labels, external links and columns. Start over if `pagination.revision` or `pagination.relatedRevision` changes between pages.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the public project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the public project.",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tasks whose status equals this column slug, or `planned` or `archived`.",
              "example": "in-progress"
            },
            "required": false,
            "description": "Only tasks whose status equals this column slug, or `planned` or `archived`.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tasks with this priority: `no-priority`, `low`, `medium`, `high` or `urgent`.",
              "example": "high"
            },
            "required": false,
            "description": "Only tasks with this priority: `no-priority`, `low`, `medium`, `high` or `urgent`.",
            "name": "priority",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tasks assigned to the user with this ID.",
              "example": "vpptt8t3d7ft91y45poatb3p"
            },
            "required": false,
            "description": "Only tasks assigned to the user with this ID.",
            "name": "assigneeId",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "description": "Page of tasks to return, starting at 1. Defaults to 1.",
              "example": 1
            },
            "required": false,
            "description": "Page of tasks to return, starting at 1. Defaults to 1.",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "description": "Page of related rows (labels, external links and columns) to return for the selected task page, starting at 1. Each related page holds up to 100 rows of each kind. Defaults to 1.",
              "example": 1
            },
            "required": false,
            "description": "Page of related rows (labels, external links and columns) to return for the selected task page, starting at 1. Each related page holds up to 100 rows of each kind. Defaults to 1.",
            "name": "relatedPage",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Number of tasks per page, from 1 to 100. Defaults to 50.",
              "example": 50
            },
            "required": false,
            "description": "Number of tasks per page, from 1 to 100. Defaults to 50.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "priority",
                "dueDate",
                "position",
                "title",
                "number"
              ],
              "description": "Field to sort tasks by. `priority` sorts by rank (`no-priority` lowest, `urgent` highest); `position` is the order within a column. Ties are broken by task ID. Defaults to `position`.",
              "example": "position"
            },
            "required": false,
            "description": "Field to sort tasks by. `priority` sorts by rank (`no-priority` lowest, `urgent` highest); `position` is the order within a column. Ties are broken by task ID. Defaults to `position`.",
            "name": "sortBy",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Sort direction. Defaults to `asc`.",
              "example": "asc"
            },
            "required": false,
            "description": "Sort direction. Defaults to `asc`.",
            "name": "sortOrder",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tasks due at or before this date, as an ISO 8601 date or date-time. Tasks without a due date are excluded.",
              "example": "2026-12-31T23:59:59Z"
            },
            "required": false,
            "description": "Only tasks due at or before this date, as an ISO 8601 date or date-time. Tasks without a due date are excluded.",
            "name": "dueBefore",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tasks due at or after this date, as an ISO 8601 date or date-time. Tasks without a due date are excluded.",
              "example": "2026-12-01T00:00:00Z"
            },
            "required": false,
            "description": "Only tasks due at or after this date, as an ISO 8601 date or date-time. Tasks without a due date are excluded.",
            "name": "dueAfter",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A public board page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBoardPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid pagination or filter parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Project is not public",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or its workspace is archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Task list request took too long; retry later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public-project/{id}/description": {
      "get": {
        "operationId": "getPublicProjectDescriptionPage",
        "tags": [
          "Projects"
        ],
        "summary": "Read a public project description page",
        "description": "Returns one page of up to 32,768 Unicode characters of a public project's description, without authentication. Use it when the board leaves out a long description (`descriptionDeferred` is true). Start at `offset` 0, then pass each page's `nextOffset` and the first page's `version` until `nextOffset` is null. The project must be public and its workspace not archived.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the public project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the public project.",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2000000000,
              "default": 0,
              "description": "Character offset to start reading from, counted in Unicode characters. Start at 0, then pass the previous page's `nextOffset`.",
              "example": 0
            },
            "required": false,
            "description": "Character offset to start reading from, counted in Unicode characters. Start at 0, then pass the previous page's `nextOffset`.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,10}$",
              "description": "Version returned by the first page. Pass it on later pages; if the task was changed since, the request fails with 409.",
              "example": "48213"
            },
            "required": false,
            "description": "Version returned by the first page. Pass it on later pages; if the task was changed since, the request fails with 409.",
            "name": "version",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Public project description page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDescriptionPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid `offset` or `version`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, not public, or its workspace is archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The description changed since `version` was issued, or the project is no longer public",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Description request timed out; retry later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/public-project/{id}/task/{taskId}/description": {
      "get": {
        "operationId": "getPublicTaskDescriptionPage",
        "tags": [
          "Projects"
        ],
        "summary": "Read a public task description page",
        "description": "Returns one page of up to 32,768 Unicode characters of a task's description on a public board, without authentication. Use it when the board leaves out a long description (`descriptionDeferred` is true). Start at `offset` 0, then pass each page's `nextOffset` and the first page's `version` until `nextOffset` is null. The task must belong to the project, and the project must be public and its workspace not archived.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the public project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the public project.",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of a task in the public project.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of a task in the public project.",
            "name": "taskId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2000000000,
              "default": 0,
              "description": "Character offset to start reading from, counted in Unicode characters. Start at 0, then pass the previous page's `nextOffset`.",
              "example": 0
            },
            "required": false,
            "description": "Character offset to start reading from, counted in Unicode characters. Start at 0, then pass the previous page's `nextOffset`.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,10}$",
              "description": "Version returned by the first page. Pass it on later pages; if the task was changed since, the request fails with 409.",
              "example": "48213"
            },
            "required": false,
            "description": "Version returned by the first page. Pass it on later pages; if the task was changed since, the request fails with 409.",
            "name": "version",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Public task description page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDescriptionPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid `offset` or `version`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found in the project, the project is not public, or its workspace is archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The description changed since `version` was issued, or the project is no longer public",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Description request timed out; retry later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/calendar-feed/{token}/calendar.ics": {
      "get": {
        "operationId": "getCalendarFeed",
        "tags": [
          "Calendar feeds"
        ],
        "summary": "Subscribe to a calendar feed",
        "description": "Returns a project's scheduled tasks as an iCalendar (RFC 5545) feed, with the secret token as the only credential. Each task with a start or due date becomes an all-day event from its start date (or due date) through its due date, with days computed in the feed's time zone. Anyone with the link can read the matching task titles, descriptions and dates. The response is streamed and must not be cached (`Cache-Control: private, no-store`). Descriptions longer than 4,096 characters and titles or calendar names longer than 1,024 characters are truncated with an ellipsis. The feed stops working while the project's workspace is archived.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$",
              "description": "Secret token of the calendar feed: 64 lowercase hexadecimal characters.",
              "example": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
            },
            "required": true,
            "description": "Secret token of the calendar feed: 64 lowercase hexadecimal characters.",
            "name": "token",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "iCalendar feed",
            "content": {
              "text/calendar": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The token is not 64 lowercase hexadecimal characters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No feed with this token, the feed was revoked, or the workspace is archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/signed/integrations/{type}/{integrationId}/webhook": {
      "post": {
        "operationId": "receiveQuillsIntegrationWebhook",
        "tags": [
          "Signed callbacks"
        ],
        "summary": "Receive a GitHub or GitLab issue event for status sync",
        "description": "Called by GitHub or GitLab through the webhook that `enableQuillsStatusSync` registered, not by API clients. The path names the integration, and the webhook secret stored for it checks the request: GitHub signs the body (X-Hub-Signature-256: HMAC-SHA256); GitLab sends the secret (X-Gitlab-Token). A closed or reopened issue moves each post linked to it (at most 50 links) to the mapped status and records a `post.status_changed` event for each post that changed. Events older than 30 days, or older than the state that a link already holds, change nothing. While the GitHub inbox is on, GitHub issue and comment events also update its conversation and record message or conversation status events. A repeated delivery (the same body within 30 days) changes nothing and answers `duplicate: true`. The route checks the caller's credential (for example a signature over the raw body) before it parses the body.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitlab"
              ],
              "description": "Provider that sends the event.",
              "example": "github"
            },
            "required": true,
            "description": "Provider that sends the event.",
            "name": "type",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^integration_[0-9a-z]{26}$",
              "description": "ID of the GitHub or GitLab integration with status sync on.",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "ID of the GitHub or GitLab integration with status sync on.",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "How many linked posts changed status, and what changed in the GitHub inbox",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "applied": {
                      "type": "number",
                      "description": "Number of linked posts whose status changed.",
                      "example": 1
                    },
                    "duplicate": {
                      "type": "boolean",
                      "description": "True when this delivery was already processed; nothing changed."
                    },
                    "changed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "postId": {
                            "type": "string",
                            "description": "Post that changed status.",
                            "example": "post_01m8rxs5z8e8mtfnj9zmkr0n4g"
                          },
                          "statusId": {
                            "type": "string",
                            "description": "The post's new status.",
                            "example": "post_status_01m8rxs5z8e8mtfnjpm7daknbw"
                          }
                        },
                        "required": [
                          "postId",
                          "statusId"
                        ]
                      },
                      "description": "Posts whose status changed."
                    },
                    "inbox": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "message",
                            "edited",
                            "deleted",
                            "closed",
                            "reopened"
                          ],
                          "description": "What changed in the GitHub inbox. `message`: a new issue or comment became a message. `edited` or `deleted`: a customer's message followed an edit or deletion. `closed` or `reopened`: the conversation status followed the issue.",
                          "example": "message"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "Conversation of the issue.",
                          "example": "conversation_01m8rxs5z8e8mtfnknh7swkn0q"
                        },
                        "messageIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Messages that were created, edited or deleted.",
                          "example": [
                            "conversation_msg_01m8rxs5z8e8mtfnkv0q4synnd"
                          ]
                        }
                      },
                      "required": [
                        "kind",
                        "conversationId",
                        "messageIds"
                      ],
                      "description": "Change in the GitHub inbox. Null when the inbox is off, for GitLab, or when nothing changed there."
                    }
                  },
                  "required": [
                    "applied",
                    "duplicate",
                    "changed",
                    "inbox"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not configured, or no workspace owns the credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body is too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/signed/integrations/{type}/{integrationId}/hooks/{kind}": {
      "post": {
        "operationId": "receiveQuillsAppHook",
        "tags": [
          "Signed callbacks"
        ],
        "summary": "Receive a Slack app event for the assistant",
        "description": "Called by the Slack Events API, not by API clients. The path names the Slack integration; the signing secret saved with the workspace's Slack app credentials checks the request: Slack signs the body (x-slack-signature, x-slack-request-timestamp; five minutes). Answers the URL verification challenge. While the workspace's Slack assistant is on, a mention of the app or a direct message to it, from a person in the connected Slack team, is kept for one day for the assistant to answer, and an `integration.hook_received` event is recorded; the message text never enters the event. Other events are ignored. A repeated event (the same `event_id`) changes nothing. The route checks the caller's credential (for example a signature over the raw body) before it parses the body.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "slack"
              ],
              "description": "Provider that sends the event. Always `slack`.",
              "example": "slack"
            },
            "required": true,
            "description": "Provider that sends the event. Always `slack`.",
            "name": "type",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^integration_[0-9a-z]{26}$",
              "description": "ID of the Slack integration.",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "ID of the Slack integration.",
            "name": "integrationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "events"
              ],
              "description": "Hook kind. Always `events` (the Slack Events API).",
              "example": "events"
            },
            "required": true,
            "description": "Hook kind. Always `events` (the Slack Events API).",
            "name": "kind",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The URL verification challenge, or whether the assistant will answer the event",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "challenge": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The challenge of a `url_verification` payload. Null for other payloads."
                    },
                    "accepted": {
                      "type": "boolean",
                      "description": "True when the assistant will answer the event; false when it was ignored or repeated."
                    }
                  },
                  "required": [
                    "challenge",
                    "accepted"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not configured, or no workspace owns the credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body is too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/signed/integrations/{type}/{integrationId}/identify": {
      "post": {
        "operationId": "receiveQuillsIdentify",
        "tags": [
          "Signed callbacks"
        ],
        "summary": "Receive a Segment identify call",
        "description": "Called by Segment, not by API clients. The path names the Segment integration, and its stored shared secret checks the request: Segment signs the body (x-signature: base64 HMAC-SHA1). Finds an existing customer by the `email` trait (case-insensitive) and merges the traits that user attribute definitions name into the customer's attributes; `userId` is stored as the external user ID. Only existing customers change: unknown emails and teammates change nothing, and no customer is created. Calls older than 30 days are ignored. A repeated call (the same body within 30 days) changes nothing. Records a `user.identified` event when a customer changed. The route checks the caller's credential (for example a signature over the raw body) before it parses the body.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "segment"
              ],
              "description": "Provider that sends the call. Always `segment`.",
              "example": "segment"
            },
            "required": true,
            "description": "Provider that sends the call. Always `segment`.",
            "name": "type",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^integration_[0-9a-z]{26}$",
              "description": "ID of the Segment integration.",
              "example": "integration_01m8rxs5z8e8mtfnhv4kq3vfg0"
            },
            "required": true,
            "description": "ID of the Segment integration.",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a customer changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "updated",
                        "unchanged",
                        "unknown",
                        "ignored"
                      ],
                      "description": "`updated`: the customer's attributes changed. `unchanged`: the customer exists but nothing changed. `unknown`: no customer has this email, or it belongs to a teammate. `ignored`: not an identify call, no email, too old, or a repeated delivery.",
                      "example": "updated"
                    },
                    "principalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal of the matched customer. Null for `unknown` and `ignored`.",
                      "example": "principal_01m8rxs5z8e8mtfnk5r7ask0k8"
                    }
                  },
                  "required": [
                    "status",
                    "principalId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not configured, or no workspace owns the credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body is too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/signed/oauth/{type}/callback": {
      "get": {
        "operationId": "completeQuillsOAuthConnect",
        "tags": [
          "Signed callbacks"
        ],
        "summary": "Complete an OAuth connection",
        "description": "The provider redirects the browser here. The signed state must be unexpired, unused, for this provider and for the signed-in account (its session cookie; an API key never completes a connect), which must still hold the `manage_settings` permission in the state's workspace. Exchanges the code with the provider, stores the tokens encrypted, and connects as that teammate: a connected provider gets its tokens replaced and keeps its mappings. Records an `integration.connected` event. A browser navigation gets a 303 redirect to the web app's result page instead of JSON, also when it fails.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitlab",
                "slack",
                "discord",
                "jira",
                "linear",
                "asana",
                "clickup",
                "monday",
                "notion",
                "teams",
                "hubspot",
                "intercom",
                "zendesk",
                "salesforce"
              ],
              "description": "Provider key of an OAuth provider that returns a code in the query.",
              "example": "github"
            },
            "required": true,
            "description": "Provider key of an OAuth provider that returns a code in the query.",
            "name": "type",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "description": "Signed state from the authorization URL of `startQuills<Provider>OAuthConnect`."
            },
            "required": true,
            "description": "Signed state from the authorization URL of `startQuills<Provider>OAuthConnect`.",
            "name": "state",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "description": "Authorization code from the provider. Missing when access was not granted (400)."
            },
            "required": false,
            "description": "Authorization code from the provider. Missing when access was not granted (400).",
            "name": "code",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Provider error code, such as `access_denied`, when access was not granted. Not shown to the caller.",
              "example": "access_denied"
            },
            "required": false,
            "description": "Provider error code, such as `access_denied`, when access was not granted. Not shown to the caller.",
            "name": "error",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The connection without its tokens",
            "headers": {
              "X-Quills-Result-Location": {
                "description": "The sanitized web result page for a browser bridge",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "already_used"
                      ],
                      "description": "`connected`: the connection was created or replaced. `already_used`: this state was used before, so nothing changed.",
                      "example": "connected"
                    },
                    "integration": {
                      "$ref": "#/components/schemas/QuillsIntegrationSummary"
                    }
                  },
                  "required": [
                    "status",
                    "integration"
                  ]
                }
              }
            }
          },
          "303": {
            "description": "Continue in the web app",
            "headers": {
              "Location": {
                "description": "The web page",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "description": "The redirect is never cached",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              },
              "Referrer-Policy": {
                "description": "This URL is not sent to the web app",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-referrer"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The provider did not grant access, or rejected the code or the connect fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The signed-in account no longer holds the manage_settings permission in the state's workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not configured, or no workspace owns the credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved, the provider rejected them, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The provider could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "completeQuillsOAuthFragmentConnect",
        "tags": [
          "Signed callbacks"
        ],
        "summary": "Complete an OAuth connection with a token from the URL fragment",
        "description": "The bridge page posts the JSON body `{ \"token\": \"…\" }` here. `Origin` must be this API's origin, and `Sec-Fetch-Site`, when sent, must be `same-origin` (401 otherwise). The signed state in the query must be unexpired, unused, for this provider and for the signed-in account, which must still hold the `manage_settings` permission in the state's workspace. The provider checks the token before it is stored encrypted; it is never returned. Connects as that teammate: a connected provider gets its token replaced and keeps its mappings. Records an `integration.connected` event. The route checks the caller's credential (for example a signature over the raw body) before it parses the body.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "trello"
              ],
              "description": "Provider key of an OAuth provider that returns its token in the URL fragment.",
              "example": "trello"
            },
            "required": true,
            "description": "Provider key of an OAuth provider that returns its token in the URL fragment.",
            "name": "type",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "description": "Signed state from the authorization URL of the provider's connect route."
            },
            "required": true,
            "description": "Signed state from the authorization URL of the provider's connect route.",
            "name": "state",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The connection without its tokens",
            "headers": {
              "X-Quills-Result-Location": {
                "description": "The sanitized web result page for a browser bridge",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "already_used"
                      ],
                      "description": "`connected`: the connection was created or replaced. `already_used`: this state was used before, so nothing changed.",
                      "example": "connected"
                    },
                    "integration": {
                      "$ref": "#/components/schemas/QuillsIntegrationSummary"
                    }
                  },
                  "required": [
                    "status",
                    "integration"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body is not a valid token, or the provider rejected the token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The signed-in account no longer holds the manage_settings permission in the state's workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not configured, or no workspace owns the credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved, the provider rejected them, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body is too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The provider could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/signed/oauth/{type}/bridge": {
      "get": {
        "operationId": "openQuillsOAuthBridge",
        "tags": [
          "Signed callbacks"
        ],
        "summary": "Open the bridge page of an OAuth connection with a fragment token",
        "description": "Trello sends the browser here with the token in the URL fragment, which no server receives. The page removes the fragment, then posts the token to `completeQuillsOAuthFragmentConnect` with the same state, which checks the session, the permission and the expiry. The page needs a state that this instance signed for this provider. It opens once for each state, and opening it does not use the state up.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "trello"
              ],
              "description": "Provider key of an OAuth provider that returns its token in the URL fragment.",
              "example": "trello"
            },
            "required": true,
            "description": "Provider key of an OAuth provider that returns its token in the URL fragment.",
            "name": "type",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "description": "Signed state from the authorization URL of the provider's connect route."
            },
            "required": true,
            "description": "Signed state from the authorization URL of the provider's connect route.",
            "name": "state",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The bridge page",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not configured, or no workspace owns the credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/signed/oauth/connectors/{connectorId}/callback": {
      "get": {
        "operationId": "completeQuillsConnectorOAuth",
        "tags": [
          "Signed callbacks"
        ],
        "summary": "Complete a connector's OAuth authorization",
        "description": "Completes a connector's OAuth authorization. The authorization server redirects the browser here. The signed state must be unexpired, unused, for this connector and for the signed-in account, which must still hold the `manage_settings` permission in the state's workspace. Exchanges the code for tokens, stores them encrypted, then discovers the connector's tools. `connected` means that the authorization is complete; the connector's own status tells whether its tools were read. A second use of the same state answers `already_used` and changes nothing. A browser navigation is redirected to the web app's result page. Records an `assistant_connector.connected` event.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the connector, as a TypeID or UUID",
              "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
            },
            "required": true,
            "description": "ID of the connector, as a TypeID or UUID",
            "name": "connectorId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "description": "Signed state from `POST /assistant/connectors/{connectorId}/oauth`, passed back by the authorization server",
              "example": "eyJ3IjoiY29ubmVjdG9yIn0.c2lnbmF0dXJl"
            },
            "required": true,
            "description": "Signed state from `POST /assistant/connectors/{connectorId}/oauth`, passed back by the authorization server",
            "name": "state",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048,
              "description": "Authorization code from the authorization server. Absent when access was not granted, which answers 400.",
              "example": "SplxlOBeZQQYbYS6WxSbIA"
            },
            "required": false,
            "description": "Authorization code from the authorization server. Absent when access was not granted, which answers 400.",
            "name": "code",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "OAuth error code from the authorization server, such as `access_denied`, when access was not granted",
              "example": "access_denied"
            },
            "required": false,
            "description": "OAuth error code from the authorization server, such as `access_denied`, when access was not granted",
            "name": "error",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The connector without its credentials",
            "headers": {
              "X-Quills-Result-Location": {
                "description": "The sanitized web result page for a browser bridge",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "already_used"
                      ],
                      "description": "`connected`: the authorization finished now; `already_used`: this state was already processed, and nothing changed",
                      "example": "connected"
                    },
                    "connector": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the connector",
                          "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
                        },
                        "name": {
                          "type": "string",
                          "description": "Display name, unique in the workspace ignoring case",
                          "example": "Linear"
                        },
                        "slug": {
                          "type": "string",
                          "description": "Tool namespace derived from the name, at most 20 characters. The assistant sees the connector's tools under this prefix.",
                          "example": "linear"
                        },
                        "url": {
                          "type": "string",
                          "description": "HTTPS URL of the remote MCP server",
                          "example": "https://mcp.example.com/mcp"
                        },
                        "authMode": {
                          "type": "string",
                          "enum": [
                            "none",
                            "bearer",
                            "oauth"
                          ],
                          "description": "How the server authenticates requests: `none`, `bearer` (a stored bearer token) or `oauth` (OAuth tokens from the connector's authorization)",
                          "example": "oauth"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "connected",
                            "error",
                            "disabled"
                          ],
                          "description": "`connected` when the last tool discovery succeeded; `error` when it failed, the URL changed, or authorization is needed (see `lastError`); `disabled` offers no tools. Only a `connected` connector that is `enabled` offers tools.",
                          "example": "connected"
                        },
                        "toolCount": {
                          "type": "number",
                          "description": "Number of tools stored from the last successful discovery",
                          "example": 12
                        },
                        "lastError": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Fixed message for the last failure, such as `Authorization required`. The server's own error text is never stored. Null after a successful discovery.",
                          "example": null
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the connector was last changed or refreshed",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "hasSecret": {
                          "type": "boolean",
                          "description": "Whether a credential (bearer token or OAuth tokens) is stored. The credential itself is never returned.",
                          "example": true
                        },
                        "enabled": {
                          "type": "boolean",
                          "description": "Whether the connector is on. A disabled connector offers no tools.",
                          "example": true
                        },
                        "assignments": {
                          "type": "object",
                          "properties": {
                            "agent": {
                              "type": "boolean",
                              "description": "Whether the customer agent may use the connector. It only gets read tools whose own policy is set to `always`.",
                              "example": false
                            },
                            "copilot": {
                              "type": "boolean",
                              "description": "Whether the teammate copilot may use the connector",
                              "example": true
                            }
                          },
                          "required": [
                            "agent",
                            "copilot"
                          ],
                          "description": "Which assistants may call the connector's tools"
                        },
                        "toolPolicies": {
                          "type": "object",
                          "properties": {
                            "groupDefaults": {
                              "type": "object",
                              "properties": {
                                "read": {
                                  "type": "string",
                                  "enum": [
                                    "always",
                                    "approval",
                                    "never"
                                  ],
                                  "description": "Policy for read-only tools without their own policy. Defaults to `always`.",
                                  "example": "always"
                                },
                                "write": {
                                  "type": "string",
                                  "enum": [
                                    "always",
                                    "approval",
                                    "never"
                                  ],
                                  "description": "Policy for other tools without their own policy. Defaults to `approval`.",
                                  "example": "approval"
                                }
                              },
                              "required": [
                                "read",
                                "write"
                              ],
                              "description": "The policy of each tool group"
                            },
                            "tools": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128,
                                    "description": "Tool name, as the MCP server lists it",
                                    "example": "create_issue"
                                  },
                                  "policy": {
                                    "type": "string",
                                    "enum": [
                                      "always",
                                      "approval",
                                      "never"
                                    ],
                                    "description": "When the assistant may call the tool: `always` (runs without approval), `approval` (the call is proposed for a teammate to approve) or `never` (the tool is not offered)",
                                    "example": "approval"
                                  }
                                },
                                "required": [
                                  "name",
                                  "policy"
                                ]
                              },
                              "maxItems": 100,
                              "description": "Per-tool policies that override the group default. Overrides for tools that the server no longer lists are dropped on the next refresh."
                            }
                          },
                          "required": [
                            "groupDefaults",
                            "tools"
                          ],
                          "description": "Tool policies: group defaults and per-tool overrides"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Tool name, as the MCP server lists it",
                                "example": "create_issue"
                              },
                              "title": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Human-readable title from the server. Null when the server gives none.",
                                "example": "Create issue"
                              },
                              "description": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Description from the server. Null when the server gives none.",
                                "example": "Creates an issue in a team."
                              },
                              "group": {
                                "type": "string",
                                "enum": [
                                  "read",
                                  "write"
                                ],
                                "description": "`read` when the server marks the tool read-only; `write` otherwise",
                                "example": "write"
                              },
                              "destructive": {
                                "type": "boolean",
                                "description": "Whether the server marks the tool as destructive",
                                "example": false
                              },
                              "policy": {
                                "type": "string",
                                "enum": [
                                  "always",
                                  "approval",
                                  "never"
                                ],
                                "description": "The tool's effective policy: its own override, or else its group's default",
                                "example": "approval"
                              }
                            },
                            "required": [
                              "name",
                              "title",
                              "description",
                              "group",
                              "destructive",
                              "policy"
                            ]
                          },
                          "description": "The tools from the last successful discovery, in the server's order"
                        },
                        "lastSyncedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the tools were last discovered successfully. Null: never.",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "lastCallAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the assistant last called one of the tools. Null: never.",
                          "example": "2026-11-30T15:20:00.000Z"
                        },
                        "lastErrorAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When `lastError` was recorded. Null when there is no current error.",
                          "example": null
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the connector was added",
                          "example": "2026-11-02T09:30:00.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug",
                        "url",
                        "authMode",
                        "status",
                        "toolCount",
                        "lastError",
                        "updatedAt",
                        "hasSecret",
                        "enabled",
                        "assignments",
                        "toolPolicies",
                        "tools",
                        "lastSyncedAt",
                        "lastCallAt",
                        "lastErrorAt",
                        "createdAt"
                      ],
                      "description": "The connector after the authorization, without credentials. Null with `already_used`."
                    }
                  },
                  "required": [
                    "status",
                    "connector"
                  ]
                }
              }
            }
          },
          "303": {
            "description": "Continue in the web app",
            "headers": {
              "Location": {
                "description": "The web page",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "description": "The redirect is never cached",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              },
              "Referrer-Policy": {
                "description": "This URL is not sent to the web app",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-referrer"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Access was not granted (no code), or the authorization server rejected the code",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account that started the authorization is no longer a teammate of the workspace or no longer holds the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No connector with this ID exists in the workspace; Not configured, or no workspace owns the credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No authorization is in progress (the connector is not `oauth` or has no pending code verifier), or the connector changed during the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The authorization server could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/signed/chat/email/inbound": {
      "post": {
        "operationId": "receiveQuillsInboundEmail",
        "tags": [
          "Signed callbacks"
        ],
        "summary": "Receive a mail for a workspace address (Resend inbound webhook)",
        "description": "Receives mail that Resend accepted for a workspace address and stores it as a support conversation message, or as a feedback comment when it answers a post notification. Not called with a session or API key: Resend signs each request the Svix way, with `webhook-id`, `webhook-timestamp` (Unix seconds, within 5 minutes of the server's clock) and `webhook-signature` headers (`svix-` names are also accepted). The signature is the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{raw body}`, keyed with EMAIL_INBOUND_SIGNING_SECRET. Answers 404 while EMAIL_INBOUND_SIGNING_SECRET or EMAIL_INBOUND_DOMAIN is unset, or when no `to` address on EMAIL_INBOUND_DOMAIN names a workspace by slug or ID (`<workspace>@domain` or `<workspace>+tag@domain`). The JSON body is Resend's `email.received` event: `{ type, data: { email_id, from, to, cc, subject, text, html, message_id, attachments, headers } }`. Other event types are acknowledged as `ignored`. When the event carries no text or HTML, the mail is fetched from Resend's Received Emails API; a failure there answers 500 so Resend delivers again. Up to 10 attachments and inline images (10 MB each, 25 MB per mail) are stored as files, and the HTML is sanitized with its inline images pointed at the stored files. A mail sent to a post's signed reply address becomes a comment by the subscribed customer who sent it, under the workspace's moderation rules. Other mail joins an email or messenger conversation when it's sent to that conversation's signed reply address, or when its In-Reply-To or References header names an earlier message of it; the sender must be the conversation's requester or a CC'd participant. Otherwise it opens a new email conversation for the sender, whose customer profile is found by email or created unverified; mail that looks like spam opens the conversation closed as spam. A customer mail forwarded by a workspace teammate, when the receiving server's Authentication-Results header (trusted through EMAIL_INBOUND_AUTHSERV_ID) reports a DMARC pass, opens the conversation for the original customer, adds the teammate as a follower and saves their note as an internal note. A reply reopens a closed conversation and the solved or closed tickets linked to it, or starts a follow-up conversation when the workspace's reopen policy says so; automated mail (out-of-office replies, bounces) and conversations closed as spam stay closed. A repeated Message-ID, or a `webhook-id` already processed in the last 30 days, answers `duplicate`. Records a `conversation.email_received` event for a stored message, or a `comment.created` event for a comment. The route checks the caller's credential (for example a signature over the raw body) before it parses the body.",
        "security": [],
        "responses": {
          "200": {
            "description": "What happened to the mail. A refused mail is acknowledged so the provider stops retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "received",
                        "duplicate",
                        "ignored",
                        "empty",
                        "rejected",
                        "blocked",
                        "from_mismatch"
                      ],
                      "description": "What happened to the mail. `received`: stored as a conversation message or a comment; `duplicate`: already stored, or this delivery was already processed; `ignored`: not an `email.received` event; `empty`: no text to store; `rejected`: the From address can't be read, or the post of a reply is deleted, locked, merged or not published; `blocked`: the sender, their domain or the forwarded customer is blocked; `from_mismatch`: the sender isn't a participant of the conversation, or doesn't follow the post they replied to.",
                      "example": "received"
                    },
                    "messageId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the stored conversation message (TypeID). Null unless `status` is `received` and the mail became a message.",
                      "example": "conversation_msg_01m8rz8mp3eshrhd2yvprvnnzq"
                    },
                    "commentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the feedback comment that a reply to a post notification became (TypeID). Present only in that case.",
                      "example": "post_comment_01m8rz8mp3eshrhd1wpq1mqfd9"
                    }
                  },
                  "required": [
                    "status",
                    "messageId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not configured, or no workspace owns the credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another copy of this new mail is being stored at the same moment; nothing was saved, and a retry finds the stored mail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body is too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/signed/chat/email/events": {
      "post": {
        "operationId": "receiveQuillsEmailDeliveryEvent",
        "tags": [
          "Signed callbacks"
        ],
        "summary": "Record a delivery event for a sent mail (Resend webhook)",
        "description": "Receives Resend's delivery events for mail this server sent. Not called with a session or API key: Resend signs each request the Svix way, with `webhook-id`, `webhook-timestamp` (Unix seconds, within 5 minutes of the server's clock) and `webhook-signature` headers (`svix-` names are also accepted). The signature is the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{raw body}`, keyed with EMAIL_EVENTS_SIGNING_SECRET, else EMAIL_INBOUND_SIGNING_SECRET; the route answers 404 while neither is set. The JSON body is Resend's event, `{ type, data: { tags } }`. The workspace and the mail's log entry come from the `kaneo_workspace`, `kaneo_log` and `kaneo_sig` tags that the server signed when it sent the mail; a mail without valid tags answers 404. `email.bounced` marks the log entry `bounced` and `email.complained` marks it `complaint`; other event types are acknowledged and change nothing. A `webhook-id` already processed in the last 30 days answers `duplicate`. Records no event. The route checks the caller's credential (for example a signature over the raw body) before it parses the body.",
        "security": [],
        "responses": {
          "200": {
            "description": "Whether the event changed the mail's log row. Every verified event is acknowledged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "recorded",
                        "ignored",
                        "duplicate"
                      ],
                      "description": "What the event did. `recorded`: the mail's log entry was marked bounced or complaint; `ignored`: another event type, or no outbound log entry matched; `duplicate`: this delivery was already processed.",
                      "example": "recorded"
                    }
                  },
                  "required": [
                    "status"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not configured, or no workspace owns the credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body is too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/signed/portal-sign-in": {
      "get": {
        "operationId": "startQuillsPortalTokenSignIn",
        "tags": [
          "Signed callbacks"
        ],
        "summary": "Sign in to the portal with a widget link or an SSO token",
        "description": "Starts a portal token sign-in from a browser navigation. Needs no session: the code or token is the credential. `code` is the widget's one-time link (widget sign-in on). `token` is a token that the host app signed with the widget secret, as for widget identify, when the portal's sign-in mode is sso; `next` is then the portal path to open, and `state` the value that the browser's sign-in page put in return_to. Each works once. The browser continues to the account sign-in, which finishes only in the browser that started the sign-in (login CSRF) and signs in only to a portal-only account that token sign-in created for this customer; another account with the email means the sign-in page. A browser GET is redirected (303) to the account sign-in with the grant, or to the portal home with signIn=failed when the code or token is invalid, already used or refused. Records no event.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "description": "The workspace ID whose portal to sign in to. With code, it must match the workspace the code was issued for.",
              "example": "pfh0haxfpzowht3oi213cqos"
            },
            "required": true,
            "description": "The workspace ID whose portal to sign in to. With code, it must match the workspace the code was issued for.",
            "name": "workspace",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 2000,
              "description": "The one-time code from a widget portal link (createQuillsWidgetPortalSignIn). Valid for 2 minutes and once. Send code or token."
            },
            "required": false,
            "description": "The one-time code from a widget portal link (createQuillsWidgetPortalSignIn). Valid for 2 minutes and once. Send code or token.",
            "name": "code",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 8192,
              "description": "A customer identity token that the host app signed with the widget secret, as for widget identify. Accepted only when the portal's sign-in mode is sso. Works once."
            },
            "required": false,
            "description": "A customer identity token that the host app signed with the widget secret, as for widget identify. Accepted only when the portal's sign-in mode is sso. Works once.",
            "name": "token",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 300,
              "description": "With token: the portal path to open after sign-in. An unsafe path falls back to the portal home.",
              "example": "/my-feedback"
            },
            "required": false,
            "description": "With token: the portal path to open after sign-in. An unsafe path falls back to the portal home.",
            "name": "next",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "With token: the 64-character hex value that the browser's sign-in page put in return_to. Binds the sign-in to the browser that started it."
            },
            "required": false,
            "description": "With token: the 64-character hex value that the browser's sign-in page put in return_to. Binds the sign-in to the browser that started it.",
            "name": "state",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The grant for the account sign-in",
            "headers": {
              "X-Quills-Result-Location": {
                "description": "The sanitized web result page for a browser bridge",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "grant": {
                      "type": "string",
                      "description": "A one-minute signed grant for the account sign-in. Empty when the code or token was already used."
                    }
                  },
                  "required": [
                    "grant"
                  ]
                }
              }
            }
          },
          "303": {
            "description": "Continue in the web app",
            "headers": {
              "Location": {
                "description": "The web page",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "description": "The redirect is never cached",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              },
              "Referrer-Policy": {
                "description": "This URL is not sent to the web app",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-referrer"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The matching token sign-in (widget link or sso) is off, or the customer has no email or is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The portal is off; Not configured, or no workspace owns the credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/config": {
      "get": {
        "operationId": "getQuillsPublicPortalConfig",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the public portal configuration",
        "description": "Returns the portal's name, feature switches, navigation tabs and branding. Needs no credential. Sign-in uses the existing albus account endpoints under /api/auth; portal customers need no workspace membership. Only whether the portal is private is returned, never its allowed domains or segments. Sent with `Cache-Control: private, max-age=60`, so signed logo URLs are never stored in shared caches. Answers 404 while a teammate has turned the portal off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The public portal configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The workspace's display name. Empty when none is set.",
                      "example": "Acme"
                    },
                    "features": {
                      "type": "object",
                      "properties": {
                        "allowAnonymous": {
                          "type": "boolean",
                          "description": "Whether widget visitors without sign-in may submit, vote and comment where a board allows it. False when unset.",
                          "example": false
                        },
                        "allowEditAfterEngagement": {
                          "type": "boolean",
                          "description": "Whether an author may edit their post after it was reviewed, merged into or received votes or comments from others. False when unset.",
                          "example": false
                        },
                        "allowDeleteAfterEngagement": {
                          "type": "boolean",
                          "description": "Whether an author may delete their post after it was reviewed, merged into or received votes from others or any comment. False when unset.",
                          "example": false
                        },
                        "showPublicEditHistory": {
                          "type": "boolean",
                          "description": "The portal setting that shows customers a post's edit history. False when unset.",
                          "example": false
                        },
                        "ai": {
                          "type": "boolean",
                          "description": "The instance has an AI provider, so the portal can offer AI help and translation",
                          "example": true
                        }
                      },
                      "required": [
                        "allowAnonymous",
                        "allowEditAfterEngagement",
                        "allowDeleteAfterEngagement",
                        "showPublicEditHistory",
                        "ai"
                      ],
                      "description": "Portal feature switches"
                    },
                    "portalAccess": {
                      "type": "object",
                      "properties": {
                        "isPrivate": {
                          "type": "boolean",
                          "description": "Whether the portal is private, so only admitted callers may open it (see evaluateQuillsMyPortalAccess)",
                          "example": false
                        }
                      },
                      "required": [
                        "isPrivate"
                      ],
                      "description": "The portal's visibility"
                    },
                    "nav": {
                      "type": "object",
                      "properties": {
                        "tabs": {
                          "type": "object",
                          "properties": {
                            "feedback": {
                              "type": "boolean",
                              "description": "Whether the feedback tab is on",
                              "example": true
                            },
                            "roadmap": {
                              "type": "boolean",
                              "description": "Whether the roadmap tab is on",
                              "example": true
                            },
                            "changelog": {
                              "type": "boolean",
                              "description": "Whether the changelog tab is on",
                              "example": true
                            },
                            "help": {
                              "type": "boolean",
                              "description": "Whether the help center tab is on",
                              "example": true
                            },
                            "support": {
                              "type": "boolean",
                              "description": "Whether the support tab is on",
                              "example": false
                            },
                            "status": {
                              "type": "boolean",
                              "description": "Whether the status page tab is on",
                              "example": false
                            }
                          },
                          "required": [
                            "feedback",
                            "roadmap",
                            "changelog",
                            "help",
                            "support",
                            "status"
                          ],
                          "description": "The built-in portal tabs that are on. A tab that the stored tab list does not name is on. While the roadmap or changelog tab is off, its customer routes answer 404."
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "maxLength": 30,
                                "description": "The tab label",
                                "example": "Docs"
                              },
                              "url": {
                                "type": "string",
                                "maxLength": 2048,
                                "description": "The link target, an http or https URL",
                                "example": "https://docs.example.com"
                              },
                              "newTab": {
                                "type": "boolean",
                                "description": "Whether the link opens in a new browser tab. True when unset.",
                                "example": true
                              }
                            },
                            "required": [
                              "label",
                              "url",
                              "newTab"
                            ]
                          },
                          "maxItems": 20,
                          "description": "The custom link tabs that are on, in stored order. Only http(s) URLs with a label."
                        }
                      },
                      "required": [
                        "tabs",
                        "links"
                      ],
                      "description": "The portal navigation"
                    },
                    "branding": {
                      "type": "object",
                      "properties": {
                        "logoUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The workspace logo URL, http or https. Uploaded logos get a signed URL that expires. Null when no logo is set.",
                          "example": "https://cdn.example.com/logos/acme.png"
                        },
                        "theme": {
                          "type": "object",
                          "properties": {
                            "themeMode": {
                              "type": "string",
                              "enum": [
                                "light",
                                "dark",
                                "user"
                              ],
                              "description": "light or dark: the portal always uses that theme. user: it follows the visitor's preference (the default).",
                              "example": "user"
                            },
                            "light": {
                              "type": "object",
                              "properties": {
                                "background": {
                                  "type": "string",
                                  "description": "The background theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "foreground": {
                                  "type": "string",
                                  "description": "The foreground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "card": {
                                  "type": "string",
                                  "description": "The card theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "cardForeground": {
                                  "type": "string",
                                  "description": "The cardForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "popover": {
                                  "type": "string",
                                  "description": "The popover theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "popoverForeground": {
                                  "type": "string",
                                  "description": "The popoverForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "primary": {
                                  "type": "string",
                                  "description": "The primary theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "primaryForeground": {
                                  "type": "string",
                                  "description": "The primaryForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "secondary": {
                                  "type": "string",
                                  "description": "The secondary theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "secondaryForeground": {
                                  "type": "string",
                                  "description": "The secondaryForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "muted": {
                                  "type": "string",
                                  "description": "The muted theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "mutedForeground": {
                                  "type": "string",
                                  "description": "The mutedForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "accent": {
                                  "type": "string",
                                  "description": "The accent theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "accentForeground": {
                                  "type": "string",
                                  "description": "The accentForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "accentInk": {
                                  "type": "string",
                                  "description": "The accentInk theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "destructive": {
                                  "type": "string",
                                  "description": "The destructive theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "destructiveForeground": {
                                  "type": "string",
                                  "description": "The destructiveForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "border": {
                                  "type": "string",
                                  "description": "The border theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "input": {
                                  "type": "string",
                                  "description": "The input theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "ring": {
                                  "type": "string",
                                  "description": "The ring theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "success": {
                                  "type": "string",
                                  "description": "The success theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarBackground": {
                                  "type": "string",
                                  "description": "The sidebarBackground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarForeground": {
                                  "type": "string",
                                  "description": "The sidebarForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarPrimary": {
                                  "type": "string",
                                  "description": "The sidebarPrimary theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarPrimaryForeground": {
                                  "type": "string",
                                  "description": "The sidebarPrimaryForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarAccent": {
                                  "type": "string",
                                  "description": "The sidebarAccent theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarAccentForeground": {
                                  "type": "string",
                                  "description": "The sidebarAccentForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarBorder": {
                                  "type": "string",
                                  "description": "The sidebarBorder theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarRing": {
                                  "type": "string",
                                  "description": "The sidebarRing theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "chart1": {
                                  "type": "string",
                                  "description": "The chart1 theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "chart2": {
                                  "type": "string",
                                  "description": "The chart2 theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "chart3": {
                                  "type": "string",
                                  "description": "The chart3 theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "chart4": {
                                  "type": "string",
                                  "description": "The chart4 theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "chart5": {
                                  "type": "string",
                                  "description": "The chart5 theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                }
                              },
                              "description": "Theme colors for the light theme"
                            },
                            "dark": {
                              "type": "object",
                              "properties": {
                                "background": {
                                  "type": "string",
                                  "description": "The background theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "foreground": {
                                  "type": "string",
                                  "description": "The foreground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "card": {
                                  "type": "string",
                                  "description": "The card theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "cardForeground": {
                                  "type": "string",
                                  "description": "The cardForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "popover": {
                                  "type": "string",
                                  "description": "The popover theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "popoverForeground": {
                                  "type": "string",
                                  "description": "The popoverForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "primary": {
                                  "type": "string",
                                  "description": "The primary theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "primaryForeground": {
                                  "type": "string",
                                  "description": "The primaryForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "secondary": {
                                  "type": "string",
                                  "description": "The secondary theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "secondaryForeground": {
                                  "type": "string",
                                  "description": "The secondaryForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "muted": {
                                  "type": "string",
                                  "description": "The muted theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "mutedForeground": {
                                  "type": "string",
                                  "description": "The mutedForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "accent": {
                                  "type": "string",
                                  "description": "The accent theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "accentForeground": {
                                  "type": "string",
                                  "description": "The accentForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "accentInk": {
                                  "type": "string",
                                  "description": "The accentInk theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "destructive": {
                                  "type": "string",
                                  "description": "The destructive theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "destructiveForeground": {
                                  "type": "string",
                                  "description": "The destructiveForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "border": {
                                  "type": "string",
                                  "description": "The border theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "input": {
                                  "type": "string",
                                  "description": "The input theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "ring": {
                                  "type": "string",
                                  "description": "The ring theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "success": {
                                  "type": "string",
                                  "description": "The success theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarBackground": {
                                  "type": "string",
                                  "description": "The sidebarBackground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarForeground": {
                                  "type": "string",
                                  "description": "The sidebarForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarPrimary": {
                                  "type": "string",
                                  "description": "The sidebarPrimary theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarPrimaryForeground": {
                                  "type": "string",
                                  "description": "The sidebarPrimaryForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarAccent": {
                                  "type": "string",
                                  "description": "The sidebarAccent theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarAccentForeground": {
                                  "type": "string",
                                  "description": "The sidebarAccentForeground theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarBorder": {
                                  "type": "string",
                                  "description": "The sidebarBorder theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "sidebarRing": {
                                  "type": "string",
                                  "description": "The sidebarRing theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "chart1": {
                                  "type": "string",
                                  "description": "The chart1 theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "chart2": {
                                  "type": "string",
                                  "description": "The chart2 theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "chart3": {
                                  "type": "string",
                                  "description": "The chart3 theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "chart4": {
                                  "type": "string",
                                  "description": "The chart4 theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                },
                                "chart5": {
                                  "type": "string",
                                  "description": "The chart5 theme color, a CSS color value. Absent when unset or when the stored value is not safe to use.",
                                  "example": "#4f46e5"
                                }
                              },
                              "description": "Theme colors for the dark theme"
                            }
                          },
                          "required": [
                            "themeMode",
                            "light",
                            "dark"
                          ],
                          "description": "The portal color theme"
                        },
                        "headerDisplayMode": {
                          "type": "string",
                          "enum": [
                            "logo_and_name",
                            "logo_only",
                            "custom_logo"
                          ],
                          "description": "How the portal header shows the brand: logo_and_name (the default), logo_only or custom_logo",
                          "example": "logo_and_name"
                        },
                        "headerDisplayName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "A custom name for the portal header. Null when none is set.",
                          "example": "Acme Feedback"
                        }
                      },
                      "required": [
                        "logoUrl",
                        "theme",
                        "headerDisplayMode",
                        "headerDisplayName"
                      ],
                      "description": "The portal branding"
                    }
                  },
                  "required": [
                    "name",
                    "features",
                    "portalAccess",
                    "nav",
                    "branding"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/access": {
      "get": {
        "operationId": "evaluateQuillsMyPortalAccess",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Evaluate the caller's portal access",
        "description": "Returns whether the caller may open this workspace's portal and how the portal's sign-in button works. The caller authenticates with their session cookie; the route also answers without sign-in, with reason public or unauthenticated. Only the decision is returned, never the allowed domains or segments. A workspace member is granted with the reason team but still acts as a customer on portal routes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The access decision and the sign-in mode",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "granted": {
                      "type": "boolean",
                      "description": "Whether the caller may open the portal",
                      "example": true
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "public",
                        "team",
                        "domain",
                        "segment",
                        "invite",
                        "widget",
                        "unauthenticated",
                        "unauthorized"
                      ],
                      "description": "Why access was granted or denied. public: the portal is public. team: the caller is a workspace member. domain: the caller's verified email domain is allowed. segment: the caller belongs to an allowed segment. invite: the caller accepted a portal invite. widget: the caller signed in through widget token sign-in. unauthenticated: the portal is private and the caller is not signed in. unauthorized: the portal is private and no rule admits the signed-in caller.",
                      "example": "domain"
                    },
                    "signIn": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "account",
                            "sso",
                            "disabled"
                          ],
                          "description": "account: the sign-in button opens the sign-in page. sso: it opens ssoUrl, the host app's login page. disabled: customers cannot sign in to the portal.",
                          "example": "account"
                        },
                        "ssoUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The host app's login page. Null unless mode is sso.",
                          "example": null
                        }
                      },
                      "required": [
                        "mode",
                        "ssoUrl"
                      ],
                      "description": "How the portal's sign-in button works"
                    }
                  },
                  "required": [
                    "granted",
                    "reason",
                    "signIn"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/access-denied": {
      "post": {
        "operationId": "recordQuillsPortalAccessDenied",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Record that the portal denied the caller",
        "description": "Evaluates the caller's portal access again and, when it is denied, records a `portal.access_denied` event with the reason. A caller who has access records nothing. The caller must be signed in with their session cookie. Limited to 20 attempts per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a denial was recorded, and the access reason",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recorded": {
                      "type": "boolean",
                      "description": "Whether a denial was recorded. False when the caller has access.",
                      "example": true
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "public",
                        "team",
                        "domain",
                        "segment",
                        "invite",
                        "widget",
                        "unauthenticated",
                        "unauthorized"
                      ],
                      "description": "Why access was granted or denied. public: the portal is public. team: the caller is a workspace member. domain: the caller's verified email domain is allowed. segment: the caller belongs to an allowed segment. invite: the caller accepted a portal invite. widget: the caller signed in through widget token sign-in. unauthenticated: the portal is private and the caller is not signed in. unauthorized: the portal is private and no rule admits the signed-in caller.",
                      "example": "domain"
                    }
                  },
                  "required": [
                    "recorded",
                    "reason"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/user/profile": {
      "get": {
        "operationId": "getQuillsCustomerProfile",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the caller's customer profile",
        "description": "Returns the signed-in caller's customer profile in this workspace. The caller authenticates with their session cookie. linked is false until the account first acts in this workspace; name and email then come from the account. Answers 404 while the portal is off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's customer profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "linked": {
                      "type": "boolean",
                      "description": "Whether the account has a customer profile in this workspace. False until the account first acts here.",
                      "example": true
                    },
                    "principalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The caller's principal ID in this workspace. Null until linked.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "customerId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The caller's customer ID in this workspace. Null until linked.",
                      "example": "user_01m8rxfrbhfzr9r84qkepvgcsq"
                    },
                    "name": {
                      "type": "string",
                      "description": "The profile's display name; the account name until the profile has its own",
                      "example": "Jane Doe"
                    },
                    "email": {
                      "type": "string",
                      "description": "The account's email address",
                      "example": "jane@example.com"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The avatar: a short-lived URL for an uploaded image, else an http or https image URL. Null when none is set.",
                      "example": "https://cdn.example.com/avatars/jane.png"
                    }
                  },
                  "required": [
                    "linked",
                    "principalId",
                    "customerId",
                    "name",
                    "email",
                    "avatarUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateQuillsCustomerProfile",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Update the caller's customer profile",
        "description": "Sets the display name of the signed-in caller's customer profile, in this workspace only; the account is not changed. The caller authenticates with their session cookie; creates the caller's customer profile when missing. Records a `customer.profile_updated` event. Limited to 30 attempts per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100,
                    "description": "The new display name, trimmed",
                    "example": "Jane Doe"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The caller's customer profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "linked": {
                      "type": "boolean",
                      "description": "Whether the account has a customer profile in this workspace. False until the account first acts here.",
                      "example": true
                    },
                    "principalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The caller's principal ID in this workspace. Null until linked.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "customerId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The caller's customer ID in this workspace. Null until linked.",
                      "example": "user_01m8rxfrbhfzr9r84qkepvgcsq"
                    },
                    "name": {
                      "type": "string",
                      "description": "The profile's display name; the account name until the profile has its own",
                      "example": "Jane Doe"
                    },
                    "email": {
                      "type": "string",
                      "description": "The account's email address",
                      "example": "jane@example.com"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The avatar: a short-lived URL for an uploaded image, else an http or https image URL. Null when none is set.",
                      "example": "https://cdn.example.com/avatars/jane.png"
                    }
                  },
                  "required": [
                    "linked",
                    "principalId",
                    "customerId",
                    "name",
                    "email",
                    "avatarUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unlinkQuillsCustomerProfile",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Unlink the caller's customer profile",
        "description": "Removes the link between the signed-in account and its customer profile in this workspace. The profile, its history and the account stay; the account's next action here creates a new profile. The caller authenticates with their session cookie. Records a `customer.profile_unlinked` event when a link was removed. Limited to 30 attempts per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a link was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether a link was removed. False when the account had no profile here.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/user/avatar/{customerId}": {
      "get": {
        "operationId": "getQuillsCustomerAvatar",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a customer's avatar URL",
        "description": "Returns the avatar URL of a customer who is a person of this portal. Needs no credential. Answers with JSON rather than a redirect. An uploaded avatar comes as a short-lived URL; otherwise only an http or https image URL is returned. Answers 404 while the portal is off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The customer ID",
              "example": "user_01m8rxfrbhfzr9r84qkepvgcsq"
            },
            "required": true,
            "description": "The customer ID",
            "name": "customerId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The avatar URL, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The avatar URL. Null when the customer has no avatar.",
                      "example": "https://cdn.example.com/avatars/jane.png"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No customer with this ID has a principal in this workspace; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/profiles/{principalId}": {
      "get": {
        "operationId": "getQuillsPublicUserProfile",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a person's public portal profile",
        "description": "Returns a person's display name, avatar, join date and the posts and comments that the caller can see, newest first, at most 100 of each. Never returns an email, a company or votes. The caller authenticates with their session cookie; the route also works without sign-in and then shows only what an anonymous visitor can see. Answers 404 when the person is unknown, blocked, a test customer or has no activity that the caller can see.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The person's principal ID",
              "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
            },
            "required": true,
            "description": "The person's principal ID",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The public profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "The person's principal ID",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "displayName": {
                      "type": "string",
                      "description": "The person's display name. Empty when none is set.",
                      "example": "Jane Doe"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The person's avatar, an http or https URL. Null when none is set.",
                      "example": "https://cdn.example.com/avatars/jane.png"
                    },
                    "isTeamMember": {
                      "type": "boolean",
                      "description": "Whether the person is a teammate",
                      "example": false
                    },
                    "joinedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the person first appeared in this workspace",
                      "example": "2026-03-02T09:30:00.000Z"
                    },
                    "postCount": {
                      "type": "number",
                      "description": "Number of the person's posts that the caller can see",
                      "example": 3
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of posts the caller can see on which the person has a visible comment",
                      "example": 7
                    },
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "postId": {
                            "type": "string",
                            "description": "The post ID",
                            "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "title": {
                            "type": "string",
                            "description": "The post title",
                            "example": "Export boards to CSV"
                          },
                          "boardSlug": {
                            "type": "string",
                            "description": "The slug of the post's board",
                            "example": "feature-requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The post's status name. Null when the post has none.",
                            "example": "Planned"
                          },
                          "statusColor": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The post's status color. Null when the post has none.",
                            "example": "#3b82f6"
                          },
                          "occurredAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "For a post, when it was created; for a comment entry, when the person last commented on the post",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "postId",
                          "title",
                          "boardSlug",
                          "statusName",
                          "statusColor",
                          "occurredAt"
                        ]
                      },
                      "description": "The person's posts that the caller can see, newest first"
                    },
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "postId": {
                            "type": "string",
                            "description": "The post ID",
                            "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "title": {
                            "type": "string",
                            "description": "The post title",
                            "example": "Export boards to CSV"
                          },
                          "boardSlug": {
                            "type": "string",
                            "description": "The slug of the post's board",
                            "example": "feature-requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The post's status name. Null when the post has none.",
                            "example": "Planned"
                          },
                          "statusColor": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The post's status color. Null when the post has none.",
                            "example": "#3b82f6"
                          },
                          "occurredAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "For a post, when it was created; for a comment entry, when the person last commented on the post",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "postId",
                          "title",
                          "boardSlug",
                          "statusName",
                          "statusColor",
                          "occurredAt"
                        ]
                      },
                      "description": "One entry per post the person commented on, by latest comment first"
                    }
                  },
                  "required": [
                    "principalId",
                    "displayName",
                    "avatarUrl",
                    "isTeamMember",
                    "joinedAt",
                    "postCount",
                    "commentCount",
                    "posts",
                    "comments"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The private portal denies the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Unknown, blocked or test person, or no activity the caller can see; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/invites/{inviteId}/accept": {
      "post": {
        "operationId": "acceptQuillsPortalInvite",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Accept a portal invite",
        "description": "Accepts a pending portal invite for the signed-in caller, which admits them to a private portal. The caller authenticates with their session cookie and sends the token from the invite link's fragment; the account must have the invited email address, verified. Creates the caller's customer profile when missing; never makes the caller a workspace member. Accepting again with the same account returns alreadyAccepted without a token check. An unknown or canceled token answers 404 so it reveals nothing about the invite. Records a `portal.invite_accepted` event on first acceptance. Limited to 20 attempts per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The invite ID from the invite link",
              "example": "invite_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The invite ID from the invite link",
            "name": "inviteId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 200,
                    "description": "The token from the invite link's #token= fragment. Any of the invite's newest 20 links works.",
                    "example": "q8Zt3nV1xW0bR7kL2mP9sD4fG6hJ5cY1aE8uI3oN2tQ"
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The invite is accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "boolean",
                      "description": "Always true on success",
                      "example": true
                    },
                    "alreadyAccepted": {
                      "type": "boolean",
                      "description": "Whether this account had already accepted the invite, so nothing changed",
                      "example": false
                    }
                  },
                  "required": [
                    "accepted",
                    "alreadyAccepted"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account's email is not the invited address, or it is not verified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No invite with this ID and token, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The invite is no longer pending or has expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/posts/{postId}/subscription": {
      "get": {
        "operationId": "getQuillsMyPostSubscription",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the caller's subscription to a post",
        "description": "Returns the caller's notification level for a published, unmerged post that they may see. level is none for a caller without a sign-in or a profile. Works without sign-in; a session cookie signs the caller in.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's subscription level",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "level": {
                      "type": "string",
                      "enum": [
                        "all",
                        "status_only",
                        "none"
                      ],
                      "description": "all: new comments and status changes. status_only: status changes only. none: not subscribed.",
                      "example": "status_only"
                    }
                  },
                  "required": [
                    "level"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or a private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post does not exist, is merged, held or not visible to the caller, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "setQuillsMyPostSubscription",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Subscribe the caller to a post or change the level",
        "description": "Creates or updates the caller's subscription to a published, unmerged post that they may see. Desired state, so a retry changes nothing. Records no event. Limited to 60 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "level": {
                    "type": "string",
                    "enum": [
                      "all",
                      "status_only"
                    ],
                    "description": "Notification level. all: new comments and status changes. status_only: status changes only.",
                    "example": "all"
                  }
                },
                "required": [
                  "level"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The caller's subscription level",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "level": {
                      "type": "string",
                      "enum": [
                        "all",
                        "status_only"
                      ],
                      "description": "Notification level. all: new comments and status changes. status_only: status changes only.",
                      "example": "all"
                    }
                  },
                  "required": [
                    "level"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or a private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post does not exist, is merged, held or not visible to the caller, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsMyPostSubscription",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Unsubscribe the caller from a post",
        "description": "Turns off comment and status notices for the caller on a published, unmerged post that they may see. The subscription row stays with both notices off. Records no event. The caller authenticates with their session cookie.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the caller followed the post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the caller followed the post's status changes before this request"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or a private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post does not exist, is merged, held or not visible to the caller, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/changelog/subscription": {
      "get": {
        "operationId": "getQuillsMyChangelogSubscription",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the caller's changelog subscription",
        "description": "Returns whether the caller gets updates about new changelog entries; false for a caller without a sign-in or a profile. Works without sign-in; a session cookie signs the caller in.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the caller hears about new changelog entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscribed": {
                      "type": "boolean",
                      "description": "Whether the caller has a changelog subscription that was not unsubscribed"
                    }
                  },
                  "required": [
                    "subscribed"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or a private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "subscribeQuillsMyChangelog",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Subscribe the caller to the changelog",
        "description": "Subscribes the caller to updates about new changelog entries. An explicit subscribe also undoes an earlier unsubscribe; a retry changes nothing. Records no event. Limited to 30 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller is subscribed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscribed": {
                      "type": "boolean",
                      "description": "Always true: the caller is subscribed"
                    }
                  },
                  "required": [
                    "subscribed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or a private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unsubscribeQuillsMyChangelog",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Unsubscribe the caller from the changelog",
        "description": "Ends the caller's changelog subscription. Keeps the row with an unsubscribe time, so an import or auto-subscribe never subscribes the caller again. A retry changes nothing; records no event. The caller authenticates with their session cookie.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a subscription ended",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request ended an active subscription; false when there was none"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or a private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/user/language": {
      "get": {
        "operationId": "getQuillsMyLanguagePreference",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the caller's language preference",
        "description": "Returns the signed-in caller's preferred language for this workspace's portal. The caller authenticates with their session cookie. Null until set, and for a caller without a customer profile. A teammate's language is the account locale, not this value. Answers 404 while the portal is off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's language preference",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "language": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 35,
                      "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
                      "description": "The caller's preferred language, a BCP-47 tag such as en or pt-BR. Null: no preference.",
                      "example": "pt-BR"
                    }
                  },
                  "required": [
                    "language"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "setQuillsMyLanguagePreference",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Set or clear the caller's language preference",
        "description": "Stores the signed-in caller's preferred language on their customer profile; null clears it. The caller authenticates with their session cookie; creates the caller's customer profile when missing. Idempotent. Records no event. Limited to 30 attempts per client IP and workspace per 10 minutes. Answers 404 while the portal is off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "language": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35,
                    "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
                    "description": "The caller's preferred language, a BCP-47 tag such as en or pt-BR. Null: no preference.",
                    "example": "pt-BR"
                  }
                },
                "required": [
                  "language"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The caller's language preference",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "language": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 35,
                      "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
                      "description": "The caller's preferred language, a BCP-47 tag such as en or pt-BR. Null: no preference.",
                      "example": "pt-BR"
                    }
                  },
                  "required": [
                    "language"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/mentions/suggest": {
      "get": {
        "operationId": "listQuillsPortalMentionSuggestions",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Suggest people to @-mention",
        "description": "Lists up to 10 people whose display name starts with q, case-insensitively, sorted by display name (an empty q lists the first 10). Never matches or returns an email address, and never lists the caller, blocked people or test customers. scope team lists teammates only. The caller authenticates with their session cookie, must pass the private-portal gate and needs a customer profile. Limited to 60 requests per client IP and workspace per minute.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "default": "",
              "description": "Display name prefix to match. Empty: no filter.",
              "example": "ja"
            },
            "required": false,
            "description": "Display name prefix to match. Empty: no filter.",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "team"
              ],
              "default": "all",
              "description": "all: teammates and customers. team: teammates only.",
              "example": "all"
            },
            "required": false,
            "description": "all: teammates and customers. team: teammates only.",
            "name": "scope",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching people",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "people": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "The person's principal ID, used in the mention",
                            "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                          },
                          "displayName": {
                            "type": "string",
                            "description": "The person's display name",
                            "example": "Jane Doe"
                          },
                          "avatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The person's avatar, an http or https URL. Null when none is set.",
                            "example": "https://cdn.example.com/avatars/jane.png"
                          },
                          "team": {
                            "type": "boolean",
                            "description": "Whether the person is a teammate",
                            "example": false
                          }
                        },
                        "required": [
                          "principalId",
                          "displayName",
                          "avatarUrl",
                          "team"
                        ]
                      },
                      "description": "Matching people, by display name"
                    }
                  },
                  "required": [
                    "people"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The private portal denies the caller, or the caller has no customer profile",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/unsubscribe": {
      "get": {
        "operationId": "previewQuillsUnsubscribeToken",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Show what an unsubscribe link would do",
        "description": "Returns what a live unsubscribe token would turn off. Needs no credential: the token is the only one. Never writes and never spends the token, so a mail scanner that opens the link changes nothing. A browser that opens it gets a 303 to the portal's unsubscribe page, which asks before it unsubscribes. Works while the portal is off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 20,
              "maxLength": 200,
              "description": "The token from the emailed unsubscribe link. Valid for 30 days and works once.",
              "example": "q8Zt3nV1xW0bR7kL2mP9sD4fG6hJ5cY1aE8uI3oN2tQ"
            },
            "required": true,
            "description": "The token from the emailed unsubscribe link. Valid for 30 days and works once.",
            "name": "token",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The action of a live token, or valid false",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid": {
                      "type": "boolean",
                      "description": "Whether the token is unused, unexpired and known",
                      "example": true
                    },
                    "action": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "unsubscribe_post",
                        "unsubscribe_all",
                        "unsubscribe_changelog",
                        "unsubscribe_status",
                        "unsubscribe_shipped",
                        "unsubscribe_digest",
                        null
                      ],
                      "description": "What the token turns off. unsubscribe_post: unfollows one post. unsubscribe_all: mutes all mail to the recipient. unsubscribe_changelog: ends the changelog subscription. unsubscribe_status: ends the status page subscription. unsubscribe_shipped: turns off the shipped-feedback mail. unsubscribe_digest: turns off the weekly digest mail. Null when the token is unknown, spent, expired or malformed.",
                      "example": "unsubscribe_post"
                    },
                    "postTitle": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The title of the post that an unsubscribe_post token names. Null for other actions and unknown tokens.",
                      "example": "Export boards to CSV"
                    }
                  },
                  "required": [
                    "valid",
                    "action",
                    "postTitle"
                  ]
                }
              }
            }
          },
          "303": {
            "description": "Continue in the web app",
            "headers": {
              "Location": {
                "description": "The web page",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "description": "The redirect is never cached",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-store"
                  ]
                }
              },
              "Referrer-Policy": {
                "description": "This URL is not sent to the web app",
                "schema": {
                  "type": "string",
                  "enum": [
                    "no-referrer"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createQuillsUnsubscribe",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "One-click unsubscribe (RFC 8058)",
        "description": "Applies an unsubscribe token's action and spends the token. This is the POST a mail provider sends to the List-Unsubscribe URL with the form body List-Unsubscribe=One-Click. Needs no credential; the body is not read: the token in the URL is the credential. Answers 200 for every well-formed token; an unknown, spent or expired token changes nothing. Every action is idempotent. Works while the portal is off. Records no event.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 20,
              "maxLength": 200,
              "description": "The token from the emailed unsubscribe link. Valid for 30 days and works once.",
              "example": "q8Zt3nV1xW0bR7kL2mP9sD4fG6hJ5cY1aE8uI3oN2tQ"
            },
            "required": true,
            "description": "The token from the emailed unsubscribe link. Valid for 30 days and works once.",
            "name": "token",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the token did something",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "processed": {
                      "type": "boolean",
                      "description": "Whether the token was live and its action was applied. False changes nothing.",
                      "example": true
                    },
                    "action": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "unsubscribe_post",
                        "unsubscribe_all",
                        "unsubscribe_changelog",
                        "unsubscribe_status",
                        "unsubscribe_shipped",
                        "unsubscribe_digest",
                        null
                      ],
                      "description": "What the token turns off. unsubscribe_post: unfollows one post. unsubscribe_all: mutes all mail to the recipient. unsubscribe_changelog: ends the changelog subscription. unsubscribe_status: ends the status page subscription. unsubscribe_shipped: turns off the shipped-feedback mail. unsubscribe_digest: turns off the weekly digest mail. Null when the token is unknown, spent, expired or malformed.",
                      "example": "unsubscribe_post"
                    },
                    "postTitle": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The title of the post that an unsubscribe_post token names. Null for other actions and unknown tokens.",
                      "example": "Export boards to CSV"
                    }
                  },
                  "required": [
                    "processed",
                    "action",
                    "postTitle"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/unsubscribe/confirm": {
      "post": {
        "operationId": "processQuillsUnsubscribeToken",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Confirm an unsubscribe link",
        "description": "Applies an unsubscribe token's action and spends the token, for the portal's confirmation page: the token goes in the body, not the URL. Needs no credential. Answers 200 for every well-formed token; an unknown, spent or expired token changes nothing. Works while the portal is off. Records no event.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 200,
                    "description": "The token from the emailed unsubscribe link. Valid for 30 days and works once.",
                    "example": "q8Zt3nV1xW0bR7kL2mP9sD4fG6hJ5cY1aE8uI3oN2tQ"
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Whether the token did something",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "processed": {
                      "type": "boolean",
                      "description": "Whether the token was live and its action was applied. False changes nothing.",
                      "example": true
                    },
                    "action": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "unsubscribe_post",
                        "unsubscribe_all",
                        "unsubscribe_changelog",
                        "unsubscribe_status",
                        "unsubscribe_shipped",
                        "unsubscribe_digest",
                        null
                      ],
                      "description": "What the token turns off. unsubscribe_post: unfollows one post. unsubscribe_all: mutes all mail to the recipient. unsubscribe_changelog: ends the changelog subscription. unsubscribe_status: ends the status page subscription. unsubscribe_shipped: turns off the shipped-feedback mail. unsubscribe_digest: turns off the weekly digest mail. Null when the token is unknown, spent, expired or malformed.",
                      "example": "unsubscribe_post"
                    },
                    "postTitle": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The title of the post that an unsubscribe_post token names. Null for other actions and unknown tokens.",
                      "example": "Export boards to CSV"
                    }
                  },
                  "required": [
                    "processed",
                    "action",
                    "postTitle"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/my-feedback": {
      "get": {
        "operationId": "listQuillsPortalMyFeedback",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the posts that the caller created, voted for or follows",
        "description": "Lists the posts that the signed-in caller created, voted for or follows, limited to posts the caller may still see. The caller authenticates with their session cookie. Sorted by last update, newest first, then by ID; paginate with offset and nextOffset. Empty when the caller has no customer profile in this workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "mine",
                "voted",
                "following"
              ],
              "default": "all",
              "description": "all: posts the caller created, voted for or follows. mine: posts the caller created. voted: posts the caller voted for. following: posts whose status changes the caller follows.",
              "example": "all"
            },
            "required": false,
            "description": "all: posts the caller created, voted for or follows. mine: posts the caller created. voted: posts the caller voted for. following: posts whose status changes the caller follows.",
            "name": "filter",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 0,
              "description": "Number of posts to skip; pass the previous nextOffset",
              "example": 0
            },
            "required": false,
            "description": "Number of posts to skip; pass the previous nextOffset",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of posts to return",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of posts to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the caller's posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The post ID",
                            "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "title": {
                            "type": "string",
                            "description": "The post title",
                            "example": "Export boards to CSV"
                          },
                          "board": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The board ID",
                                "example": "board_01m8rxfrbhfzr9r83a29m5ke14"
                              },
                              "name": {
                                "type": "string",
                                "description": "The board name",
                                "example": "Feature requests"
                              }
                            },
                            "required": [
                              "id",
                              "name"
                            ],
                            "description": "The board that holds the post"
                          },
                          "status": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "The status name",
                                "example": "Planned"
                              },
                              "color": {
                                "type": "string",
                                "description": "The status color, as stored",
                                "example": "#3b82f6"
                              }
                            },
                            "required": [
                              "name",
                              "color"
                            ],
                            "description": "The post's status. Null when the post has none."
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "open",
                              "planned",
                              "in_progress",
                              "shipped",
                              null
                            ],
                            "description": "The public stage of the post's status. open: no status or an open status. planned or in_progress: a status with that slug. shipped: a complete status. Null: a closed status.",
                            "example": "planned"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Left out when the post's board hides vote counts",
                            "example": 42
                          },
                          "isAuthor": {
                            "type": "boolean",
                            "description": "Whether the caller created the post",
                            "example": true
                          },
                          "voted": {
                            "type": "boolean",
                            "description": "Whether the caller voted for the post",
                            "example": false
                          },
                          "following": {
                            "type": "boolean",
                            "description": "Whether the caller follows the post's status changes",
                            "example": true
                          },
                          "lastChangedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was last updated",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "board",
                          "status",
                          "stage",
                          "isAuthor",
                          "voted",
                          "following",
                          "lastChangedAt"
                        ]
                      },
                      "description": "One page of the caller's posts, most recently changed first"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The offset of the next page. Null on the last page.",
                      "example": 20
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/user/weekly-digest": {
      "get": {
        "operationId": "getQuillsMyWeeklyDigestPreference",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the caller's weekly digest preference",
        "description": "Returns whether the signed-in caller receives the weekly digest mail. The caller authenticates with their session cookie. True until the caller turns the digest off, including when the caller has no customer profile yet.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's weekly digest preference",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "weeklyDigest": {
                      "type": "boolean",
                      "description": "A weekly mail when the status of the caller's feedback changed. On by default.",
                      "example": true
                    }
                  },
                  "required": [
                    "weeklyDigest"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "setQuillsMyWeeklyDigestPreference",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Turn the caller's weekly digest on or off",
        "description": "Sets the email cell of the caller's weekly digest notification preference. The caller authenticates with their session cookie; creates the caller's customer profile when missing. Idempotent. Records no event. Limited to 30 attempts per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "weeklyDigest": {
                    "type": "boolean",
                    "description": "A weekly mail when the status of the caller's feedback changed. On by default.",
                    "example": true
                  }
                },
                "required": [
                  "weeklyDigest"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The caller's weekly digest preference",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "weeklyDigest": {
                      "type": "boolean",
                      "description": "A weekly mail when the status of the caller's feedback changed. On by default.",
                      "example": true
                    }
                  },
                  "required": [
                    "weeklyDigest"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/translations": {
      "post": {
        "operationId": "translateQuillsPortalContent",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Translate a post or a comment into the viewer's language",
        "description": "Machine-translates a post or a comment that the caller may see. The caller authenticates with their session cookie; the route also works without sign-in for content an anonymous visitor may see. Send exactly one of postId and commentId. A cached translation of the same text and language is returned without an AI call; a new one uses the AI provider, counts against the workspace's monthly AI limit, is cached for every viewer and logs AI usage. The workspace's protected terms (the help center's list) never reach the provider and stay unchanged. 409 when AI is not configured or the workspace reached its monthly AI limit and nothing is cached, 502 when the provider fails or changes a protected term. Limited to 60 requests per client IP and workspace, and per account, per 10 minutes. Records no event.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postId": {
                    "type": "string",
                    "description": "The post to translate. Send postId or commentId, not both.",
                    "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                  },
                  "commentId": {
                    "type": "string",
                    "description": "The comment to translate. Send postId or commentId, not both.",
                    "example": "post_comment_01m8rxfrbhfzr9r83gw2ecw92z"
                  },
                  "locale": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 35,
                    "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
                    "description": "The target language, a BCP 47 tag. Only the primary language is used (de-AT and de-DE are de); Chinese keeps its script (zh-cn or zh-tw).",
                    "example": "de-DE"
                  }
                },
                "required": [
                  "locale"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The translated title (null for a comment) and content",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 400,
                      "description": "The translated post title; the original title when the provider returned none. Null for a comment.",
                      "example": "Boards nach CSV exportieren"
                    },
                    "content": {
                      "type": "string",
                      "maxLength": 20000,
                      "description": "The translated text, with Markdown kept",
                      "example": "Wir brauchen einen CSV-Export für jedes Board."
                    }
                  },
                  "required": [
                    "title",
                    "content"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or the private portal denies the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post or comment with this ID that the caller may see; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "AI is not configured, the workspace reached its monthly AI limit, or the text changed during the request; The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The AI provider failed or changed a protected term",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/widget-link": {
      "get": {
        "operationId": "getQuillsPortalWidgetLink",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Whether a widget profile waits for the caller to link it",
        "description": "Returns whether a widget profile waits for the signed-in caller to link it. The caller authenticates with their session cookie. pending is true when a widget profile with the signed-in account's verified email asked for a portal sign-in link (POST /widget/portal-link) in the last 15 minutes and can be linked. The portal then asks the person to confirm (POST) or refuse (DELETE). Always false for a workspace member or an unverified email. 404 while the portal is off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a link waits for the caller's answer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pending": {
                      "type": "boolean",
                      "description": "Whether a link request waits for the caller's answer",
                      "example": true
                    }
                  },
                  "required": [
                    "pending"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "linkQuillsPortalWidgetProfile",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Link the caller's widget profile to their portal profile",
        "description": "Links the caller's widget profile to their portal profile after the person confirmed it in the portal. The caller authenticates with their session cookie; creates the caller's portal profile when missing. When the signed-in account's email is verified and equals the email of a widget profile that the host app identified in this workspace, and that widget profile asked for a portal sign-in link (POST /widget/portal-link) in the last 15 minutes, the widget profile's votes, comments, conversations, tickets, survey answers, subscriptions and other activity move to the caller's portal profile in one transaction. A duplicate vote, rating or subscription is dropped and its count lowered, so counts do not grow; an opt-out on either profile wins. The widget profile is removed and its sub identifies the portal profile from then on. A blocked or test profile, an unverified email, a workspace member and a portal profile that an earlier link gave another sub are never linked. Each request links once. Without a match nothing changes. Records a `user.lead_merged` event when profiles were merged. Limited to 30 attempts per client IP and workspace, and per account, per 10 minutes. 404 while the portal is off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's profile and the widget profile it absorbed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The caller's customer principal. Null when nothing was linked and the caller has no profile here.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "mergedPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The removed widget principal whose activity moved to the caller. Null when nothing was linked.",
                      "example": "principal_01m8rxfrbhfzr9r8468n432v52"
                    }
                  },
                  "required": [
                    "principalId",
                    "mergedPrincipalId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "declineQuillsPortalWidgetLink",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Refuse the link that a widget profile asked for",
        "description": "Ends the pending link request for the signed-in account's email because the person did not ask to open the portal from the widget; nothing is linked. The caller authenticates with their session cookie. Idempotent. Records no event. Limited to 30 attempts per client IP and workspace, and per account, per 10 minutes. 404 while the portal is off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a pending request ended",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "declined": {
                      "type": "boolean",
                      "description": "Whether a pending request ended. False when none was pending.",
                      "example": true
                    }
                  },
                  "required": [
                    "declined"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/config.json": {
      "get": {
        "operationId": "getQuillsWidgetConfig",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get the public widget configuration",
        "description": "Returns the widget's public boot configuration: tabs, launcher text, home screen, position, anti-spam settings and theme colors. Needs no credential and never returns the widget secret or customer data. config is null while the widget is disabled. Identify always needs an ssoToken signed with the widget secret. Sent with `Cache-Control: public, max-age=60, stale-while-revalidate=300`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The public widget configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the widget is on",
                      "example": true
                    },
                    "config": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "tabs": {
                          "type": "object",
                          "properties": {
                            "feedback": {
                              "type": "boolean",
                              "description": "The feedback tab. On when unset.",
                              "example": true
                            },
                            "changelog": {
                              "type": "boolean",
                              "description": "The changelog tab. On when the widget has no stored tab list.",
                              "example": true
                            },
                            "help": {
                              "type": "boolean",
                              "description": "The help center tab. Off when unset.",
                              "example": false
                            },
                            "messenger": {
                              "type": "boolean",
                              "description": "The messenger (chat) tab. On when the widget has no stored tab list.",
                              "example": true
                            },
                            "tickets": {
                              "type": "boolean",
                              "description": "The tickets tab. On when unset.",
                              "example": true
                            },
                            "home": {
                              "type": "boolean",
                              "description": "The home tab. On when unset.",
                              "example": true
                            }
                          },
                          "required": [
                            "feedback",
                            "changelog",
                            "help",
                            "messenger",
                            "tickets",
                            "home"
                          ],
                          "description": "Which widget tabs are on"
                        },
                        "hmacRequired": {
                          "type": "boolean",
                          "description": "Always true: identify needs an ssoToken signed with the widget secret",
                          "example": true
                        },
                        "ai": {
                          "type": "boolean",
                          "description": "True when the instance has an AI provider: the feedback composer can suggest a title and a board.",
                          "example": true
                        },
                        "visitorAnalytics": {
                          "type": "boolean",
                          "description": "Whether the widget records the pages that visitors open (createQuillsTrack). On when unset.",
                          "example": true
                        },
                        "visitorDeviceTracking": {
                          "type": "boolean",
                          "description": "Whether the widget records each visitor's browser and device. On when unset.",
                          "example": true
                        },
                        "launcherGreeting": {
                          "type": "string",
                          "description": "The greeting next to the launcher. Empty: none.",
                          "example": "Questions? We're here to help."
                        },
                        "launcherLabel": {
                          "type": "string",
                          "description": "The launcher button label. Empty: none.",
                          "example": "Help"
                        },
                        "replyTime": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "minutes",
                            "hours",
                            "day",
                            null
                          ],
                          "description": "How soon the team usually replies: within minutes, hours or a day. Null shows no reply-time line.",
                          "example": "hours"
                        },
                        "home": {
                          "type": "object",
                          "properties": {
                            "greeting": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The home tab's greeting. Null: the default.",
                              "example": "Hi there"
                            },
                            "subtitle": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The home tab's subtitle. Null: the default.",
                              "example": "Ask us anything or share feedback."
                            },
                            "showTeamAvatars": {
                              "type": "boolean",
                              "description": "Whether the home tab shows team avatars. On when unset.",
                              "example": true
                            }
                          },
                          "required": [
                            "greeting",
                            "subtitle",
                            "showTeamAvatars"
                          ],
                          "description": "The home tab"
                        },
                        "position": {
                          "type": "string",
                          "enum": [
                            "left",
                            "right"
                          ],
                          "description": "The launcher's corner: left for a stored bottom-left, else right",
                          "example": "right"
                        },
                        "antiSpam": {
                          "type": "object",
                          "properties": {
                            "challengeMode": {
                              "type": "string",
                              "enum": [
                                "off",
                                "adaptive",
                                "always"
                              ],
                              "description": "off: no challenge. adaptive: a challenge only when the client IP or workspace nears its rate limit. always: every protected request needs a challenge.",
                              "example": "adaptive"
                            },
                            "challengeProvider": {
                              "type": "string",
                              "enum": [
                                "pow",
                                "turnstile"
                              ],
                              "description": "pow: SHA-256 proof of work (createQuillsWidgetChallenge). turnstile: Cloudflare Turnstile.",
                              "example": "pow"
                            },
                            "turnstileSiteKey": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The instance's Turnstile site key. Null unless the provider is turnstile and the instance has one.",
                              "example": null
                            }
                          },
                          "required": [
                            "challengeMode",
                            "challengeProvider",
                            "turnstileSiteKey"
                          ],
                          "description": "Anti-spam challenge settings"
                        },
                        "theme": {
                          "type": "object",
                          "properties": {
                            "themeMode": {
                              "type": "string",
                              "enum": [
                                "light",
                                "dark",
                                "user"
                              ],
                              "description": "light or dark: the widget always uses that theme. user: it follows the visitor's preference.",
                              "example": "user"
                            },
                            "lightPrimary": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The light theme's primary color as #rgb or #rrggbb. Null when unset or not a hex color.",
                              "example": "#4f46e5"
                            },
                            "lightPrimaryForeground": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Text color on the light primary color, #rgb or #rrggbb. Null when unset.",
                              "example": "#ffffff"
                            },
                            "darkPrimary": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The dark theme's primary color, #rgb or #rrggbb. Null when unset.",
                              "example": "#818cf8"
                            },
                            "darkPrimaryForeground": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Text color on the dark primary color, #rgb or #rrggbb. Null when unset.",
                              "example": "#0b0b0f"
                            }
                          },
                          "required": [
                            "themeMode",
                            "lightPrimary",
                            "lightPrimaryForeground",
                            "darkPrimary",
                            "darkPrimaryForeground"
                          ],
                          "description": "The widget theme, from the branding settings"
                        }
                      },
                      "required": [
                        "tabs",
                        "hmacRequired",
                        "ai",
                        "visitorAnalytics",
                        "visitorDeviceTracking",
                        "launcherGreeting",
                        "launcherLabel",
                        "replyTime",
                        "home",
                        "position",
                        "antiSpam",
                        "theme"
                      ],
                      "description": "The widget configuration. Null while the widget is off."
                    }
                  },
                  "required": [
                    "enabled",
                    "config"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/capabilities": {
      "get": {
        "operationId": "getQuillsWidgetCapabilities",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get the widget's realtime capabilities",
        "description": "Returns how the widget receives new chat messages. There is no live chat stream yet, so the widget polls. Needs no credential. Sent with `Cache-Control: public, max-age=300, stale-while-revalidate=600`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The realtime capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "chat": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "live",
                            "poll"
                          ],
                          "description": "live: a realtime stream. poll: fetch new messages every pollIntervalMs. Currently always poll.",
                          "example": "poll"
                        },
                        "pollIntervalMs": {
                          "type": "number",
                          "description": "How often to poll, in milliseconds",
                          "example": 10000
                        }
                      },
                      "required": [
                        "mode",
                        "pollIntervalMs"
                      ],
                      "description": "Chat message delivery"
                    }
                  },
                  "required": [
                    "chat"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/locale": {
      "get": {
        "operationId": "getQuillsWidgetLocale",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Resolve the widget locale",
        "description": "Resolves the widget's UI locale. Needs no credential. An explicit supported locale wins; otherwise the best Accept-Language match by q weight; otherwise en. A regional tag falls back to its base language; Chinese resolves by script and Portuguese to pt-br. Sent with `Cache-Control: public, max-age=300` and `Vary: Accept-Language`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 35,
              "description": "The locale that the host page asks for, a BCP-47 tag. Ignored when unsupported.",
              "example": "de-AT"
            },
            "required": false,
            "description": "The locale that the host page asks for, a BCP-47 tag. Ignored when unsupported.",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The resolved locale",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "locale": {
                      "type": "string",
                      "enum": [
                        "en",
                        "de",
                        "fr",
                        "es",
                        "ar",
                        "ru",
                        "pt-br",
                        "zh-cn",
                        "zh-tw",
                        "nl",
                        "pl",
                        "th",
                        "uk"
                      ],
                      "description": "The supported locale to use",
                      "example": "de"
                    }
                  },
                  "required": [
                    "locale"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/challenge": {
      "post": {
        "operationId": "createQuillsWidgetChallenge",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Issue an anti-spam challenge for the widget",
        "description": "Issues the anti-spam challenge that the widget solves when the anti-spam check asks for one (challenge mode always, or adaptive under load), for example before an anonymous session or a new conversation. Needs no credential. Returns a stateless SHA-256 proof-of-work challenge bound to the workspace and client IP, valid for 5 minutes, or the Turnstile site key when the workspace uses Turnstile. For pow, find a nonce such that SHA-256 of `<token>:<nonce>` starts with `difficulty` zero bits. Writes nothing. Limited to 60 requests per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The anti-spam challenge to solve",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "provider": {
                      "type": "string",
                      "enum": [
                        "pow",
                        "turnstile"
                      ],
                      "description": "pow: solve the proof-of-work challenge in token. turnstile: run Cloudflare Turnstile with siteKey.",
                      "example": "pow"
                    },
                    "token": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The signed proof-of-work challenge to solve and send back with the nonce. Null for turnstile."
                    },
                    "difficulty": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The number of leading zero bits the solution hash needs. Null for turnstile.",
                      "example": 14
                    },
                    "expiresAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the proof-of-work challenge expires, ISO 8601 UTC. Null for turnstile.",
                      "example": "2026-11-30T14:10:00.000Z"
                    },
                    "siteKey": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The instance's Cloudflare Turnstile site key. Null for pow, or when the instance has none.",
                      "example": null
                    }
                  },
                  "required": [
                    "provider",
                    "token",
                    "difficulty",
                    "expiresAt",
                    "siteKey"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/install-context": {
      "post": {
        "operationId": "redeemQuillsWidgetInstallCode",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Redeem a widget install pairing code",
        "description": "Returns the widget signing secret and workspace setup metadata (enabled tabs, portal sign-in flags, defined user attributes and manual segment slugs) to the holder of a live pairing code, and turns the widget on. Needs no other credential: the code from mintQuillsWidgetInstallCode is the grant, redeemable at most twice within 15 minutes. Keep the secret in a server-only environment variable and use HTTPS. Records a `settings.widget_install_code_redeemed` event. Limited to 20 attempts per client IP and workspace per 15 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 80,
                    "description": "The pairing code that a teammate minted"
                  }
                },
                "required": [
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The widget signing secret and workspace setup metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "signingSecret": {
                      "type": "string",
                      "description": "The widget secret that signs identify tokens (HS256). Keep it server-side."
                    },
                    "tabs": {
                      "type": "object",
                      "properties": {
                        "home": {
                          "type": "boolean",
                          "description": "The home tab",
                          "example": true
                        },
                        "messenger": {
                          "type": "boolean",
                          "description": "The messenger (chat) tab",
                          "example": true
                        },
                        "feedback": {
                          "type": "boolean",
                          "description": "The feedback tab",
                          "example": true
                        },
                        "changelog": {
                          "type": "boolean",
                          "description": "The changelog tab",
                          "example": true
                        },
                        "help": {
                          "type": "boolean",
                          "description": "The help center tab",
                          "example": false
                        },
                        "tickets": {
                          "type": "boolean",
                          "description": "The tickets tab",
                          "example": true
                        }
                      },
                      "required": [
                        "home",
                        "messenger",
                        "feedback",
                        "changelog",
                        "help",
                        "tickets"
                      ],
                      "description": "Which widget tabs are on"
                    },
                    "portalEnabled": {
                      "type": "boolean",
                      "description": "Whether the portal is on",
                      "example": true
                    },
                    "widgetSignIn": {
                      "type": "boolean",
                      "description": "Whether the widget may open the portal already signed in. False while the portal is off.",
                      "example": false
                    },
                    "userAttributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "The attribute key to use as an identify claim",
                            "example": "plan_tier"
                          },
                          "label": {
                            "type": "string",
                            "description": "The attribute's display label",
                            "example": "Plan tier"
                          },
                          "type": {
                            "type": "string",
                            "description": "The attribute's value type: string, number, boolean, date or currency",
                            "example": "string"
                          }
                        },
                        "required": [
                          "key",
                          "label",
                          "type"
                        ]
                      },
                      "description": "The defined user attributes, by key, at most 50; identify claims with these keys are stored"
                    },
                    "manualSegments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string",
                            "description": "The segment slug to send in the segments claim",
                            "example": "beta-testers"
                          },
                          "name": {
                            "type": "string",
                            "description": "The segment name",
                            "example": "Beta testers"
                          }
                        },
                        "required": [
                          "slug",
                          "name"
                        ]
                      },
                      "description": "Manual segments that identify can assign, by slug, at most 50"
                    }
                  },
                  "required": [
                    "signingSecret",
                    "tabs",
                    "portalEnabled",
                    "widgetSignIn",
                    "userAttributes",
                    "manualSegments"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The code is unknown, expired or already redeemed twice, or no widget secret exists; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/identify": {
      "post": {
        "operationId": "identifyQuillsWidgetVisitor",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Identify a widget visitor with a signed token",
        "description": "Creates or updates the customer that the host app's signed ssoToken names and returns a 7-day widget session token to send as `Authorization: Bearer <token>`. Works without a session; an anonymous session token sent as the Bearer token and as previousToken is merged into the identified person. The token needs sub (or id), email and exp, at most one hour after iat (or after now without iat); a future iat is refused. Optional claims: name, or firstName and lastName; avatarURL (or avatar); custom attributes, top level or in a traits object, that match a user attribute definition (at most 50; others are dropped and reported in warnings); companies (the first, by its id, becomes the person's company), segments (at most 50 manual segment slugs; it replaces the widget-sourced memberships, and a missing claim removes them). Identify also subscribes the person to the changelog when the workspace auto-subscribes. A profile that a portal sign-in linked to an account resolves only by its sub and email together, and the token never changes its name, email or avatar. canPortalHandoff is true while the portal is on and the widget can take the visitor there: portalSignIn says it signs them in at once (POST /widget/portal-sign-in, when a teammate turned widget sign-in on); otherwise POST /widget/portal-link mails a sign-in link, when the instance can mail one (mail delivery on, login form on, no captcha). Records a `user.identified` event, and a `user.lead_merged` event when an anonymous session was merged. Limited to 60 attempts per client IP and workspace per 15 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ssoToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8192,
                    "description": "An HS256 JWT that the host app's backend signed with the widget secret",
                    "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjdXN0LTQyIiwiZW1haWwiOiJqYW5lQGV4YW1wbGUuY29tIiwiZXhwIjoxNzk2MTM4MDAwfQ.c2lnbmF0dXJl"
                  },
                  "previousToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "The widget's anonymous session token, also sent as the Bearer token. Its activity moves to the identified person and the anonymous session ends. Omit when there was no anonymous session."
                  }
                },
                "required": [
                  "ssoToken"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The widget session and the identified customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessionToken": {
                      "type": "string",
                      "description": "The widget session token for `Authorization: Bearer <token>`, valid for 7 days",
                      "example": "Xk2v9QpL0sR4tW8yZ1aB3cD5eF7gH9jK2mN4pQ6rS8u"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "The identified person's principal ID",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "mergedPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The anonymous principal whose activity moved to this person. Null when nothing was merged.",
                      "example": null
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The customer ID",
                          "example": "user_01m8rxfrbhfzr9r84qkepvgcsq"
                        },
                        "name": {
                          "type": "string",
                          "description": "The customer's name",
                          "example": "Jane Doe"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The customer's email. Null when none is stored.",
                          "example": "jane@example.com"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The customer's avatar URL. Null when none is set.",
                          "example": "https://cdn.example.com/avatars/jane.png"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "email",
                        "avatarUrl"
                      ],
                      "description": "The identified customer"
                    },
                    "canPortalHandoff": {
                      "type": "boolean",
                      "description": "Whether the widget can take the visitor to the portal, by instant sign-in or a mailed link",
                      "example": true
                    },
                    "portalSignIn": {
                      "type": "boolean",
                      "description": "Whether the portal opens with this visitor signed in (createQuillsWidgetPortalSignIn). False: the widget mails a sign-in link instead.",
                      "example": false
                    },
                    "votedPostIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The posts that the person voted on and that are not deleted, newest vote first, at most 500",
                      "example": [
                        "post_01m8rxfrbhfzr9r837k90wcggm"
                      ]
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "ATTRIBUTE_IGNORED",
                              "SEGMENT_IGNORED",
                              "COMPANY_IGNORED",
                              "COMPANY_DOMAIN_IGNORED"
                            ],
                            "description": "ATTRIBUTE_IGNORED: a custom attribute matched no user attribute definition, or exceeded the limit. SEGMENT_IGNORED: a segment slug was not applied. COMPANY_IGNORED: a company claim was not applied (only the first company is used). COMPANY_DOMAIN_IGNORED: the company's domain was invalid or belongs to another company.",
                            "example": "ATTRIBUTE_IGNORED"
                          },
                          "field": {
                            "type": "string",
                            "description": "The claim that was not applied, such as an attribute key, segments:<slug> or companies[1]",
                            "example": "plan_tier"
                          }
                        },
                        "required": [
                          "code",
                          "field"
                        ]
                      },
                      "description": "Claims that were received but not applied; the identify still succeeded"
                    }
                  },
                  "required": [
                    "sessionToken",
                    "principalId",
                    "mergedPrincipalId",
                    "user",
                    "canPortalHandoff",
                    "portalSignIn",
                    "votedPostIds",
                    "warnings"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The widget is off, no widget secret is set, the ssoToken is invalid or expired, or the person is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The email belongs to another customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/verify-token": {
      "post": {
        "operationId": "verifyQuillsWidgetToken",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Verify a host-signed widget identity token without creating a user",
        "description": "Checks a host app's HS256 ssoToken as identifyQuillsWidgetVisitor would, without creating a customer, principal or widget session. Validates signature, expiry, required claims (sub and email) and optional attributes, manual segments and company claims without reading or writing customer rows (does not check blocked accounts or existing email collisions). Needs no widget session. Writes nothing. Limited to 30 attempts per client IP and workspace per 15 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ssoToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8192,
                    "description": "An HS256 JWT that the host app's backend signed with the widget secret",
                    "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjdXN0LTQyIiwiZW1haWwiOiJqYW5lQGV4YW1wbGUuY29tIiwiZXhwIjoxNzk2MTM4MDAwfQ.c2lnbmF0dXJl"
                  }
                },
                "required": [
                  "ssoToken"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The verified token claims and any non-fatal warnings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true: an invalid token answers 403",
                      "example": true
                    },
                    "claims": {
                      "type": "object",
                      "properties": {
                        "sub": {
                          "type": "string",
                          "description": "The host app's user ID (sub or id claim)",
                          "example": "cust-42"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email claim",
                          "example": "jane@example.com"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The name, from name or firstName and lastName. Null when absent.",
                          "example": "Jane Doe"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The avatar URL claim. Null when absent.",
                          "example": "https://cdn.example.com/avatars/jane.png"
                        },
                        "attributes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "A user attribute key that a definition matches",
                                "example": "plan_tier"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  }
                                ],
                                "description": "The value identify would store",
                                "example": "pro"
                              }
                            },
                            "required": [
                              "key",
                              "value"
                            ]
                          },
                          "description": "The custom attributes identify would set"
                        },
                        "segments": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The manual segment slugs identify would apply",
                          "example": [
                            "beta-testers"
                          ]
                        },
                        "company": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "The company's ID in the host app (external ID)",
                              "example": "acct-981"
                            },
                            "name": {
                              "type": "string",
                              "description": "The company name",
                              "example": "Example Corp"
                            },
                            "domain": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The company domain. Null when absent or ignored (see warnings).",
                              "example": "example.com"
                            }
                          },
                          "required": [
                            "id",
                            "name",
                            "domain"
                          ],
                          "description": "The company identify would link: the first of the companies claim. Null when none applies."
                        }
                      },
                      "required": [
                        "sub",
                        "email",
                        "name",
                        "avatarUrl",
                        "attributes",
                        "segments",
                        "company"
                      ],
                      "description": "The claims as identify would apply them"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "enum": [
                              "ATTRIBUTE_IGNORED",
                              "SEGMENT_IGNORED",
                              "COMPANY_IGNORED",
                              "COMPANY_DOMAIN_IGNORED"
                            ],
                            "description": "ATTRIBUTE_IGNORED: a custom attribute matched no user attribute definition, or exceeded the limit. SEGMENT_IGNORED: a segment slug would not be applied. COMPANY_IGNORED: a company claim would not be applied (only the first company is used). COMPANY_DOMAIN_IGNORED: the company's domain is invalid or belongs to another company.",
                            "example": "SEGMENT_IGNORED"
                          },
                          "field": {
                            "type": "string",
                            "description": "The claim that would not be applied, such as an attribute key, segments:<slug> or companies[1]",
                            "example": "segments:vip"
                          }
                        },
                        "required": [
                          "code",
                          "field"
                        ]
                      },
                      "description": "Claims that identify would receive but not apply; the token is still valid"
                    }
                  },
                  "required": [
                    "valid",
                    "claims",
                    "warnings"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The widget is off, no widget secret is set, or the ssoToken is invalid or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/portal-sign-in": {
      "post": {
        "operationId": "createQuillsWidgetPortalSignIn",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get a link that opens the portal signed in",
        "description": "Returns a one-time link that opens the portal with the visitor signed in, for a visitor that the host app identified, when widget sign-in is on. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. The link leads to startQuillsPortalTokenSignIn. The link works once, for two minutes, and only in the browser whose sign-in page sent `state`: the tab that the widget opened at the account sign-in start. `next` is a portal path such as /boards/b1; an empty or other value opens the portal home. Records no event. Limited to 20 attempts per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "next": {
                    "type": "string",
                    "maxLength": 300,
                    "description": "The portal path to open after sign-in. Empty or unsafe: the portal home.",
                    "example": "/my-feedback"
                  },
                  "state": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "The 64-character hex browser state from the account sign-in start page in the tab that the widget opened",
                    "example": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
                  }
                },
                "required": [
                  "next",
                  "state"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The one-time sign-in link",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "The signed one-time link to open in that tab. Valid for two minutes."
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Widget sign-in is off, or the visitor was not identified by the host app or has no email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/contact-email": {
      "get": {
        "operationId": "getQuillsEmailChangeState",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get the anonymous visitor's contact address and change state",
        "description": "Returns the anonymous visitor's contact address and any pending change. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. Only an anonymous visitor may call it; an identified visitor's address comes from the host app's signed token.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The contact address and a pending change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "currentEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The visitor's contact address. Null when none is set or the stored one is not a real address.",
                      "example": "jane@example.com"
                    },
                    "requiresCurrentCode": {
                      "type": "boolean",
                      "description": "Whether a change first needs a code mailed to the current address (sendQuillsCurrentAddressCode)",
                      "example": true
                    },
                    "pendingEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The new address that a change code was mailed to and that is not yet confirmed. Null when no change is pending.",
                      "example": "jane.doe@example.com"
                    }
                  },
                  "required": [
                    "currentEmail",
                    "requiresCurrentCode",
                    "pendingEmail"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller is not an anonymous widget visitor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "requestQuillsEmailChange",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Request a contact address change",
        "description": "Mails a 6-digit code to a new contact address after this request commits. With an address set, `currentCode` (from the current-code step) must be right first; it works once, and a wrong one counts as a try. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. Only an anonymous visitor may call it; an identified visitor's address comes from the host app's signed token. The code expires after 15 minutes and allows 5 tries; a new request replaces the pending one. Records a `user.contact_email_code_requested` event when a code is requested. At most 5 code mails per visitor per hour (429), and 10 attempts per client IP and workspace per 15 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320,
                    "description": "The new contact address; trimmed and stored lowercase",
                    "example": "jane.doe@example.com"
                  },
                  "currentCode": {
                    "type": "string",
                    "maxLength": 16,
                    "description": "The code mailed to the current address. Required when an address is set.",
                    "example": "042917"
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Whether the code was requested",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "Whether a code was requested and will be mailed",
                      "example": true
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "current_code_required",
                        "invalid_code",
                        "same_email",
                        null
                      ],
                      "description": "Why nothing changed. current_code_required: an address is set and currentCode is missing. invalid_code: currentCode is wrong or expired. same_email: the address is already set. Null when ok is true.",
                      "example": null
                    },
                    "principalId": {
                      "type": "string",
                      "description": "The anonymous visitor's principal ID",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    }
                  },
                  "required": [
                    "ok",
                    "reason",
                    "principalId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The email is malformed or an address the system does not send to",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller is not an anonymous widget visitor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/contact-email/current-code": {
      "post": {
        "operationId": "sendQuillsCurrentAddressCode",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Mail a code to the current contact address",
        "description": "Mails a 6-digit code to the current contact address: the first step of a change when an address is set, proving the visitor holds it. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. Only an anonymous visitor may call it; an identified visitor's address comes from the host app's signed token. The code expires after 15 minutes, allows 5 tries and works once; a new request replaces the pending one. The mail is sent by a background job after commit. Records a `user.contact_email_code_requested` event. At most 5 code mails per visitor per hour (429), and 10 attempts per client IP and workspace per 15 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The request was stored",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "Whether a code was requested and will be mailed",
                      "example": true
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "current_code_required",
                        "invalid_code",
                        "same_email",
                        null
                      ],
                      "description": "Why nothing changed. current_code_required: an address is set and currentCode is missing. invalid_code: currentCode is wrong or expired. same_email: the address is already set. Null when ok is true.",
                      "example": null
                    },
                    "principalId": {
                      "type": "string",
                      "description": "The anonymous visitor's principal ID",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    }
                  },
                  "required": [
                    "ok",
                    "reason",
                    "principalId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller is not an anonymous widget visitor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The visitor has no contact address to verify",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/contact-email/confirm": {
      "post": {
        "operationId": "confirmQuillsEmailChange",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Confirm a contact address change with its code",
        "description": "Sets the contact address when the code mailed to it is right. A wrong code counts as a try; after 5, or 15 minutes, request a new code. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. Only an anonymous visitor may call it; an identified visitor's address comes from the host app's signed token. Records a `user.updated` event when the address changed. Limited to 20 attempts per client IP and workspace per 15 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320,
                    "description": "The new address that the code was mailed to",
                    "example": "jane.doe@example.com"
                  },
                  "code": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 16,
                    "description": "The 6-digit code from the mail",
                    "example": "042917"
                  }
                },
                "required": [
                  "email",
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Whether the address changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "description": "Whether the address changed. False for a wrong, expired or spent code.",
                      "example": true
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The new contact address. Null when ok is false.",
                      "example": "jane.doe@example.com"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "The anonymous visitor's principal ID",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    }
                  },
                  "required": [
                    "ok",
                    "email",
                    "principalId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller is not an anonymous widget visitor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/session": {
      "get": {
        "operationId": "getQuillsWidgetSession",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Validate the widget session",
        "description": "Checks the widget session and returns its visitor. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. A missing, expired or revoked session answers 401. user is null for an anonymous visitor. The session expires 7 days after identify, and rotating the widget secret ends it. canPortalHandoff is true for an identified visitor while the portal is on and the instance can mail a sign-in link (mail delivery on, login form on, no captcha).",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The session's visitor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The customer ID",
                          "example": "user_01m8rxfrbhfzr9r84qkepvgcsq"
                        },
                        "name": {
                          "type": "string",
                          "description": "The customer's name",
                          "example": "Jane Doe"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The customer's email. Null when none is known.",
                          "example": "jane@example.com"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The customer's avatar URL. Null when none is set.",
                          "example": "https://cdn.example.com/avatars/jane.png"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "email",
                        "avatarUrl"
                      ],
                      "description": "The identified customer. Null for an anonymous visitor."
                    },
                    "canPortalHandoff": {
                      "type": "boolean",
                      "description": "Whether the widget can take this identified visitor to the portal with a mailed sign-in link",
                      "example": true
                    }
                  },
                  "required": [
                    "user",
                    "canPortalHandoff"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "revokeQuillsWidgetSession",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Revoke the caller's current widget bearer session",
        "description": "Deletes only the caller's own active bearer session from server storage so subsequent requests with that token fail with 401.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's widget session was revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revoked": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "revoked"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/device": {
      "post": {
        "operationId": "linkQuillsWidgetDevice",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Link the visitor's device to the widget session",
        "description": "Links a device ID to the session's visitor for visitor analytics. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. device is the untrusted device ID from host-page storage, scoped to this workspace; a device already linked to another visitor moves to this one. Earlier unclaimed page views of the device move to the session's visitor. Idempotent. Records no event.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "device": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "The device ID that the widget keeps in host-page storage. Chosen by the client, not a reference to an existing record.",
                    "example": "d3f1c2a4-5b6e-4f70-8a9b-0c1d2e3f4a5b"
                  }
                },
                "required": [
                  "device"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The device is linked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "linked": {
                      "type": "boolean",
                      "description": "Always true on success",
                      "example": true
                    }
                  },
                  "required": [
                    "linked"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/presence": {
      "put": {
        "operationId": "heartbeatQuillsWidgetPresence",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Record active widget visitor presence and read team online status",
        "description": "Records that the visitor is viewing the widget and returns whether the support team is online. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. Each call refreshes the visitor's heartbeat for streamKey, so chat-to-email continuation waits while the visitor is actively viewing the widget. Records no event. Limited to 120 requests per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "streamKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "A client-chosen key for the widget view sending the heartbeat, such as one per open tab",
                    "example": "tab-7f3a9c"
                  }
                },
                "required": [
                  "streamKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presence updated and team availability status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true on success",
                      "example": true
                    },
                    "teamOnline": {
                      "type": "boolean",
                      "description": "Whether a teammate has a live inbox heartbeat and has not set themselves away",
                      "example": true
                    }
                  },
                  "required": [
                    "ok",
                    "teamOnline"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getQuillsWidgetPresence",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get the team's messenger availability",
        "description": "Returns whether the support team is available in the messenger. Needs no credential and returns no ID or email. agentsOnline is true while a teammate who is not set to away has the inbox open (sendQuillsAgentHeartbeat). withinOfficeHours follows the workspace office hours. Answers 404 while the widget is off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The team's availability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agentsOnline": {
                      "type": "boolean",
                      "description": "Whether at least one teammate is online: one who sent an inbox heartbeat in the last 90 seconds and hasn't set their chat availability to away.",
                      "example": true
                    },
                    "withinOfficeHours": {
                      "type": "boolean",
                      "description": "Whether the workspace's office hours are open now. True when office hours are off, unset or invalid.",
                      "example": false
                    },
                    "nextOpenAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Time the office hours next open, as an ISO 8601 UTC string, looked up to 14 days ahead. Null while they're open, when they're off, or when no opening falls in the next 14 days.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "estimatedWaitMinutes": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Median time to a first reply, in whole minutes (at least 1), over conversations created in the last 30 days, leaving out test and spam conversations. Null when fewer than 3 such conversations had a reply.",
                      "example": 12
                    },
                    "estimatedWaitRange": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "minMinutes": {
                          "type": "number",
                          "description": "25th percentile of the first-reply time, in whole minutes. At least 1.",
                          "example": 6
                        },
                        "maxMinutes": {
                          "type": "number",
                          "description": "75th percentile of the first-reply time, in whole minutes. Never below `medianMinutes`.",
                          "example": 18
                        },
                        "medianMinutes": {
                          "type": "number",
                          "description": "Median first-reply time, in whole minutes. Never below `minMinutes`.",
                          "example": 12
                        },
                        "label": {
                          "type": "string",
                          "description": "Readable form of the range, such as `under 10 minutes`, `5–20 minutes`, `about 2 hours` or `about 1 business day`.",
                          "example": "5–20 minutes"
                        }
                      },
                      "required": [
                        "minMinutes",
                        "maxMinutes",
                        "medianMinutes",
                        "label"
                      ],
                      "description": "Typical wait for a first reply, from the same 30-day sample as `estimatedWaitMinutes`. Null when there are too few replies to estimate."
                    }
                  },
                  "required": [
                    "agentsOnline",
                    "withinOfficeHours"
                  ],
                  "description": "The support team's availability and an estimate of the wait for a first reply."
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/resume": {
      "post": {
        "operationId": "resumeQuillsWidgetConversation",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Resume a widget conversation from a signed email continuation link",
        "description": "Exchanges a signed 7-day resume token from a chat-to-email continuation message for a fresh 7-day widget session token and the conversation to open. Needs no credential: the resume token is the credential. A conversation that was merged resolves to the conversation it was merged into. Refused when the widget, its messenger tab or its secret is off, when the visitor is blocked, merged or a teammate, or when the anti-spam check blocks the client IP or visitor. Records no event. Limited to 30 attempts per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resumeToken": {
                    "type": "string",
                    "minLength": 10,
                    "maxLength": 2048,
                    "description": "The signed resume token from the continuation email link. Valid for 7 days."
                  }
                },
                "required": [
                  "resumeToken"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Fresh widget session token and target conversation ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessionToken": {
                      "type": "string",
                      "description": "A new widget session token for `Authorization: Bearer <token>`, valid for 7 days",
                      "example": "Xk2v9QpL0sR4tW8yZ1aB3cD5eF7gH9jK2mN4pQ6rS8u"
                    },
                    "conversationId": {
                      "type": "string",
                      "description": "The messenger conversation to open",
                      "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                    }
                  },
                  "required": [
                    "sessionToken",
                    "conversationId"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The resume token is invalid or expired, the conversation was marked spam or merged elsewhere, or the visitor is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The widget, its messenger tab or its secret is off, or the token's conversation is not a messenger conversation of the visitor; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/activity": {
      "get": {
        "operationId": "listQuillsWidgetActivity",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List the visitor's activity on requests they follow",
        "description": "Lists replies and status changes on requests that the identified visitor follows, newest first, at most 50; there is no pagination. Only requests the visitor can still see are listed, and archived items are left out. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. Empty for a visitor without a profile.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "boardIds",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The visitor's activity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The activity item ID (an in-app notification)",
                            "example": "notification_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "postId": {
                            "type": "string",
                            "description": "The request (post) the activity is about",
                            "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "title": {
                            "type": "string",
                            "description": "The post's current title",
                            "example": "Export boards to CSV"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "reply",
                              "status",
                              "shipped"
                            ],
                            "description": "reply: a new comment. status: a status change. shipped: a status change whose post now has a complete status.",
                            "example": "status"
                          },
                          "summary": {
                            "type": "string",
                            "description": "The notification text, or its title when it has no body",
                            "example": "Status changed to Planned"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the activity happened",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "unread": {
                            "type": "boolean",
                            "description": "Whether the visitor has not read the item yet",
                            "example": true
                          }
                        },
                        "required": [
                          "id",
                          "postId",
                          "title",
                          "kind",
                          "summary",
                          "createdAt",
                          "unread"
                        ]
                      },
                      "description": "Activity items, newest first"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of unread, unarchived items on requests the visitor can still see",
                      "example": 3
                    }
                  },
                  "required": [
                    "items",
                    "unreadCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/activity/{activityId}/read": {
      "put": {
        "operationId": "markQuillsWidgetActivityRead",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Mark one activity item read",
        "description": "Marks one of the visitor's activity items read. Idempotent. Only the visitor's own item on a request they can still see. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. Records no event. Limited to 300 requests per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The activity item ID",
              "example": "notification_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The activity item ID",
            "name": "activityId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "boardIds",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The item and the visitor's unread count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "item": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The activity item ID (an in-app notification)",
                          "example": "notification_01m8rxfrbhfzr9r837k90wcggm"
                        },
                        "postId": {
                          "type": "string",
                          "description": "The request (post) the activity is about",
                          "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                        },
                        "title": {
                          "type": "string",
                          "description": "The post's current title",
                          "example": "Export boards to CSV"
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "reply",
                            "status",
                            "shipped"
                          ],
                          "description": "reply: a new comment. status: a status change. shipped: a status change whose post now has a complete status.",
                          "example": "status"
                        },
                        "summary": {
                          "type": "string",
                          "description": "The notification text, or its title when it has no body",
                          "example": "Status changed to Planned"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the activity happened",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "unread": {
                          "type": "boolean",
                          "description": "Whether the visitor has not read the item yet",
                          "example": true
                        }
                      },
                      "required": [
                        "id",
                        "postId",
                        "title",
                        "kind",
                        "summary",
                        "createdAt",
                        "unread"
                      ],
                      "description": "The item, now read"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of unread, unarchived items on requests the visitor can still see",
                      "example": 3
                    }
                  },
                  "required": [
                    "item",
                    "unreadCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such item of the visitor's on a request the visitor can see; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/my-requests": {
      "get": {
        "operationId": "listQuillsWidgetMyRequests",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List the visitor's own feedback posts, support tickets, and shipped release updates",
        "description": "Returns the visitor's request timeline: visible feedback posts they authored or voted on, support tickets they requested, and the release notifications sent to them. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. items mixes posts and tickets, sorted by last update, newest first, at most 50 (it considers the visitor's newest 50 posts, 50 tickets and first 100 votes). releases holds the 20 newest notifications. There is no pagination.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "boardIds",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The visitor's unified request timeline",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The post or ticket ID, depending on kind",
                            "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "post",
                              "ticket"
                            ],
                            "description": "post: a feedback post. ticket: a support ticket.",
                            "example": "post"
                          },
                          "title": {
                            "type": "string",
                            "description": "The post or ticket title",
                            "example": "Export boards to CSV"
                          },
                          "stage": {
                            "type": "string",
                            "enum": [
                              "open",
                              "planned",
                              "in_progress",
                              "shipped",
                              "closed"
                            ],
                            "description": "Progress in public terms. A post: open, planned, in_progress or shipped from its status, closed for a closed status. A ticket: open until its status is closed, then shipped when a release notification to the visitor names it, else closed.",
                            "example": "planned"
                          },
                          "statusLabel": {
                            "type": "string",
                            "description": "The status name, or Open when the item has no status",
                            "example": "Planned"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "authored",
                              "voted",
                              "requested"
                            ],
                            "description": "authored: the visitor created the post. voted: the visitor voted for it. requested: the visitor is the ticket's requester.",
                            "example": "voted"
                          },
                          "releaseVersion": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The version of the newest release notification to the visitor that names this item. Null when none does.",
                            "example": "2.4.0"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post or ticket was last updated",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "title",
                          "stage",
                          "statusLabel",
                          "role",
                          "releaseVersion",
                          "updatedAt"
                        ]
                      },
                      "description": "Posts and tickets, newest update first"
                    },
                    "releases": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The release notification ID",
                            "example": "release_notification_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "releaseId": {
                            "type": "string",
                            "description": "The verified release ID",
                            "example": "verified_release_01m8rxfrbhfzr9r83a29m5ke14"
                          },
                          "version": {
                            "type": "string",
                            "description": "The release version",
                            "example": "2.4.0"
                          },
                          "subject": {
                            "type": "string",
                            "description": "The notification subject",
                            "example": "Your request shipped in 2.4.0"
                          },
                          "body": {
                            "type": "string",
                            "description": "The notification text sent to the visitor",
                            "example": "Board export to CSV is now available."
                          },
                          "quotedText": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The visitor's original request quoted in the notification. Null when none was quoted.",
                            "example": "Please let us export boards to CSV."
                          },
                          "sentAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the notification was sent",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "releaseId",
                          "version",
                          "subject",
                          "body",
                          "quotedText",
                          "sentAt"
                        ]
                      },
                      "description": "Release notifications sent to the visitor, newest first"
                    }
                  },
                  "required": [
                    "items",
                    "releases"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/portal-link": {
      "post": {
        "operationId": "sendQuillsWidgetPortalLink",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Mail the identified visitor a sign-in link to the portal",
        "description": "Sends the instance's sign-in link to the email of the visitor that the host app identified. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. The link works once, expires after 5 minutes and opens the portal's My feedback page signed in. For the next 15 minutes, the portal asks a signed-in account with that verified address to confirm linking this widget profile (GET, POST and DELETE /portal/widget-link). A used or expired link opens the sign-in page with the error. With registration closed, only an address that has an account gets the mail, and delivery is if_account. 403 for an anonymous visitor, or when the instance cannot mail a sign-in link (no mail delivery, login form off, captcha on); 404 while the portal is closed. Records no event. Limited to 10 attempts per client IP and workspace per 15 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The sign-in link was handed to the instance's mail delivery",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sent": {
                      "type": "boolean",
                      "description": "Always true: the link was handed to mail delivery",
                      "example": true
                    },
                    "delivery": {
                      "type": "string",
                      "enum": [
                        "sent",
                        "if_account"
                      ],
                      "description": "sent: the instance mails any address. if_account: registration is closed, so it mails only an address that has an account; the API never says which, so the visitor is told so.",
                      "example": "sent"
                    }
                  },
                  "required": [
                    "sent",
                    "delivery"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The visitor is anonymous or has no email from identify, the person is blocked, or the instance cannot send a sign-in link",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/boards": {
      "get": {
        "operationId": "listQuillsPortalBoards",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the boards that the caller may see, with its capabilities",
        "description": "Lists the live feedback boards whose view tier and segments admit the caller, sorted by name. Boards linked to a project are never listed. With counts=true, postCount counts the posts that the caller may see; otherwise it is null. canSubmit, canVote and canComment apply the board's tiers and, for a visitor without sign-in, the workspace's anonymous switch. Works without sign-in; a session cookie signs the caller in. 404 while the portal is off; 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "true: count each board's visible posts into postCount, which scans every visible post. false: postCount is null.",
              "example": "true"
            },
            "required": false,
            "description": "true: count each board's visible posts into postCount, which scans every visible post. false: postCount is null.",
            "name": "counts",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Boards that the caller may see, by name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Board ID",
                            "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                          },
                          "name": {
                            "type": "string",
                            "description": "Board name",
                            "example": "Feature requests"
                          },
                          "slug": {
                            "type": "string",
                            "description": "URL slug of the board, unique in the workspace",
                            "example": "feature-requests"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Board description shown to customers. Null: none.",
                            "example": "Ideas for new features"
                          },
                          "postCount": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Number of posts on the board that the caller may see, merged posts excluded. Null unless counts=true.",
                            "example": 42
                          },
                          "canSubmit": {
                            "type": "boolean",
                            "description": "Whether the caller may submit a post to this board"
                          },
                          "canVote": {
                            "type": "boolean",
                            "description": "Whether the caller may vote on this board's posts"
                          },
                          "canComment": {
                            "type": "boolean",
                            "description": "Whether the caller may comment on this board's posts; a locked post or an author-only board can still refuse"
                          },
                          "voteDisplay": {
                            "type": "string",
                            "enum": [
                              "count",
                              "hidden"
                            ],
                            "description": "How vote counts show to customers. count: posts carry voteCount. hidden: the board's posts come without voteCount."
                          },
                          "defaultSort": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "votes",
                              "newest",
                              "random",
                              null
                            ],
                            "description": "The board's post order when the caller names none. Null: no board default."
                          },
                          "fields": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Field key that the post's values are stored under",
                                  "example": "plan_tier"
                                },
                                "label": {
                                  "type": "string",
                                  "description": "Field name shown to people",
                                  "example": "Plan tier"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text",
                                    "number",
                                    "select",
                                    "multi_select",
                                    "checkbox",
                                    "date"
                                  ],
                                  "description": "Value type. `text`: free text. `number`: a number. `select`: one of `options`. `multi_select`: a list of `options`. `checkbox`: a boolean. `date`: a YYYY-MM-DD date."
                                },
                                "required": {
                                  "type": "boolean",
                                  "description": "Whether a new post must have a value; a required checkbox must be checked"
                                },
                                "options": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "Choices of a `select` or `multi_select` field; absent for other types",
                                  "example": [
                                    "Free",
                                    "Pro",
                                    "Enterprise"
                                  ]
                                }
                              },
                              "required": [
                                "key",
                                "label",
                                "type",
                                "required"
                              ]
                            },
                            "description": "The public custom fields that a new post on this board fills in. Internal fields are never listed."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "description",
                          "postCount",
                          "canSubmit",
                          "canVote",
                          "canComment",
                          "voteDisplay",
                          "defaultSort",
                          "fields"
                        ]
                      },
                      "description": "The boards that the caller may see, by name"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/statuses": {
      "get": {
        "operationId": "listQuillsPortalStatuses",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the post statuses",
        "description": "Lists the workspace's live post statuses: active first, then complete, then closed, each group by position. stage is the public vocabulary that the widget uses. Works without sign-in; a session cookie signs the caller in. 404 while the portal is off; 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Statuses by category, then position",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post status ID",
                            "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
                          },
                          "name": {
                            "type": "string",
                            "description": "Status name",
                            "example": "In progress"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Status slug, unique in the workspace",
                            "example": "in_progress"
                          },
                          "color": {
                            "type": "string",
                            "description": "Status color as a hex code",
                            "example": "#3b82f6"
                          },
                          "category": {
                            "type": "string",
                            "description": "Status group: active (open work), complete (shipped) or closed (declined, for example)",
                            "example": "active"
                          },
                          "showOnRoadmap": {
                            "type": "boolean",
                            "description": "Whether posts in this status show on the public roadmap"
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "open",
                              "planned",
                              "in_progress",
                              "shipped",
                              null
                            ],
                            "description": "Public stage of the status: shipped for a complete status, planned or in_progress for those slugs, open for other active statuses. Null for a closed status.",
                            "example": "in_progress"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "color",
                          "category",
                          "showOnRoadmap",
                          "stage"
                        ]
                      },
                      "description": "The post statuses that are not deleted, ordered by category (active, complete, closed), then position"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/tags": {
      "get": {
        "operationId": "listQuillsPortalTags",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the public post tags",
        "description": "Lists the workspace's live public post tags, sorted by name. Internal tags (not public) are left out. Works without sign-in; a session cookie signs the caller in. 404 while the portal is off; 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Public tags by name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post tag ID",
                            "example": "post_tag_01m8rxmftrfzvv1w9sa0v3a098"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Mobile"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "The public tags, by name"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/posts": {
      "get": {
        "operationId": "listQuillsPortalPosts",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the feedback posts that the caller may see",
        "description": "Lists one page of posts on the boards that the caller may see. Merged, deleted, hidden, test-customer and other people's held posts are left out; the caller's own held posts are marked pending. stage maps statuses to open, planned, in_progress and shipped; a closed status has no stage. Cursor pagination: pass nextCursor as cursor with the same filters and sort. Works without sign-in; a session cookie signs the caller in. 404 while the portal is off; 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts on this board. Absent: every board that the caller may see.",
              "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
            },
            "required": false,
            "description": "Only posts on this board. Absent: every board that the caller may see.",
            "name": "boardId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "boardIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "planned",
                "in_progress",
                "shipped"
              ],
              "description": "Only posts in this public stage",
              "example": "planned"
            },
            "required": false,
            "description": "Only posts in this public stage",
            "name": "stage",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Search text matched against titles and bodies: web search syntax (quoted phrases, OR, -word to exclude), word prefixes and close spellings of title words",
              "example": "dark mode"
            },
            "required": false,
            "description": "Search text matched against titles and bodies: web search syntax (quoted phrases, OR, -word to exclude), word prefixes and close spellings of title words",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest",
                "votes",
                "random"
              ],
              "description": "Post order. newest and oldest: by creation time. votes: most votes first. Without sort: the default sort of the board that boardId names, else newest. random is the same order for one caller for one UTC day.",
              "example": "votes"
            },
            "required": false,
            "description": "Post order. newest and oldest: by creation time. votes: most votes first. Without sort: the default sort of the board that boardId names, else newest. random is the same order for one caller for one UTC day.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "nextCursor from the previous page. Must be a post the caller can see (404 otherwise).",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": false,
            "description": "nextCursor from the previous page. Must be a post the caller can see (404 otherwise).",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of posts to return",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of posts to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Dark mode for the dashboard"
                          },
                          "content": {
                            "type": "string",
                            "description": "Post body text; can be empty",
                            "example": "The dashboard is hard to read at night."
                          },
                          "board": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Board ID",
                                "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                              },
                              "name": {
                                "type": "string",
                                "description": "Board name",
                                "example": "Feature requests"
                              },
                              "slug": {
                                "type": "string",
                                "description": "Board slug",
                                "example": "feature-requests"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug"
                            ],
                            "description": "The board that holds the post"
                          },
                          "status": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Post status ID",
                                "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
                              },
                              "name": {
                                "type": "string",
                                "description": "Status name",
                                "example": "Planned"
                              },
                              "color": {
                                "type": "string",
                                "description": "Status color as a hex code",
                                "example": "#a855f7"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ],
                            "description": "The post's current status. Null: no status."
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "open",
                              "planned",
                              "in_progress",
                              "shipped",
                              null
                            ],
                            "description": "Public stage of the post's status: open (no status or another active status), planned, in_progress or shipped (a complete status). Null for a closed status.",
                            "example": "planned"
                          },
                          "author": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's display name. Null for an anonymous author.",
                                "example": "Jane Cooper"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's avatar URL (http or https). Null for an anonymous author or when none is set.",
                                "example": "https://example.com/avatars/jane.png"
                              },
                              "isTeamMember": {
                                "type": "boolean",
                                "description": "Whether the author is a teammate of the workspace"
                              }
                            },
                            "required": [
                              "name",
                              "avatarUrl",
                              "isTeamMember"
                            ],
                            "description": "The post's author as customers see them"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                            "example": 17
                          },
                          "commentCount": {
                            "type": "number",
                            "description": "Comment count stored on the post",
                            "example": 4
                          },
                          "pending": {
                            "type": "boolean",
                            "description": "Whether this is the caller's own post that waits for moderation review"
                          },
                          "isAuthor": {
                            "type": "boolean",
                            "description": "Whether the caller wrote the post"
                          },
                          "voted": {
                            "type": "boolean",
                            "description": "Whether the caller voted on the post; a vote on a post merged into it counts"
                          },
                          "following": {
                            "type": "boolean",
                            "description": "Whether the caller follows the post's status changes"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Post tag ID",
                                  "example": "post_tag_01m8rxmftrfzvv1w9sa0v3a098"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Tag name",
                                  "example": "Mobile"
                                },
                                "color": {
                                  "type": "string",
                                  "description": "Tag color as a hex code",
                                  "example": "#6b7280"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "color"
                              ]
                            },
                            "description": "The post's public tags, by name"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was created",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "content",
                          "board",
                          "status",
                          "stage",
                          "author",
                          "commentCount",
                          "pending",
                          "isAuthor",
                          "voted",
                          "following",
                          "tags",
                          "createdAt"
                        ]
                      },
                      "description": "Posts in the requested order"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page: the ID of the last post on this page. Null on the last page.",
                      "example": "post_01m8rxmftrfzvv1w90xc0akc8b"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether another page follows this one"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board's tiers do not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or board does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createQuillsPortalPost",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Submit a feedback post",
        "description": "Creates a post as the caller. Without boardId, the first board (by name) that accepts the caller's submissions. Without title, the first line of content; with AI configured and neither title nor boardId sent, a job then writes a short title and may move the post to a board with the same access rules. customFields must hold a value for each required public field of the board (see the board list); 400 for a missing, unknown or wrongly typed value. The author's vote and subscription are added. A held post waits for review and is visible only to its author. idempotencyKey returns the first post for a repeated request; another payload under the same key is 409. Records a post.created event. Limited to 20 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardId": {
                    "type": "string",
                    "description": "Board to post on. Absent: the first board, by name, that accepts the caller's submissions.",
                    "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Post title. Absent: the first line of content, cut to 200 characters.",
                    "example": "Dark mode for the dashboard"
                  },
                  "content": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "Post body text; may be empty when title is set",
                    "example": "The dashboard is hard to read at night."
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "description": "IDs of files that the caller uploaded through the portal or widget and that are not attached elsewhere. The list replaces the item's attachments: an empty list removes them all, and absence leaves them unchanged. An ID that is not such a file is 404.",
                    "example": [
                      "file_01m8rxmftrfzvv1wa12f7gb5q5"
                    ]
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Client-chosen key that makes a retry safe for 24 hours: the same key and payload return the first post with replayed true; the same key with another payload is 409",
                    "example": "8f14e45f-ceea-467f-a8f4-6c2f9a0b1d3e"
                  },
                  "customFields": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "maxItems": 50
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Values of the board's custom fields, keyed by field key: a string for text, select and date (YYYY-MM-DD), a number, a boolean for a checkbox, and a list of options for multi-select."
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Dark mode for the dashboard"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text; can be empty",
                      "example": "The dashboard is hard to read at night."
                    },
                    "board": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Board ID",
                          "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                        },
                        "name": {
                          "type": "string",
                          "description": "Board name",
                          "example": "Feature requests"
                        },
                        "slug": {
                          "type": "string",
                          "description": "Board slug",
                          "example": "feature-requests"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug"
                      ],
                      "description": "The board that holds the post"
                    },
                    "status": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Post status ID",
                          "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
                        },
                        "name": {
                          "type": "string",
                          "description": "Status name",
                          "example": "Planned"
                        },
                        "color": {
                          "type": "string",
                          "description": "Status color as a hex code",
                          "example": "#a855f7"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "color"
                      ],
                      "description": "The post's current status. Null: no status."
                    },
                    "stage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "open",
                        "planned",
                        "in_progress",
                        "shipped",
                        null
                      ],
                      "description": "Public stage of the post's status: open (no status or another active status), planned, in_progress or shipped (a complete status). Null for a closed status.",
                      "example": "planned"
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name. Null for an anonymous author.",
                          "example": "Jane Cooper"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's avatar URL (http or https). Null for an anonymous author or when none is set.",
                          "example": "https://example.com/avatars/jane.png"
                        },
                        "isTeamMember": {
                          "type": "boolean",
                          "description": "Whether the author is a teammate of the workspace"
                        }
                      },
                      "required": [
                        "name",
                        "avatarUrl",
                        "isTeamMember"
                      ],
                      "description": "The post's author as customers see them"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                      "example": 17
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Comment count stored on the post",
                      "example": 4
                    },
                    "pending": {
                      "type": "boolean",
                      "description": "Whether this is the caller's own post that waits for moderation review"
                    },
                    "isAuthor": {
                      "type": "boolean",
                      "description": "Whether the caller wrote the post"
                    },
                    "voted": {
                      "type": "boolean",
                      "description": "Whether the caller voted on the post; a vote on a post merged into it counts"
                    },
                    "following": {
                      "type": "boolean",
                      "description": "Whether the caller follows the post's status changes"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post tag ID",
                            "example": "post_tag_01m8rxmftrfzvv1w9sa0v3a098"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Mobile"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "The post's public tags, by name"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "True when an earlier request with the same idempotencyKey created the post; nothing new was written"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "board",
                    "status",
                    "stage",
                    "author",
                    "commentCount",
                    "pending",
                    "isAuthor",
                    "voted",
                    "following",
                    "tags",
                    "createdAt",
                    "replayed"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A custom field value is missing, unknown or of the wrong type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board's tiers do not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The board does not exist, the caller cannot see it or no board accepts the caller's submissions, an attachment is not the caller's unused feedback upload, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The idempotency key was already used with a different payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/posts/similar": {
      "get": {
        "operationId": "findQuillsPortalSimilarPosts",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Find visible posts with a title like the given text",
        "description": "Finds visible, unmerged posts whose title or body shares any word with the given text (English full-text match), best match first, then most votes; use it to suggest duplicates before submitting. Limited to 60 requests per minute per client IP and workspace. Works without sign-in; a session cookie signs the caller in. 404 while the portal is off; 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 200,
              "description": "Text to match, usually the title of a draft post",
              "example": "Export to CSV"
            },
            "required": true,
            "description": "Text to match, usually the title of a draft post",
            "name": "title",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "boardIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 5,
              "description": "Maximum number of matches",
              "example": 5
            },
            "required": false,
            "description": "Maximum number of matches",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Similar posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "CSV export"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                            "example": 17
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "open",
                              "planned",
                              "in_progress",
                              "shipped",
                              null
                            ],
                            "description": "Public stage of the post's status. Null for a closed status.",
                            "example": "open"
                          },
                          "board": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Board ID",
                                "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                              },
                              "slug": {
                                "type": "string",
                                "description": "Board slug",
                                "example": "feature-requests"
                              }
                            },
                            "required": [
                              "id",
                              "slug"
                            ],
                            "description": "The board that holds the post"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "stage",
                          "board"
                        ]
                      },
                      "description": "Matching posts, best match first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/posts/{postId}": {
      "get": {
        "operationId": "getQuillsPortalPost",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a feedback post with the caller's permissions on it",
        "description": "Returns a visible post with its attachments, public custom field values and the caller's permissions on it (vote, comment, edit, delete), plus the caller's vote importance. mergedInto names the post that a merged post points to when the caller can see it. Works without sign-in; a session cookie signs the caller in. 404 while the portal is off; 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Dark mode for the dashboard"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text; can be empty",
                      "example": "The dashboard is hard to read at night."
                    },
                    "board": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Board ID",
                          "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                        },
                        "name": {
                          "type": "string",
                          "description": "Board name",
                          "example": "Feature requests"
                        },
                        "slug": {
                          "type": "string",
                          "description": "Board slug",
                          "example": "feature-requests"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug"
                      ],
                      "description": "The board that holds the post"
                    },
                    "status": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Post status ID",
                          "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
                        },
                        "name": {
                          "type": "string",
                          "description": "Status name",
                          "example": "Planned"
                        },
                        "color": {
                          "type": "string",
                          "description": "Status color as a hex code",
                          "example": "#a855f7"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "color"
                      ],
                      "description": "The post's current status. Null: no status."
                    },
                    "stage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "open",
                        "planned",
                        "in_progress",
                        "shipped",
                        null
                      ],
                      "description": "Public stage of the post's status: open (no status or another active status), planned, in_progress or shipped (a complete status). Null for a closed status.",
                      "example": "planned"
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name. Null for an anonymous author.",
                          "example": "Jane Cooper"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's avatar URL (http or https). Null for an anonymous author or when none is set.",
                          "example": "https://example.com/avatars/jane.png"
                        },
                        "isTeamMember": {
                          "type": "boolean",
                          "description": "Whether the author is a teammate of the workspace"
                        }
                      },
                      "required": [
                        "name",
                        "avatarUrl",
                        "isTeamMember"
                      ],
                      "description": "The post's author as customers see them"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                      "example": 17
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Comment count stored on the post",
                      "example": 4
                    },
                    "pending": {
                      "type": "boolean",
                      "description": "Whether this is the caller's own post that waits for moderation review"
                    },
                    "isAuthor": {
                      "type": "boolean",
                      "description": "Whether the caller wrote the post"
                    },
                    "voted": {
                      "type": "boolean",
                      "description": "Whether the caller voted on the post; a vote on a post merged into it counts"
                    },
                    "following": {
                      "type": "boolean",
                      "description": "Whether the caller follows the post's status changes"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post tag ID",
                            "example": "post_tag_01m8rxmftrfzvv1w9sa0v3a098"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Mobile"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "The post's public tags, by name"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "File ID",
                            "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
                          },
                          "name": {
                            "type": "string",
                            "description": "Original file name",
                            "example": "screenshot.png"
                          },
                          "contentType": {
                            "type": "string",
                            "description": "MIME type of the file",
                            "example": "image/png"
                          },
                          "size": {
                            "type": "number",
                            "description": "File size in bytes",
                            "example": 48213
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "contentType",
                          "size"
                        ]
                      },
                      "description": "Files attached to the post, oldest first"
                    },
                    "canVote": {
                      "type": "boolean",
                      "description": "Whether the board's tiers let the caller vote on the post"
                    },
                    "canComment": {
                      "type": "boolean",
                      "description": "Whether the caller may comment now: the board allows it, comments are not locked, the post is not merged, and on an author-only board the caller wrote the post"
                    },
                    "canEdit": {
                      "type": "boolean",
                      "description": "Whether the caller may edit the post: only its author, and only before votes, comments, a merge or a team review unless the workspace allows edits after engagement"
                    },
                    "canDelete": {
                      "type": "boolean",
                      "description": "Whether the caller may delete the post: only its author, and only before votes, any comment, a merge or a team review unless the workspace allows deletes after engagement"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the team locked comments on the post"
                    },
                    "authorOnlyReplies": {
                      "type": "boolean",
                      "description": "Whether the board lets only the post's author comment among customers"
                    },
                    "mergedInto": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the post this post was merged into",
                          "example": "post_01m8rxmftrfzvv1w90xc0akc8b"
                        },
                        "title": {
                          "type": "string",
                          "description": "Title of that post",
                          "example": "Dark theme"
                        }
                      },
                      "required": [
                        "id",
                        "title"
                      ],
                      "description": "The post this post was merged into. Null when it is not merged or the caller cannot see that post."
                    },
                    "importance": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "nice",
                        "important",
                        "critical",
                        null
                      ],
                      "description": "How much the caller needs the post, when the caller voted and said so",
                      "example": "important"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          },
                          "label": {
                            "type": "string",
                            "description": "The custom field's label, as the board defines it",
                            "example": "Company size"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values",
                          "label"
                        ]
                      },
                      "description": "The post's values of the board's public custom fields, in the board's order. Internal fields are never included."
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "board",
                    "status",
                    "stage",
                    "author",
                    "commentCount",
                    "pending",
                    "isAuthor",
                    "voted",
                    "following",
                    "tags",
                    "createdAt",
                    "attachments",
                    "canVote",
                    "canComment",
                    "canEdit",
                    "canDelete",
                    "isCommentsLocked",
                    "authorOnlyReplies",
                    "mergedInto",
                    "importance",
                    "customFields"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board's tiers do not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or board does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "editQuillsPortalOwnPost",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Edit the caller's own post",
        "description": "Replaces the title and body of the caller's own post. Only the author. Without allowEditAfterEngagement, a reviewed or merged-into post or one with votes or comments from others is 403. The previous text goes to the edit history. The new text goes through moderation again: a held edit takes the post back to review. Records a post.updated event. Limited to 30 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "New post title",
                    "example": "Dark mode for the dashboard"
                  },
                  "content": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "New post body text",
                    "example": "The dashboard is hard to read at night."
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "description": "IDs of files that the caller uploaded through the portal or widget and that are not attached elsewhere. The list replaces the item's attachments: an empty list removes them all, and absence leaves them unchanged. An ID that is not such a file is 404.",
                    "example": [
                      "file_01m8rxmftrfzvv1wa12f7gb5q5"
                    ]
                  }
                },
                "required": [
                  "title",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The edited post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Dark mode for the dashboard"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text; can be empty",
                      "example": "The dashboard is hard to read at night."
                    },
                    "board": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Board ID",
                          "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                        },
                        "name": {
                          "type": "string",
                          "description": "Board name",
                          "example": "Feature requests"
                        },
                        "slug": {
                          "type": "string",
                          "description": "Board slug",
                          "example": "feature-requests"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug"
                      ],
                      "description": "The board that holds the post"
                    },
                    "status": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Post status ID",
                          "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
                        },
                        "name": {
                          "type": "string",
                          "description": "Status name",
                          "example": "Planned"
                        },
                        "color": {
                          "type": "string",
                          "description": "Status color as a hex code",
                          "example": "#a855f7"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "color"
                      ],
                      "description": "The post's current status. Null: no status."
                    },
                    "stage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "open",
                        "planned",
                        "in_progress",
                        "shipped",
                        null
                      ],
                      "description": "Public stage of the post's status: open (no status or another active status), planned, in_progress or shipped (a complete status). Null for a closed status.",
                      "example": "planned"
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name. Null for an anonymous author.",
                          "example": "Jane Cooper"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's avatar URL (http or https). Null for an anonymous author or when none is set.",
                          "example": "https://example.com/avatars/jane.png"
                        },
                        "isTeamMember": {
                          "type": "boolean",
                          "description": "Whether the author is a teammate of the workspace"
                        }
                      },
                      "required": [
                        "name",
                        "avatarUrl",
                        "isTeamMember"
                      ],
                      "description": "The post's author as customers see them"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                      "example": 17
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Comment count stored on the post",
                      "example": 4
                    },
                    "pending": {
                      "type": "boolean",
                      "description": "Whether this is the caller's own post that waits for moderation review"
                    },
                    "isAuthor": {
                      "type": "boolean",
                      "description": "Whether the caller wrote the post"
                    },
                    "voted": {
                      "type": "boolean",
                      "description": "Whether the caller voted on the post; a vote on a post merged into it counts"
                    },
                    "following": {
                      "type": "boolean",
                      "description": "Whether the caller follows the post's status changes"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post tag ID",
                            "example": "post_tag_01m8rxmftrfzvv1w9sa0v3a098"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Mobile"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "The post's public tags, by name"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "board",
                    "status",
                    "stage",
                    "author",
                    "commentCount",
                    "pending",
                    "isAuthor",
                    "voted",
                    "following",
                    "tags",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal does not admit the caller, the caller is not the author, or the post already has votes, comments, a merge or a team review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post does not exist or the caller cannot see it, an attachment is not the caller's unused feedback upload, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsPortalOwnPost",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Delete the caller's own post",
        "description": "Soft-deletes the caller's own post. Only the author. Without allowDeleteAfterEngagement, a reviewed or merged-into post or one with votes from others or any comment is 403. Records a post.deleted event. Limited to 30 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted post",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal does not admit the caller, the caller is not the author, or the post already has votes, comments, a merge or a team review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post does not exist or the caller cannot see it, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/posts/{postId}/vote": {
      "put": {
        "operationId": "setQuillsPortalVote",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Set the caller's vote on a post",
        "description": "Sets whether the caller votes on a post. Desired state, not a toggle: a retry changes nothing. A vote on a merged post counts on the post it was merged into. changed is false when the vote was already in that state. importance (only with voted: true) says how much the caller needs the post; without it, a stored importance stays. Removing the vote removes its importance. Records post.voted or post.unvoted when the vote changed, and post.vote_importance_set when the importance changed. Limited to 120 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "voted": {
                    "type": "boolean",
                    "description": "Desired state: true to vote, false to remove the vote",
                    "example": true
                  },
                  "importance": {
                    "type": "string",
                    "enum": [
                      "nice",
                      "important",
                      "critical"
                    ],
                    "description": "How much the caller needs the post. Only with voted true; absent: a stored importance stays.",
                    "example": "important"
                  }
                },
                "required": [
                  "voted"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The vote state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "ID of the post that holds the vote: for a merged post, the post it was merged into",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "voted": {
                      "type": "boolean",
                      "description": "Whether the caller now votes on the post"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                      "example": 17
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request added or removed a vote; false when the vote was already in that state"
                    },
                    "importance": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "nice",
                        "important",
                        "critical",
                        null
                      ],
                      "description": "The caller's stored importance. Null when the caller does not vote or set none.",
                      "example": "important"
                    }
                  },
                  "required": [
                    "postId",
                    "voted",
                    "changed",
                    "importance"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board's tiers do not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or board does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/posts/{postId}/follow": {
      "put": {
        "operationId": "setQuillsPortalFollow",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Follow or unfollow a post",
        "description": "Sets whether the caller follows a post. Desired state, so a retry changes nothing. Following records interest in comments and status changes; it is not consent to other mail. Following again after an unsubscribe turns comment and status notices back on. Records no event. Limited to 120 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "following": {
                    "type": "boolean",
                    "description": "Desired state: true to follow, false to unfollow",
                    "example": true
                  }
                },
                "required": [
                  "following"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The follow state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "following": {
                      "type": "boolean",
                      "description": "Whether the caller now follows the post"
                    }
                  },
                  "required": [
                    "postId",
                    "following"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board's tiers do not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or board does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/voted-posts": {
      "get": {
        "operationId": "listQuillsPortalVotedPosts",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the visible posts that the caller voted on",
        "description": "Lists the IDs of visible posts that the caller voted on, at most 1,000, newest vote first. Empty without a customer profile. Merged posts report the post they were merged into, only when the caller can see that post. Works without sign-in; a session cookie signs the caller in. 404 while the portal is off; 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Post IDs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Post IDs, newest vote first, without duplicates",
                      "example": [
                        "post_01m8rxmftqfzvv1w8t6rzanvpn"
                      ]
                    }
                  },
                  "required": [
                    "postIds"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/user/stats": {
      "get": {
        "operationId": "getQuillsPortalUserStats",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Count the caller's own posts, comments and votes",
        "description": "Counts the caller's own posts, comments and votes in the workspace. Deleted posts and comments are not counted. Zero for an account without a customer profile. The caller authenticates with their session cookie.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's activity counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "number",
                      "description": "Number of posts the caller wrote that are not deleted",
                      "example": 3
                    },
                    "comments": {
                      "type": "number",
                      "description": "Number of comments the caller wrote that are not deleted",
                      "example": 12
                    },
                    "votes": {
                      "type": "number",
                      "description": "Number of votes the caller cast",
                      "example": 25
                    }
                  },
                  "required": [
                    "posts",
                    "comments",
                    "votes"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/posts/{postId}/comments": {
      "get": {
        "operationId": "listQuillsPortalPostComments",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List a post's public comments, oldest first",
        "description": "Lists the public comments of a post that the caller may see, oldest first, as a flat list; parentId builds the thread. Private notes, other people's held comments and test-customer comments are left out; the caller's own held comments are marked pending. A deleted comment has empty content and no author. Offset pagination: pass nextOffset as offset. Works without sign-in; a session cookie signs the caller in. 404 while the portal is off; 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "Number of comments to skip; use nextOffset from the previous page",
              "example": 0
            },
            "required": false,
            "description": "Number of comments to skip; use nextOffset from the previous page",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "Maximum number of comments to return",
              "example": 100
            },
            "required": false,
            "description": "Maximum number of comments to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Comments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "File ID",
                                  "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Original file name",
                                  "example": "screenshot.png"
                                },
                                "contentType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "size": {
                                  "type": "number",
                                  "description": "File size in bytes",
                                  "example": 48213
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "contentType",
                                "size"
                              ]
                            },
                            "description": "Files attached to the comment, oldest first; empty for a deleted comment"
                          },
                          "id": {
                            "type": "string",
                            "description": "Comment ID",
                            "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
                          },
                          "parentId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the comment this one replies to. Null for a top-level comment.",
                            "example": "post_comment_01m8rxmftrfzvv1wajtxd31nns"
                          },
                          "content": {
                            "type": "string",
                            "description": "Comment text; empty for a deleted comment",
                            "example": "This would save me an hour every week."
                          },
                          "author": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's display name. Null for an anonymous author or a deleted comment.",
                                "example": "Jane Cooper"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's avatar URL (http or https). Null for an anonymous author, a deleted comment or no avatar.",
                                "example": "https://example.com/avatars/jane.png"
                              },
                              "isTeamMember": {
                                "type": "boolean",
                                "description": "Whether a teammate wrote the comment"
                              }
                            },
                            "required": [
                              "name",
                              "avatarUrl",
                              "isTeamMember"
                            ],
                            "description": "The comment's author as customers see them"
                          },
                          "isAuthor": {
                            "type": "boolean",
                            "description": "Whether the caller wrote the comment (false once deleted)"
                          },
                          "canEdit": {
                            "type": "boolean",
                            "description": "Whether the caller may edit the comment: its author, while no teammate has replied publicly"
                          },
                          "canDelete": {
                            "type": "boolean",
                            "description": "Whether the caller may delete the comment: its author, while no teammate has replied publicly"
                          },
                          "pending": {
                            "type": "boolean",
                            "description": "Whether this is the caller's own comment that waits for moderation review"
                          },
                          "deleted": {
                            "type": "boolean",
                            "description": "Whether the comment was deleted; it keeps its place in the thread"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the comment was written",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the comment was last changed. Null: never changed.",
                            "example": "2026-11-30T15:20:00.000Z"
                          },
                          "reactions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "emoji": {
                                  "type": "string",
                                  "description": "Reaction emoji",
                                  "example": "👍"
                                },
                                "count": {
                                  "type": "number",
                                  "description": "Number of people who reacted with this emoji (test customers not counted)",
                                  "example": 3
                                },
                                "reacted": {
                                  "type": "boolean",
                                  "description": "Whether the caller reacted with this emoji"
                                }
                              },
                              "required": [
                                "emoji",
                                "count",
                                "reacted"
                              ]
                            },
                            "description": "Reactions on the comment, one entry per emoji, by emoji"
                          }
                        },
                        "required": [
                          "attachments",
                          "id",
                          "parentId",
                          "content",
                          "author",
                          "isAuthor",
                          "canEdit",
                          "canDelete",
                          "pending",
                          "deleted",
                          "createdAt",
                          "updatedAt",
                          "reactions"
                        ]
                      },
                      "description": "Comments, oldest first"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "offset for the next page. Null on the last page.",
                      "example": 100
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board or thread does not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or comment does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createQuillsPortalComment",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Comment on a post",
        "description": "Adds a public comment to a post as the caller. Plain text. The parent is a live comment of the same post that the caller can see; replies nest at most 10 levels (409). Locked, merged and author-only threads are 403 for others. A held comment waits for review and does not count until approved. idempotencyKey returns the first comment for a repeated request for 24 hours; another payload under the same key is 409. Records a comment.created event. Limited to 30 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000,
                    "description": "Comment text, stored as plain text",
                    "example": "This would save me an hour every week."
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "description": "IDs of files that the caller uploaded through the portal or widget and that are not attached elsewhere. The list replaces the item's attachments: an empty list removes them all, and absence leaves them unchanged. An ID that is not such a file is 404.",
                    "example": [
                      "file_01m8rxmftrfzvv1wa12f7gb5q5"
                    ]
                  },
                  "parentId": {
                    "type": "string",
                    "description": "Comment to reply to: a live comment of the same post that the caller can see. Absent: a top-level comment.",
                    "example": "post_comment_01m8rxmftrfzvv1wajtxd31nns"
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Client-chosen key that makes a retry safe for 24 hours: the same key and payload return the first comment with replayed true; the same key with another payload is 409",
                    "example": "1c9b7e2a-4f0d-4b8e-9a51-2d3c6f7e8a90"
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "File ID",
                            "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
                          },
                          "name": {
                            "type": "string",
                            "description": "Original file name",
                            "example": "screenshot.png"
                          },
                          "contentType": {
                            "type": "string",
                            "description": "MIME type of the file",
                            "example": "image/png"
                          },
                          "size": {
                            "type": "number",
                            "description": "File size in bytes",
                            "example": 48213
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "contentType",
                          "size"
                        ]
                      },
                      "description": "Files attached to the comment, oldest first; empty for a deleted comment"
                    },
                    "id": {
                      "type": "string",
                      "description": "Comment ID",
                      "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment this one replies to. Null for a top-level comment.",
                      "example": "post_comment_01m8rxmftrfzvv1wajtxd31nns"
                    },
                    "content": {
                      "type": "string",
                      "description": "Comment text; empty for a deleted comment",
                      "example": "This would save me an hour every week."
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name. Null for an anonymous author or a deleted comment.",
                          "example": "Jane Cooper"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's avatar URL (http or https). Null for an anonymous author, a deleted comment or no avatar.",
                          "example": "https://example.com/avatars/jane.png"
                        },
                        "isTeamMember": {
                          "type": "boolean",
                          "description": "Whether a teammate wrote the comment"
                        }
                      },
                      "required": [
                        "name",
                        "avatarUrl",
                        "isTeamMember"
                      ],
                      "description": "The comment's author as customers see them"
                    },
                    "isAuthor": {
                      "type": "boolean",
                      "description": "Whether the caller wrote the comment (false once deleted)"
                    },
                    "canEdit": {
                      "type": "boolean",
                      "description": "Whether the caller may edit the comment: its author, while no teammate has replied publicly"
                    },
                    "canDelete": {
                      "type": "boolean",
                      "description": "Whether the caller may delete the comment: its author, while no teammate has replied publicly"
                    },
                    "pending": {
                      "type": "boolean",
                      "description": "Whether this is the caller's own comment that waits for moderation review"
                    },
                    "deleted": {
                      "type": "boolean",
                      "description": "Whether the comment was deleted; it keeps its place in the thread"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the comment was written",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was last changed. Null: never changed.",
                      "example": "2026-11-30T15:20:00.000Z"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji (test customers not counted)",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reactions on the comment, one entry per emoji, by emoji"
                    },
                    "postId": {
                      "type": "string",
                      "description": "ID of the post that holds the comment",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "True when an earlier request with the same idempotencyKey created the comment; nothing new was written"
                    }
                  },
                  "required": [
                    "attachments",
                    "id",
                    "parentId",
                    "content",
                    "author",
                    "isAuthor",
                    "canEdit",
                    "canDelete",
                    "pending",
                    "deleted",
                    "createdAt",
                    "updatedAt",
                    "reactions",
                    "postId",
                    "replayed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board or thread does not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post, parent comment or attachment does not exist or the caller cannot see it (an attachment must be the caller's unused feedback upload), or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The idempotency key was already used with a different payload, or the reply would nest deeper than 10 levels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/comments/{commentId}/reactions": {
      "put": {
        "operationId": "setQuillsPortalCommentReaction",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Add or remove the caller's emoji reaction on a comment",
        "description": "Sets whether the caller reacts to a visible comment with one emoji. Desired state, so a retry changes nothing. Needs the board's vote tier. The widget's comment vote is the 👍 reaction. Records comment.reacted or comment.unreacted when the reaction changed. Limited to 120 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID (TypeID or UUID)",
              "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
            },
            "required": true,
            "description": "Comment ID (TypeID or UUID)",
            "name": "commentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emoji": {
                    "type": "string",
                    "enum": [
                      "👍",
                      "❤️",
                      "🎉",
                      "😄",
                      "😕",
                      "👀",
                      "🚀"
                    ],
                    "description": "Reaction emoji",
                    "example": "👍"
                  },
                  "reacted": {
                    "type": "boolean",
                    "description": "Desired state: true to add the reaction, false to remove it",
                    "example": true
                  }
                },
                "required": [
                  "emoji",
                  "reacted"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The comment's reactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "commentId": {
                      "type": "string",
                      "description": "Comment ID",
                      "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request added or removed the reaction; false when it was already in that state"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji (test customers not counted)",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reactions on the comment, one entry per emoji, by emoji"
                    }
                  },
                  "required": [
                    "commentId",
                    "changed",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board or thread does not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or comment does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/comments/{commentId}": {
      "put": {
        "operationId": "editQuillsPortalOwnComment",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Edit the caller's own comment",
        "description": "Replaces the text of the caller's own comment. Only the author, and only while no teammate has replied. The previous text goes to the edit history. The new text goes through moderation again: a held edit takes the comment back to review and out of the count. Records a comment.updated event. Limited to 30 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID (TypeID or UUID)",
              "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
            },
            "required": true,
            "description": "Comment ID (TypeID or UUID)",
            "name": "commentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000,
                    "description": "Comment text, stored as plain text",
                    "example": "This would save me an hour every week."
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "description": "IDs of files that the caller uploaded through the portal or widget and that are not attached elsewhere. The list replaces the item's attachments: an empty list removes them all, and absence leaves them unchanged. An ID that is not such a file is 404.",
                    "example": [
                      "file_01m8rxmftrfzvv1wa12f7gb5q5"
                    ]
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The edited comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "File ID",
                            "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
                          },
                          "name": {
                            "type": "string",
                            "description": "Original file name",
                            "example": "screenshot.png"
                          },
                          "contentType": {
                            "type": "string",
                            "description": "MIME type of the file",
                            "example": "image/png"
                          },
                          "size": {
                            "type": "number",
                            "description": "File size in bytes",
                            "example": 48213
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "contentType",
                          "size"
                        ]
                      },
                      "description": "Files attached to the comment, oldest first; empty for a deleted comment"
                    },
                    "id": {
                      "type": "string",
                      "description": "Comment ID",
                      "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment this one replies to. Null for a top-level comment.",
                      "example": "post_comment_01m8rxmftrfzvv1wajtxd31nns"
                    },
                    "content": {
                      "type": "string",
                      "description": "Comment text; empty for a deleted comment",
                      "example": "This would save me an hour every week."
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name. Null for an anonymous author or a deleted comment.",
                          "example": "Jane Cooper"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's avatar URL (http or https). Null for an anonymous author, a deleted comment or no avatar.",
                          "example": "https://example.com/avatars/jane.png"
                        },
                        "isTeamMember": {
                          "type": "boolean",
                          "description": "Whether a teammate wrote the comment"
                        }
                      },
                      "required": [
                        "name",
                        "avatarUrl",
                        "isTeamMember"
                      ],
                      "description": "The comment's author as customers see them"
                    },
                    "isAuthor": {
                      "type": "boolean",
                      "description": "Whether the caller wrote the comment (false once deleted)"
                    },
                    "canEdit": {
                      "type": "boolean",
                      "description": "Whether the caller may edit the comment: its author, while no teammate has replied publicly"
                    },
                    "canDelete": {
                      "type": "boolean",
                      "description": "Whether the caller may delete the comment: its author, while no teammate has replied publicly"
                    },
                    "pending": {
                      "type": "boolean",
                      "description": "Whether this is the caller's own comment that waits for moderation review"
                    },
                    "deleted": {
                      "type": "boolean",
                      "description": "Whether the comment was deleted; it keeps its place in the thread"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the comment was written",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was last changed. Null: never changed.",
                      "example": "2026-11-30T15:20:00.000Z"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji (test customers not counted)",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reactions on the comment, one entry per emoji, by emoji"
                    },
                    "postId": {
                      "type": "string",
                      "description": "ID of the post that holds the comment",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    }
                  },
                  "required": [
                    "attachments",
                    "id",
                    "parentId",
                    "content",
                    "author",
                    "isAuthor",
                    "canEdit",
                    "canDelete",
                    "pending",
                    "deleted",
                    "createdAt",
                    "updatedAt",
                    "reactions",
                    "postId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal does not admit the caller, the caller is not the author, or a teammate has replied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The comment does not exist or the caller cannot see it, an attachment is not the caller's unused feedback upload, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsPortalOwnComment",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Delete the caller's own comment",
        "description": "Soft-deletes the caller's own comment, only by the author and only while no teammate has replied. Replies keep their place; a pinned comment is unpinned. Records a comment.deleted event. Limited to 30 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID (TypeID or UUID)",
              "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
            },
            "required": true,
            "description": "Comment ID (TypeID or UUID)",
            "name": "commentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted comment",
                      "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
                    },
                    "postId": {
                      "type": "string",
                      "description": "ID of the post that holds the comment",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    }
                  },
                  "required": [
                    "id",
                    "postId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal does not admit the caller, the caller is not the author, or a teammate has replied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The comment does not exist or the caller cannot see it, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/files/{fileId}": {
      "get": {
        "operationId": "getQuillsPortalFile",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get an accessible feedback attachment and a short-lived download URL",
        "description": "Returns a portal or widget upload attached to a post or comment that the caller may see, or the caller's own unattached upload, with a signed download URL. Images open inline; other files download. Support conversation files are never served here. Works without sign-in; a session cookie signs the caller in.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "File ID (TypeID or UUID)",
              "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
            },
            "required": true,
            "description": "File ID (TypeID or UUID)",
            "name": "fileId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "File ID",
                      "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
                    },
                    "name": {
                      "type": "string",
                      "description": "Original file name",
                      "example": "screenshot.png"
                    },
                    "contentType": {
                      "type": "string",
                      "description": "MIME type of the file",
                      "example": "image/png"
                    },
                    "size": {
                      "type": "number",
                      "description": "File size in bytes",
                      "example": 48213
                    },
                    "downloadUrl": {
                      "type": "string",
                      "description": "Signed URL that downloads the file until downloadExpiresAt; no other credential is needed",
                      "example": "https://files.example.com/attachments/screenshot.png?signature=abc123"
                    },
                    "downloadExpiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When downloadUrl stops working",
                      "example": "2026-11-30T14:10:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "contentType",
                    "size",
                    "downloadUrl",
                    "downloadExpiresAt"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or a private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such feedback file, its post or comment is not visible to the caller, or it is someone else's unattached upload; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "discardQuillsPortalFile",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Discard the caller's unattached feedback upload",
        "description": "Deletes a portal upload that the caller made and never attached to a post or comment; storage cleanup removes the object. Records a file.deleted event. The caller authenticates with their session cookie.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "File ID (TypeID or UUID)",
              "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
            },
            "required": true,
            "description": "File ID (TypeID or UUID)",
            "name": "fileId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Discarded upload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the discarded file",
                      "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or a private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No unattached portal upload with this ID belongs to the caller; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/roadmaps": {
      "get": {
        "operationId": "listQuillsPortalRoadmaps",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the roadmaps that the caller may see, with their columns",
        "description": "Lists the live public roadmaps, and the segment roadmaps whose segments include the signed-in caller, in position order with their columns. Team roadmaps never show. 404 while the portal's roadmap tab is off. Works without sign-in; a session cookie signs the caller in. 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Roadmaps in position order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roadmaps": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Roadmap ID",
                            "example": "roadmap_01m8rxmftrfzvv1wb9wbyjegc5"
                          },
                          "name": {
                            "type": "string",
                            "description": "Roadmap name",
                            "example": "Product roadmap"
                          },
                          "slug": {
                            "type": "string",
                            "description": "URL slug of the roadmap",
                            "example": "product-roadmap"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Roadmap description. Null: none.",
                            "example": "What we are working on next"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "column",
                              "date"
                            ],
                            "description": "column: one column per post status. date: posts grouped into date buckets by their ETA.",
                            "example": "column"
                          },
                          "frequency": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "monthly",
                              "quarterly",
                              "semiannual",
                              null
                            ],
                            "description": "Bucket size of a date roadmap. Null for a column roadmap.",
                            "example": "quarterly"
                          },
                          "position": {
                            "type": "number",
                            "description": "Roadmap order, lowest first",
                            "example": 0
                          },
                          "columns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Roadmap column ID",
                                  "example": "roadmap_col_01m8rxmftrfzvv1wbgz6kkgr6z"
                                },
                                "statusId": {
                                  "type": "string",
                                  "description": "The post status whose posts fill the column",
                                  "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Column name",
                                  "example": "Planned"
                                },
                                "icon": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Column icon set by the team. Null: none."
                                },
                                "color": {
                                  "type": "string",
                                  "description": "Column color as a hex code",
                                  "example": "#a855f7"
                                },
                                "position": {
                                  "type": "number",
                                  "description": "Column order on the roadmap, lowest first",
                                  "example": 1
                                }
                              },
                              "required": [
                                "id",
                                "statusId",
                                "name",
                                "icon",
                                "color",
                                "position"
                              ]
                            },
                            "description": "The roadmap's columns, by position"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "description",
                          "type",
                          "frequency",
                          "position",
                          "columns"
                        ]
                      },
                      "description": "The roadmaps that the caller may see, in position order"
                    }
                  },
                  "required": [
                    "roadmaps"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or the portal's access rules do not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The roadmap does not exist or the caller cannot see it, the status is not one of its columns, the portal's roadmap tab is off, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/roadmaps/{roadmapId}/posts": {
      "get": {
        "operationId": "listQuillsPortalRoadmapPosts",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the posts of a roadmap column or date bucket",
        "description": "Lists one page of the unmerged posts on a roadmap that the caller may see and that match the roadmap's stored filter. A column roadmap returns the posts of every column, or of the column that statusId names. A date roadmap returns all its posts, or those whose ETA falls in bucketId; it also returns its buckets on the first page without bucketId, and null on other pages. Offset pagination. 404 while the portal's roadmap tab is off. Works without sign-in; a session cookie signs the caller in. 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap ID",
              "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
            },
            "required": true,
            "description": "Roadmap ID",
            "name": "roadmapId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Column roadmap: only posts in this column's status, which must be one of the roadmap's columns (404 otherwise). Absent: every column.",
              "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
            },
            "required": false,
            "description": "Column roadmap: only posts in this column's status, which must be one of the roadmap's columns (404 otherwise). Absent: every column.",
            "name": "statusId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 20,
              "description": "Date roadmap: only posts whose ETA falls in this bucket (an id from buckets); no-eta selects posts without an ETA. 400 when it does not fit the roadmap's frequency. Absent: every post.",
              "example": "2026-Q4"
            },
            "required": false,
            "description": "Date roadmap: only posts whose ETA falls in this bucket (an id from buckets); no-eta selects posts without an ETA. 400 when it does not fit the roadmap's frequency. Absent: every post.",
            "name": "bucketId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Search text matched against titles and bodies: web search syntax (quoted phrases, OR, -word to exclude), word prefixes and close spellings of title words",
              "example": "export"
            },
            "required": false,
            "description": "Search text matched against titles and bodies: web search syntax (quoted phrases, OR, -word to exclude), word prefixes and close spellings of title words",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "votes",
                "newest",
                "oldest"
              ],
              "default": "votes",
              "description": "votes: most votes first. newest and oldest: by creation time. Ties go to the newest post.",
              "example": "votes"
            },
            "required": false,
            "description": "votes: most votes first. newest and oldest: by creation time. Ties go to the newest post.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of posts to skip",
              "example": 0
            },
            "required": false,
            "description": "Number of posts to skip",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Maximum number of posts to return",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of posts to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of roadmap posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Dark mode for the dashboard"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of counted votes. Left out when the post's board hides vote counts.",
                            "example": 17
                          },
                          "commentCount": {
                            "type": "number",
                            "description": "Comment count stored on the post",
                            "example": 4
                          },
                          "statusId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The post's status ID. Null: no status.",
                            "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
                          },
                          "eta": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Expected delivery date that the team set. Null: none.",
                            "example": "2026-12-15T00:00:00.000Z"
                          },
                          "board": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Board ID",
                                "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                              },
                              "name": {
                                "type": "string",
                                "description": "Board name",
                                "example": "Feature requests"
                              },
                              "slug": {
                                "type": "string",
                                "description": "Board slug",
                                "example": "feature-requests"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug"
                            ],
                            "description": "The board that holds the post"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "commentCount",
                          "statusId",
                          "eta",
                          "board"
                        ]
                      },
                      "description": "Posts in the requested order"
                    },
                    "total": {
                      "type": "number",
                      "description": "Number of posts that match the filters, across all pages",
                      "example": 37
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether another page follows this one"
                    },
                    "buckets": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Bucket ID to pass as bucketId: YYYY-MM (monthly), YYYY-Qn (quarterly), YYYY-Hn (semiannual), or no-eta",
                            "example": "2026-Q4"
                          },
                          "label": {
                            "type": "string",
                            "description": "Bucket name in English",
                            "example": "Q4 2026"
                          },
                          "start": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Start of the bucket as an ISO 8601 UTC timestamp, inclusive. Null for the no-ETA bucket.",
                            "example": "2026-10-01T00:00:00.000Z"
                          },
                          "end": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "End of the bucket as an ISO 8601 UTC timestamp, exclusive. Null for the no-ETA bucket.",
                            "example": "2027-01-01T00:00:00.000Z"
                          },
                          "targetMonth": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "First day of the bucket's last month as an ISO 8601 UTC timestamp. Null for the no-ETA bucket.",
                            "example": "2026-12-01T00:00:00.000Z"
                          },
                          "noEta": {
                            "type": "boolean",
                            "description": "Whether this is the bucket of posts without an ETA"
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "start",
                          "end",
                          "targetMonth",
                          "noEta"
                        ]
                      },
                      "description": "Date roadmap, first page without bucketId: every bucket from the earliest to the latest post ETA (always including the current period, at most 50 periods each side of it), then the no-ETA bucket. Null otherwise."
                    }
                  },
                  "required": [
                    "items",
                    "total",
                    "hasMore",
                    "buckets"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or the portal's access rules do not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The roadmap does not exist or the caller cannot see it, the status is not one of its columns, the portal's roadmap tab is off, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/changelog/unread": {
      "get": {
        "operationId": "getQuillsPortalChangelogUnread",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Count the changelog entries that the caller has not read",
        "description": "Counts the published entries that the caller may see and that were published after its read mark (or, before any mark, after its profile was created). At most 99. Also returns the newest unread entry not yet announced on the launcher. Zero and no announcement without a customer profile. Works without sign-in; a session cookie signs the caller in.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "categoryIds",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "minItems": 1,
                  "maxItems": 20
                }
              ],
              "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas."
            },
            "required": false,
            "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas.",
            "name": "categories",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The unread count and the launcher announcement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "number",
                      "description": "Number of unread entries, capped at 99",
                      "example": 3
                    },
                    "announce": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Changelog entry ID",
                          "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
                        },
                        "title": {
                          "type": "string",
                          "description": "Entry title",
                          "example": "Dark mode is here"
                        }
                      },
                      "required": [
                        "id",
                        "title"
                      ],
                      "description": "The newest unread entry that the caller may see and has not been shown on the launcher yet. Null: none."
                    },
                    "autoOpen": {
                      "type": "boolean",
                      "description": "Whether to open the widget to `announce` instead of showing its title (changelog setting widgetAutoOpen). False when announce is null."
                    }
                  },
                  "required": [
                    "count",
                    "announce",
                    "autoOpen"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/changelog/read": {
      "put": {
        "operationId": "markQuillsPortalChangelogRead",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Mark every changelog entry read for the caller",
        "description": "Moves the caller's changelog read mark to now. Entries published later count as unread. Idempotent apart from the new timestamp; records no event. With `categoryIds` or `categories`, it moves only that category scope's mark and leaves the others. Limited to 120 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "categoryIds",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "minItems": 1,
                  "maxItems": 20
                }
              ],
              "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas."
            },
            "required": false,
            "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas.",
            "name": "categories",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's new read mark",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lastReadAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The caller's new read mark",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "lastReadAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/changelog/announced": {
      "put": {
        "operationId": "markQuillsPortalChangelogAnnounced",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Record that the launcher showed the caller the newest entry",
        "description": "Moves the caller's announced mark to now, so the launcher shows each entry's title once. The read mark and the unread count do not change. Records no event. With `categoryIds` or `categories`, it moves only that category scope's mark and leaves the others. Limited to 120 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "categoryIds",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "minItems": 1,
                  "maxItems": 20
                }
              ],
              "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas."
            },
            "required": false,
            "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas.",
            "name": "categories",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's new announced mark",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "announcedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The caller's new announced mark",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "announcedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/changelog/{entryId}/reactions": {
      "put": {
        "operationId": "setQuillsPortalChangelogReaction",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Add or remove the caller's emoji reaction on a changelog entry",
        "description": "Sets whether the caller reacts to a visible published changelog entry with one emoji. Desired state, from the comment reaction emoji set, so a retry changes nothing. One reaction per caller, entry and emoji. Without sign-in only a widget visitor of a workspace that allows anonymous interaction reacts. Records changelog.reacted or changelog.unreacted when the reaction changed. Limited to 120 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog entry ID (TypeID or UUID)",
              "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
            },
            "required": true,
            "description": "Changelog entry ID (TypeID or UUID)",
            "name": "entryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emoji": {
                    "type": "string",
                    "enum": [
                      "👍",
                      "❤️",
                      "🎉",
                      "😄",
                      "😕",
                      "👀",
                      "🚀"
                    ],
                    "description": "Reaction emoji",
                    "example": "🎉"
                  },
                  "reacted": {
                    "type": "boolean",
                    "description": "Desired state: true to add the reaction, false to remove it",
                    "example": true
                  }
                },
                "required": [
                  "emoji",
                  "reacted"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The entry's reactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entryId": {
                      "type": "string",
                      "description": "Changelog entry ID",
                      "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request added or removed the reaction; false when it was already in that state"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji",
                            "example": "🎉"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji (test customers not counted)",
                            "example": 8
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reactions on the entry, one entry per emoji, by emoji"
                    }
                  },
                  "required": [
                    "entryId",
                    "changed",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the caller is an anonymous visitor where anonymous interaction is off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No published entry with this ID is visible to the caller, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/changelog": {
      "get": {
        "operationId": "listQuillsPortalChangelog",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the published changelog entries that the caller may see",
        "description": "Lists one page of published changelog entries that the caller may see, newest first by the shown date. Drafts, scheduled and deleted entries never show; an entry or category limited to segments shows only to a signed-in member of one of them, and a changelog set to signed-in readers shows nothing without sign-in. content is the stored text, not sanitized HTML. With locale, an entry that has a version in the reader's language returns it. Offset pagination: pass nextOffset as offset. Works without sign-in; a session cookie signs the caller in. 404 while the portal is off; 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "Number of entries to skip; use nextOffset from the previous page",
              "example": 0
            },
            "required": false,
            "description": "Number of entries to skip; use nextOffset from the previous page",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of entries to return",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of entries to return",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 35,
              "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
              "description": "The reader's language as a BCP 47 tag; only its language part is used. An entry with a version in this language returns it; others return their own text.",
              "example": "fr-CA"
            },
            "required": false,
            "description": "The reader's language as a BCP 47 tag; only its language part is used. An entry with a version in this language returns it; others return their own text.",
            "name": "locale",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "categoryIds",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "minItems": 1,
                  "maxItems": 20
                }
              ],
              "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas."
            },
            "required": false,
            "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas.",
            "name": "categories",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Changelog entry ID",
                            "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
                          },
                          "title": {
                            "type": "string",
                            "description": "Entry title, in the reader's language when locale matched a version",
                            "example": "Dark mode is here"
                          },
                          "content": {
                            "type": "string",
                            "description": "Entry body as stored (not sanitized HTML), in the reader's language when locale matched a version",
                            "example": "You can now switch the dashboard to a dark theme."
                          },
                          "locale": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The language of the version that a teammate wrote for the reader's `locale`; null for the entry's own text, the default language",
                            "example": "fr"
                          },
                          "publishedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date shown for the entry: its display date when set, else when it was published",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Author's display name",
                                "example": "Alex Morgan"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's avatar URL (http or https). Null: none.",
                                "example": "https://example.com/avatars/alex.png"
                              }
                            },
                            "required": [
                              "name",
                              "avatarUrl"
                            ],
                            "description": "The teammate who wrote the entry. Null when unknown."
                          },
                          "categories": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Changelog category ID",
                                  "example": "changelog_category_01m8rxmftrfzvv1wb6vk0vjdhc"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Category name",
                                  "example": "New features"
                                },
                                "color": {
                                  "type": "string",
                                  "description": "Category color as a hex code",
                                  "example": "#22c55e"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "color"
                              ]
                            },
                            "description": "The entry's categories, by category position"
                          },
                          "linkedPosts": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Post ID",
                                  "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                                },
                                "title": {
                                  "type": "string",
                                  "description": "Post title",
                                  "example": "Dark mode for the dashboard"
                                },
                                "voteCount": {
                                  "type": "number",
                                  "description": "Number of counted votes. Left out when the post's board hides vote counts.",
                                  "example": 17
                                },
                                "stage": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "open",
                                    "planned",
                                    "in_progress",
                                    "shipped",
                                    null
                                  ],
                                  "description": "Public stage of the post's status. Null for a closed status.",
                                  "example": "shipped"
                                }
                              },
                              "required": [
                                "id",
                                "title",
                                "stage"
                              ]
                            },
                            "description": "Feedback posts that the entry ships and that the caller may see, in the order they were linked"
                          },
                          "requesterCount": {
                            "type": "number",
                            "description": "Distinct people who voted on the linked posts that the caller may see, on boards that show vote counts"
                          },
                          "reactions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "emoji": {
                                  "type": "string",
                                  "description": "Reaction emoji",
                                  "example": "🎉"
                                },
                                "count": {
                                  "type": "number",
                                  "description": "Number of people who reacted with this emoji (test customers not counted)",
                                  "example": 8
                                },
                                "reacted": {
                                  "type": "boolean",
                                  "description": "Whether the caller reacted with this emoji"
                                }
                              },
                              "required": [
                                "emoji",
                                "count",
                                "reacted"
                              ]
                            },
                            "description": "Reactions on the entry, one entry per emoji, by emoji"
                          },
                          "unread": {
                            "type": "boolean",
                            "description": "Published after the caller last marked the changelog read. False without a profile."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "content",
                          "locale",
                          "publishedAt",
                          "author",
                          "categories",
                          "linkedPosts",
                          "requesterCount",
                          "reactions",
                          "unread"
                        ]
                      },
                      "description": "Entries, newest shown date first"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "offset for the next page. Null on the last page.",
                      "example": 20
                    }
                  },
                  "required": [
                    "entries",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The portal's changelog tab is off, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/changelog/{entryId}": {
      "get": {
        "operationId": "getQuillsPortalChangelogEntry",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a published changelog entry",
        "description": "Returns one published changelog entry that the caller may see, with the same visibility rules as the list. With locale, the entry's version in the reader's language when a teammate wrote one. Works without sign-in; a session cookie signs the caller in. 404 while the portal is off; 403 when a private portal does not admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog entry ID (TypeID or UUID)",
              "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
            },
            "required": true,
            "description": "Changelog entry ID (TypeID or UUID)",
            "name": "entryId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 35,
              "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
              "description": "The reader's language as a BCP 47 tag; only its language part is used. An entry with a version in this language returns it; others return their own text.",
              "example": "fr-CA"
            },
            "required": false,
            "description": "The reader's language as a BCP 47 tag; only its language part is used. An entry with a version in this language returns it; others return their own text.",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The entry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Changelog entry ID",
                      "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
                    },
                    "title": {
                      "type": "string",
                      "description": "Entry title, in the reader's language when locale matched a version",
                      "example": "Dark mode is here"
                    },
                    "content": {
                      "type": "string",
                      "description": "Entry body as stored (not sanitized HTML), in the reader's language when locale matched a version",
                      "example": "You can now switch the dashboard to a dark theme."
                    },
                    "locale": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The language of the version that a teammate wrote for the reader's `locale`; null for the entry's own text, the default language",
                      "example": "fr"
                    },
                    "publishedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date shown for the entry: its display date when set, else when it was published",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Author's display name",
                          "example": "Alex Morgan"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's avatar URL (http or https). Null: none.",
                          "example": "https://example.com/avatars/alex.png"
                        }
                      },
                      "required": [
                        "name",
                        "avatarUrl"
                      ],
                      "description": "The teammate who wrote the entry. Null when unknown."
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Changelog category ID",
                            "example": "changelog_category_01m8rxmftrfzvv1wb6vk0vjdhc"
                          },
                          "name": {
                            "type": "string",
                            "description": "Category name",
                            "example": "New features"
                          },
                          "color": {
                            "type": "string",
                            "description": "Category color as a hex code",
                            "example": "#22c55e"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "The entry's categories, by category position"
                    },
                    "linkedPosts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Dark mode for the dashboard"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of counted votes. Left out when the post's board hides vote counts.",
                            "example": 17
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "open",
                              "planned",
                              "in_progress",
                              "shipped",
                              null
                            ],
                            "description": "Public stage of the post's status. Null for a closed status.",
                            "example": "shipped"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "stage"
                        ]
                      },
                      "description": "Feedback posts that the entry ships and that the caller may see, in the order they were linked"
                    },
                    "requesterCount": {
                      "type": "number",
                      "description": "Distinct people who voted on the linked posts that the caller may see, on boards that show vote counts"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji",
                            "example": "🎉"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji (test customers not counted)",
                            "example": 8
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reactions on the entry, one entry per emoji, by emoji"
                    },
                    "unread": {
                      "type": "boolean",
                      "description": "Published after the caller last marked the changelog read. False without a profile."
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "locale",
                    "publishedAt",
                    "author",
                    "categories",
                    "linkedPosts",
                    "requesterCount",
                    "reactions",
                    "unread"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or the portal's access rules do not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No published entry with this ID is visible to the caller, the portal's changelog tab is off, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/changelog/rss.xml": {
      "get": {
        "operationId": "getQuillsPublicChangelogFeed",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the changelog RSS feed",
        "description": "Returns an RSS 2.0 feed of the 50 newest published changelog entries that an anonymous visitor may see, newest first by the shown date; each item's description is the entry text without markup, cut to 500 characters. The feed has no items on a private portal. Links point to the portal pages of the web app (/portal/{workspaceId}). Public: needs no credential. Limited to 30 requests per minute per client IP and workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The RSS document",
            "content": {
              "application/rss+xml": {
                "schema": {
                  "type": "string",
                  "description": "RSS 2.0 XML document",
                  "example": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><rss version=\"2.0\">...</rss>"
                }
              }
            }
          },
          "404": {
            "description": "The portal's changelog tab is off, or the portal is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/sitemap.xml": {
      "get": {
        "operationId": "getQuillsPublicSitemap",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the portal sitemap",
        "description": "Returns sitemap XML of the portal home, the boards, posts and changelog entries that an anonymous visitor may see: at most 10,000 unmerged posts (newest created first) and 1,000 entries (none while the portal changelog tab is off). Posts and entries carry their last update date. Empty on a private portal; 404 while the portal is off. Public: needs no credential. Limited to 30 requests per minute per client IP and workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The sitemap document",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "description": "Sitemap protocol XML document",
                  "example": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">...</urlset>"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/post-draft/improve": {
      "post": {
        "operationId": "improveQuillsPortalPostDraft",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Suggest a title and a board for a draft post",
        "description": "Asks the workspace's AI model for a title written from the customer's own words and for one of the boards that take the caller's posts (the first 50 by name reach the model). The customer's text is not changed and nothing is saved; the customer confirms by submitting the post. Uses the workspace's AI budget and logs the usage. 409 when AI is not configured or the workspace reached its monthly AI limit, 502 when the provider fails. Limited to 10 requests per 10 minutes per client IP and workspace. Each signed-in account has the same limit of its own. The caller authenticates with their session cookie.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "The customer's draft title; may be empty when details is set",
                    "example": "csv export"
                  },
                  "details": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "The customer's draft body; may be empty when title is set",
                    "example": "I need to export all posts to a spreadsheet every month."
                  },
                  "boardId": {
                    "type": "string",
                    "description": "Board that the customer already picked. It must take the caller's posts; the answer falls back to it when the model picks no valid board.",
                    "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                  },
                  "boardIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
                      "example": "board_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50
                  }
                },
                "required": [
                  "title",
                  "details"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The suggested title and board; nothing is saved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "maxLength": 200,
                      "description": "Suggested post title, in the language of the draft",
                      "example": "Monthly CSV export of all posts"
                    },
                    "boardId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Suggested board: the model's pick if it takes the caller's posts, else the boardId sent. Null when neither applies.",
                      "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                    },
                    "boardName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the suggested board. Null when boardId is null.",
                      "example": "Feature requests"
                    }
                  },
                  "required": [
                    "title",
                    "boardId",
                    "boardName"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal does not admit the caller, or no board (or not the given board) takes the caller's posts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The given board does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "AI is not configured, or the workspace reached its monthly AI limit; The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The AI provider failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/anonymous-session": {
      "post": {
        "operationId": "createQuillsWidgetAnonymousSession",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Start an anonymous widget session",
        "description": "Creates a new anonymous person and a widget session for them. Public: needs no credential, but the widget must be on and the workspace's widget anti-spam rules apply (rate tiers and, when configured, a proof-of-work or Turnstile challenge sent in the challenge request headers). Creates the widget secret when it is missing. Each call creates a new anonymous person. The session can read; anonymous writes still need the portal's anonymous-interaction switch. Identify with this token as previousToken (and as the Bearer token) moves its activity to the identified person. Records a user.created event. Limited to 500 requests per hour per client IP and workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The anonymous widget session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessionToken": {
                      "type": "string",
                      "description": "Widget session token. Send it as `Authorization: Bearer <token>` on widget routes; keep it secret.",
                      "example": "q1Zr7m3Kx9VtP0aLwYcN5bH2dGfJ8sE4uR6iO1kT3yA"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "ID of the new anonymous person",
                      "example": "principal_01m8rxmftsfzvv1wcc2pb4s01a"
                    }
                  },
                  "required": [
                    "sessionToken",
                    "principalId"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The anti-spam challenge is required or failed, or the origin or sender is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/boards": {
      "get": {
        "operationId": "listQuillsWidgetBoards",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List the boards that the caller may see, with its capabilities",
        "description": "Lists the live feedback boards whose view tier and segments admit the caller, sorted by name. Boards linked to a project are never listed. With counts=true, postCount counts the posts that the caller may see; otherwise it is null. canSubmit, canVote and canComment apply the board's tiers and, for a visitor without sign-in, the workspace's anonymous switch. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session works. 404 while the widget is off; on a private portal, an anonymous session gets 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "true: count each board's visible posts into postCount, which scans every visible post. false: postCount is null.",
              "example": "true"
            },
            "required": false,
            "description": "true: count each board's visible posts into postCount, which scans every visible post. false: postCount is null.",
            "name": "counts",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Boards that the caller may see, by name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Board ID",
                            "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                          },
                          "name": {
                            "type": "string",
                            "description": "Board name",
                            "example": "Feature requests"
                          },
                          "slug": {
                            "type": "string",
                            "description": "URL slug of the board, unique in the workspace",
                            "example": "feature-requests"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Board description shown to customers. Null: none.",
                            "example": "Ideas for new features"
                          },
                          "postCount": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Number of posts on the board that the caller may see, merged posts excluded. Null unless counts=true.",
                            "example": 42
                          },
                          "canSubmit": {
                            "type": "boolean",
                            "description": "Whether the caller may submit a post to this board"
                          },
                          "canVote": {
                            "type": "boolean",
                            "description": "Whether the caller may vote on this board's posts"
                          },
                          "canComment": {
                            "type": "boolean",
                            "description": "Whether the caller may comment on this board's posts; a locked post or an author-only board can still refuse"
                          },
                          "voteDisplay": {
                            "type": "string",
                            "enum": [
                              "count",
                              "hidden"
                            ],
                            "description": "How vote counts show to customers. count: posts carry voteCount. hidden: the board's posts come without voteCount."
                          },
                          "defaultSort": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "votes",
                              "newest",
                              "random",
                              null
                            ],
                            "description": "The board's post order when the caller names none. Null: no board default."
                          },
                          "fields": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Field key that the post's values are stored under",
                                  "example": "plan_tier"
                                },
                                "label": {
                                  "type": "string",
                                  "description": "Field name shown to people",
                                  "example": "Plan tier"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text",
                                    "number",
                                    "select",
                                    "multi_select",
                                    "checkbox",
                                    "date"
                                  ],
                                  "description": "Value type. `text`: free text. `number`: a number. `select`: one of `options`. `multi_select`: a list of `options`. `checkbox`: a boolean. `date`: a YYYY-MM-DD date."
                                },
                                "required": {
                                  "type": "boolean",
                                  "description": "Whether a new post must have a value; a required checkbox must be checked"
                                },
                                "options": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "Choices of a `select` or `multi_select` field; absent for other types",
                                  "example": [
                                    "Free",
                                    "Pro",
                                    "Enterprise"
                                  ]
                                }
                              },
                              "required": [
                                "key",
                                "label",
                                "type",
                                "required"
                              ]
                            },
                            "description": "The public custom fields that a new post on this board fills in. Internal fields are never listed."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "description",
                          "postCount",
                          "canSubmit",
                          "canVote",
                          "canComment",
                          "voteDisplay",
                          "defaultSort",
                          "fields"
                        ]
                      },
                      "description": "The boards that the caller may see, by name"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/posts": {
      "get": {
        "operationId": "listQuillsWidgetPosts",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List the feedback posts that the caller may see",
        "description": "Lists one page of posts on the boards that the caller may see. Merged, deleted, hidden, test-customer and other people's held posts are left out; the caller's own held posts are marked pending. stage maps statuses to open, planned, in_progress and shipped; a closed status has no stage. Cursor pagination: pass nextCursor as cursor with the same filters and sort. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session works. 404 while the widget is off; on a private portal, an anonymous session gets 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts on this board. Absent: every board that the caller may see.",
              "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
            },
            "required": false,
            "description": "Only posts on this board. Absent: every board that the caller may see.",
            "name": "boardId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "boardIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "planned",
                "in_progress",
                "shipped"
              ],
              "description": "Only posts in this public stage",
              "example": "planned"
            },
            "required": false,
            "description": "Only posts in this public stage",
            "name": "stage",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Search text matched against titles and bodies: web search syntax (quoted phrases, OR, -word to exclude), word prefixes and close spellings of title words",
              "example": "dark mode"
            },
            "required": false,
            "description": "Search text matched against titles and bodies: web search syntax (quoted phrases, OR, -word to exclude), word prefixes and close spellings of title words",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest",
                "votes",
                "random"
              ],
              "description": "Post order. newest and oldest: by creation time. votes: most votes first. Without sort: the default sort of the board that boardId names, else newest. random is the same order for one caller for one UTC day.",
              "example": "votes"
            },
            "required": false,
            "description": "Post order. newest and oldest: by creation time. votes: most votes first. Without sort: the default sort of the board that boardId names, else newest. random is the same order for one caller for one UTC day.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "nextCursor from the previous page. Must be a post the caller can see (404 otherwise).",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": false,
            "description": "nextCursor from the previous page. Must be a post the caller can see (404 otherwise).",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of posts to return",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of posts to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Dark mode for the dashboard"
                          },
                          "content": {
                            "type": "string",
                            "description": "Post body text; can be empty",
                            "example": "The dashboard is hard to read at night."
                          },
                          "board": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Board ID",
                                "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                              },
                              "name": {
                                "type": "string",
                                "description": "Board name",
                                "example": "Feature requests"
                              },
                              "slug": {
                                "type": "string",
                                "description": "Board slug",
                                "example": "feature-requests"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug"
                            ],
                            "description": "The board that holds the post"
                          },
                          "status": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Post status ID",
                                "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
                              },
                              "name": {
                                "type": "string",
                                "description": "Status name",
                                "example": "Planned"
                              },
                              "color": {
                                "type": "string",
                                "description": "Status color as a hex code",
                                "example": "#a855f7"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ],
                            "description": "The post's current status. Null: no status."
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "open",
                              "planned",
                              "in_progress",
                              "shipped",
                              null
                            ],
                            "description": "Public stage of the post's status: open (no status or another active status), planned, in_progress or shipped (a complete status). Null for a closed status.",
                            "example": "planned"
                          },
                          "author": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's display name. Null for an anonymous author.",
                                "example": "Jane Cooper"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's avatar URL (http or https). Null for an anonymous author or when none is set.",
                                "example": "https://example.com/avatars/jane.png"
                              },
                              "isTeamMember": {
                                "type": "boolean",
                                "description": "Whether the author is a teammate of the workspace"
                              }
                            },
                            "required": [
                              "name",
                              "avatarUrl",
                              "isTeamMember"
                            ],
                            "description": "The post's author as customers see them"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                            "example": 17
                          },
                          "commentCount": {
                            "type": "number",
                            "description": "Comment count stored on the post",
                            "example": 4
                          },
                          "pending": {
                            "type": "boolean",
                            "description": "Whether this is the caller's own post that waits for moderation review"
                          },
                          "isAuthor": {
                            "type": "boolean",
                            "description": "Whether the caller wrote the post"
                          },
                          "voted": {
                            "type": "boolean",
                            "description": "Whether the caller voted on the post; a vote on a post merged into it counts"
                          },
                          "following": {
                            "type": "boolean",
                            "description": "Whether the caller follows the post's status changes"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Post tag ID",
                                  "example": "post_tag_01m8rxmftrfzvv1w9sa0v3a098"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Tag name",
                                  "example": "Mobile"
                                },
                                "color": {
                                  "type": "string",
                                  "description": "Tag color as a hex code",
                                  "example": "#6b7280"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "color"
                              ]
                            },
                            "description": "The post's public tags, by name"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was created",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "content",
                          "board",
                          "status",
                          "stage",
                          "author",
                          "commentCount",
                          "pending",
                          "isAuthor",
                          "voted",
                          "following",
                          "tags",
                          "createdAt"
                        ]
                      },
                      "description": "Posts in the requested order"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page: the ID of the last post on this page. Null on the last page.",
                      "example": "post_01m8rxmftrfzvv1w90xc0akc8b"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether another page follows this one"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board's tiers do not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or board does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createQuillsWidgetPost",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Submit a feedback post",
        "description": "Creates a post as the caller. Without boardId, the first board (by name) that accepts the caller's submissions. Without title, the first line of content; with AI configured and neither title nor boardId sent, a job then writes a short title and may move the post to a board with the same access rules. customFields must hold a value for each required public field of the board (see the board list); 400 for a missing, unknown or wrongly typed value. The author's vote and subscription are added. A held post waits for review and is visible only to its author. idempotencyKey returns the first post for a repeated request; another payload under the same key is 409. Records a post.created event. Limited to 20 requests per 10 minutes per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session writes only while the workspace allows anonymous interaction.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardId": {
                    "type": "string",
                    "description": "Board to post on. Absent: the first board, by name, that accepts the caller's submissions.",
                    "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Post title. Absent: the first line of content, cut to 200 characters.",
                    "example": "Dark mode for the dashboard"
                  },
                  "content": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "Post body text; may be empty when title is set",
                    "example": "The dashboard is hard to read at night."
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "description": "IDs of files that the caller uploaded through the portal or widget and that are not attached elsewhere. The list replaces the item's attachments: an empty list removes them all, and absence leaves them unchanged. An ID that is not such a file is 404.",
                    "example": [
                      "file_01m8rxmftrfzvv1wa12f7gb5q5"
                    ]
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Client-chosen key that makes a retry safe for 24 hours: the same key and payload return the first post with replayed true; the same key with another payload is 409",
                    "example": "8f14e45f-ceea-467f-a8f4-6c2f9a0b1d3e"
                  },
                  "customFields": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "maxItems": 50
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Values of the board's custom fields, keyed by field key: a string for text, select and date (YYYY-MM-DD), a number, a boolean for a checkbox, and a list of options for multi-select."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": "Context from the host page, such as pageUrl and browser, and keys that the host app set with the widget's metadata command. Teammates read it; customers never do."
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Dark mode for the dashboard"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text; can be empty",
                      "example": "The dashboard is hard to read at night."
                    },
                    "board": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Board ID",
                          "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                        },
                        "name": {
                          "type": "string",
                          "description": "Board name",
                          "example": "Feature requests"
                        },
                        "slug": {
                          "type": "string",
                          "description": "Board slug",
                          "example": "feature-requests"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug"
                      ],
                      "description": "The board that holds the post"
                    },
                    "status": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Post status ID",
                          "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
                        },
                        "name": {
                          "type": "string",
                          "description": "Status name",
                          "example": "Planned"
                        },
                        "color": {
                          "type": "string",
                          "description": "Status color as a hex code",
                          "example": "#a855f7"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "color"
                      ],
                      "description": "The post's current status. Null: no status."
                    },
                    "stage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "open",
                        "planned",
                        "in_progress",
                        "shipped",
                        null
                      ],
                      "description": "Public stage of the post's status: open (no status or another active status), planned, in_progress or shipped (a complete status). Null for a closed status.",
                      "example": "planned"
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name. Null for an anonymous author.",
                          "example": "Jane Cooper"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's avatar URL (http or https). Null for an anonymous author or when none is set.",
                          "example": "https://example.com/avatars/jane.png"
                        },
                        "isTeamMember": {
                          "type": "boolean",
                          "description": "Whether the author is a teammate of the workspace"
                        }
                      },
                      "required": [
                        "name",
                        "avatarUrl",
                        "isTeamMember"
                      ],
                      "description": "The post's author as customers see them"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                      "example": 17
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Comment count stored on the post",
                      "example": 4
                    },
                    "pending": {
                      "type": "boolean",
                      "description": "Whether this is the caller's own post that waits for moderation review"
                    },
                    "isAuthor": {
                      "type": "boolean",
                      "description": "Whether the caller wrote the post"
                    },
                    "voted": {
                      "type": "boolean",
                      "description": "Whether the caller voted on the post; a vote on a post merged into it counts"
                    },
                    "following": {
                      "type": "boolean",
                      "description": "Whether the caller follows the post's status changes"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post tag ID",
                            "example": "post_tag_01m8rxmftrfzvv1w9sa0v3a098"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Mobile"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "The post's public tags, by name"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "True when an earlier request with the same idempotencyKey created the post; nothing new was written"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "board",
                    "status",
                    "stage",
                    "author",
                    "commentCount",
                    "pending",
                    "isAuthor",
                    "voted",
                    "following",
                    "tags",
                    "createdAt",
                    "replayed"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A custom field value is missing, unknown or of the wrong type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board's tiers do not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The board does not exist, the caller cannot see it or no board accepts the caller's submissions, an attachment is not the caller's unused feedback upload, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The idempotency key was already used with a different payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/posts/similar": {
      "get": {
        "operationId": "findQuillsWidgetSimilarPosts",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Find visible posts with a title like the given text",
        "description": "Finds visible, unmerged posts whose title or body shares any word with the given text (English full-text match), best match first, then most votes; use it to suggest duplicates before submitting. Limited to 60 requests per minute per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session works. 404 while the widget is off; on a private portal, an anonymous session gets 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 200,
              "description": "Text to match, usually the title of a draft post",
              "example": "Export to CSV"
            },
            "required": true,
            "description": "Text to match, usually the title of a draft post",
            "name": "title",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "boardIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 5,
              "description": "Maximum number of matches",
              "example": 5
            },
            "required": false,
            "description": "Maximum number of matches",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Similar posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "CSV export"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                            "example": 17
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "open",
                              "planned",
                              "in_progress",
                              "shipped",
                              null
                            ],
                            "description": "Public stage of the post's status. Null for a closed status.",
                            "example": "open"
                          },
                          "board": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Board ID",
                                "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                              },
                              "slug": {
                                "type": "string",
                                "description": "Board slug",
                                "example": "feature-requests"
                              }
                            },
                            "required": [
                              "id",
                              "slug"
                            ],
                            "description": "The board that holds the post"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "stage",
                          "board"
                        ]
                      },
                      "description": "Matching posts, best match first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/posts/{postId}": {
      "get": {
        "operationId": "getQuillsWidgetPost",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get a feedback post with the caller's permissions on it",
        "description": "Returns a visible post with its attachments, public custom field values and the caller's permissions on it (vote, comment, edit, delete), plus the caller's vote importance. mergedInto names the post that a merged post points to when the caller can see it. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session works. 404 while the widget is off; on a private portal, an anonymous session gets 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Dark mode for the dashboard"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text; can be empty",
                      "example": "The dashboard is hard to read at night."
                    },
                    "board": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Board ID",
                          "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                        },
                        "name": {
                          "type": "string",
                          "description": "Board name",
                          "example": "Feature requests"
                        },
                        "slug": {
                          "type": "string",
                          "description": "Board slug",
                          "example": "feature-requests"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug"
                      ],
                      "description": "The board that holds the post"
                    },
                    "status": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Post status ID",
                          "example": "post_status_01m8rxmftrfzvv1w9k18evzkhr"
                        },
                        "name": {
                          "type": "string",
                          "description": "Status name",
                          "example": "Planned"
                        },
                        "color": {
                          "type": "string",
                          "description": "Status color as a hex code",
                          "example": "#a855f7"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "color"
                      ],
                      "description": "The post's current status. Null: no status."
                    },
                    "stage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "open",
                        "planned",
                        "in_progress",
                        "shipped",
                        null
                      ],
                      "description": "Public stage of the post's status: open (no status or another active status), planned, in_progress or shipped (a complete status). Null for a closed status.",
                      "example": "planned"
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name. Null for an anonymous author.",
                          "example": "Jane Cooper"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's avatar URL (http or https). Null for an anonymous author or when none is set.",
                          "example": "https://example.com/avatars/jane.png"
                        },
                        "isTeamMember": {
                          "type": "boolean",
                          "description": "Whether the author is a teammate of the workspace"
                        }
                      },
                      "required": [
                        "name",
                        "avatarUrl",
                        "isTeamMember"
                      ],
                      "description": "The post's author as customers see them"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                      "example": 17
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Comment count stored on the post",
                      "example": 4
                    },
                    "pending": {
                      "type": "boolean",
                      "description": "Whether this is the caller's own post that waits for moderation review"
                    },
                    "isAuthor": {
                      "type": "boolean",
                      "description": "Whether the caller wrote the post"
                    },
                    "voted": {
                      "type": "boolean",
                      "description": "Whether the caller voted on the post; a vote on a post merged into it counts"
                    },
                    "following": {
                      "type": "boolean",
                      "description": "Whether the caller follows the post's status changes"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post tag ID",
                            "example": "post_tag_01m8rxmftrfzvv1w9sa0v3a098"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Mobile"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "The post's public tags, by name"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "File ID",
                            "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
                          },
                          "name": {
                            "type": "string",
                            "description": "Original file name",
                            "example": "screenshot.png"
                          },
                          "contentType": {
                            "type": "string",
                            "description": "MIME type of the file",
                            "example": "image/png"
                          },
                          "size": {
                            "type": "number",
                            "description": "File size in bytes",
                            "example": 48213
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "contentType",
                          "size"
                        ]
                      },
                      "description": "Files attached to the post, oldest first"
                    },
                    "canVote": {
                      "type": "boolean",
                      "description": "Whether the board's tiers let the caller vote on the post"
                    },
                    "canComment": {
                      "type": "boolean",
                      "description": "Whether the caller may comment now: the board allows it, comments are not locked, the post is not merged, and on an author-only board the caller wrote the post"
                    },
                    "canEdit": {
                      "type": "boolean",
                      "description": "Whether the caller may edit the post: only its author, and only before votes, comments, a merge or a team review unless the workspace allows edits after engagement"
                    },
                    "canDelete": {
                      "type": "boolean",
                      "description": "Whether the caller may delete the post: only its author, and only before votes, any comment, a merge or a team review unless the workspace allows deletes after engagement"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the team locked comments on the post"
                    },
                    "authorOnlyReplies": {
                      "type": "boolean",
                      "description": "Whether the board lets only the post's author comment among customers"
                    },
                    "mergedInto": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the post this post was merged into",
                          "example": "post_01m8rxmftrfzvv1w90xc0akc8b"
                        },
                        "title": {
                          "type": "string",
                          "description": "Title of that post",
                          "example": "Dark theme"
                        }
                      },
                      "required": [
                        "id",
                        "title"
                      ],
                      "description": "The post this post was merged into. Null when it is not merged or the caller cannot see that post."
                    },
                    "importance": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "nice",
                        "important",
                        "critical",
                        null
                      ],
                      "description": "How much the caller needs the post, when the caller voted and said so",
                      "example": "important"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          },
                          "label": {
                            "type": "string",
                            "description": "The custom field's label, as the board defines it",
                            "example": "Company size"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values",
                          "label"
                        ]
                      },
                      "description": "The post's values of the board's public custom fields, in the board's order. Internal fields are never included."
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "board",
                    "status",
                    "stage",
                    "author",
                    "commentCount",
                    "pending",
                    "isAuthor",
                    "voted",
                    "following",
                    "tags",
                    "createdAt",
                    "attachments",
                    "canVote",
                    "canComment",
                    "canEdit",
                    "canDelete",
                    "isCommentsLocked",
                    "authorOnlyReplies",
                    "mergedInto",
                    "importance",
                    "customFields"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board's tiers do not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or board does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/posts/{postId}/vote": {
      "put": {
        "operationId": "setQuillsWidgetVote",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Set the caller's vote on a post",
        "description": "Sets whether the caller votes on a post. Desired state, not a toggle: a retry changes nothing. A vote on a merged post counts on the post it was merged into. changed is false when the vote was already in that state. importance (only with voted: true) says how much the caller needs the post; without it, a stored importance stays. Removing the vote removes its importance. Records post.voted or post.unvoted when the vote changed, and post.vote_importance_set when the importance changed. Limited to 120 requests per 10 minutes per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session writes only while the workspace allows anonymous interaction.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "voted": {
                    "type": "boolean",
                    "description": "Desired state: true to vote, false to remove the vote",
                    "example": true
                  },
                  "importance": {
                    "type": "string",
                    "enum": [
                      "nice",
                      "important",
                      "critical"
                    ],
                    "description": "How much the caller needs the post. Only with voted true; absent: a stored importance stays.",
                    "example": "important"
                  }
                },
                "required": [
                  "voted"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The vote state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "ID of the post that holds the vote: for a merged post, the post it was merged into",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "voted": {
                      "type": "boolean",
                      "description": "Whether the caller now votes on the post"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of counted votes on the post (test customers' votes are not counted). Left out when the post's board hides vote counts.",
                      "example": 17
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request added or removed a vote; false when the vote was already in that state"
                    },
                    "importance": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "nice",
                        "important",
                        "critical",
                        null
                      ],
                      "description": "The caller's stored importance. Null when the caller does not vote or set none.",
                      "example": "important"
                    }
                  },
                  "required": [
                    "postId",
                    "voted",
                    "changed",
                    "importance"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board's tiers do not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or board does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/posts/{postId}/follow": {
      "put": {
        "operationId": "setQuillsWidgetFollow",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Follow or unfollow a post",
        "description": "Sets whether the caller follows a post. Desired state, so a retry changes nothing. Following records interest in comments and status changes; it is not consent to other mail. Following again after an unsubscribe turns comment and status notices back on. Records no event. Limited to 120 requests per 10 minutes per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session writes only while the workspace allows anonymous interaction.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "following": {
                    "type": "boolean",
                    "description": "Desired state: true to follow, false to unfollow",
                    "example": true
                  }
                },
                "required": [
                  "following"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The follow state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "following": {
                      "type": "boolean",
                      "description": "Whether the caller now follows the post"
                    }
                  },
                  "required": [
                    "postId",
                    "following"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board's tiers do not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or board does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/voted-posts": {
      "get": {
        "operationId": "listQuillsWidgetVotedPosts",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List the visible posts that the caller voted on",
        "description": "Lists the IDs of visible posts that the caller voted on, at most 1,000, newest vote first. Empty without a customer profile. Merged posts report the post they were merged into, only when the caller can see that post. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session works. 404 while the widget is off; on a private portal, an anonymous session gets 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Post IDs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Post IDs, newest vote first, without duplicates",
                      "example": [
                        "post_01m8rxmftqfzvv1w8t6rzanvpn"
                      ]
                    }
                  },
                  "required": [
                    "postIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/user/stats": {
      "get": {
        "operationId": "getQuillsWidgetUserStats",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Count the caller's own posts, comments and votes",
        "description": "Counts the caller's own posts, comments and votes in the workspace. Deleted posts and comments are not counted. Zero for an account without a customer profile. Send the widget session token as `Authorization: Bearer <token>`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's activity counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "number",
                      "description": "Number of posts the caller wrote that are not deleted",
                      "example": 3
                    },
                    "comments": {
                      "type": "number",
                      "description": "Number of comments the caller wrote that are not deleted",
                      "example": 12
                    },
                    "votes": {
                      "type": "number",
                      "description": "Number of votes the caller cast",
                      "example": 25
                    }
                  },
                  "required": [
                    "posts",
                    "comments",
                    "votes"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/posts/{postId}/comments": {
      "get": {
        "operationId": "listQuillsWidgetPostComments",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List a post's public comments, oldest first",
        "description": "Lists the public comments of a post that the caller may see, oldest first, as a flat list; parentId builds the thread. Private notes, other people's held comments and test-customer comments are left out; the caller's own held comments are marked pending. A deleted comment has empty content and no author. Offset pagination: pass nextOffset as offset. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session works. 404 while the widget is off; on a private portal, an anonymous session gets 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "Number of comments to skip; use nextOffset from the previous page",
              "example": 0
            },
            "required": false,
            "description": "Number of comments to skip; use nextOffset from the previous page",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "Maximum number of comments to return",
              "example": 100
            },
            "required": false,
            "description": "Maximum number of comments to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Comments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "File ID",
                                  "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Original file name",
                                  "example": "screenshot.png"
                                },
                                "contentType": {
                                  "type": "string",
                                  "description": "MIME type of the file",
                                  "example": "image/png"
                                },
                                "size": {
                                  "type": "number",
                                  "description": "File size in bytes",
                                  "example": 48213
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "contentType",
                                "size"
                              ]
                            },
                            "description": "Files attached to the comment, oldest first; empty for a deleted comment"
                          },
                          "id": {
                            "type": "string",
                            "description": "Comment ID",
                            "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
                          },
                          "parentId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the comment this one replies to. Null for a top-level comment.",
                            "example": "post_comment_01m8rxmftrfzvv1wajtxd31nns"
                          },
                          "content": {
                            "type": "string",
                            "description": "Comment text; empty for a deleted comment",
                            "example": "This would save me an hour every week."
                          },
                          "author": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's display name. Null for an anonymous author or a deleted comment.",
                                "example": "Jane Cooper"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's avatar URL (http or https). Null for an anonymous author, a deleted comment or no avatar.",
                                "example": "https://example.com/avatars/jane.png"
                              },
                              "isTeamMember": {
                                "type": "boolean",
                                "description": "Whether a teammate wrote the comment"
                              }
                            },
                            "required": [
                              "name",
                              "avatarUrl",
                              "isTeamMember"
                            ],
                            "description": "The comment's author as customers see them"
                          },
                          "isAuthor": {
                            "type": "boolean",
                            "description": "Whether the caller wrote the comment (false once deleted)"
                          },
                          "canEdit": {
                            "type": "boolean",
                            "description": "Whether the caller may edit the comment: its author, while no teammate has replied publicly"
                          },
                          "canDelete": {
                            "type": "boolean",
                            "description": "Whether the caller may delete the comment: its author, while no teammate has replied publicly"
                          },
                          "pending": {
                            "type": "boolean",
                            "description": "Whether this is the caller's own comment that waits for moderation review"
                          },
                          "deleted": {
                            "type": "boolean",
                            "description": "Whether the comment was deleted; it keeps its place in the thread"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the comment was written",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the comment was last changed. Null: never changed.",
                            "example": "2026-11-30T15:20:00.000Z"
                          },
                          "reactions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "emoji": {
                                  "type": "string",
                                  "description": "Reaction emoji",
                                  "example": "👍"
                                },
                                "count": {
                                  "type": "number",
                                  "description": "Number of people who reacted with this emoji (test customers not counted)",
                                  "example": 3
                                },
                                "reacted": {
                                  "type": "boolean",
                                  "description": "Whether the caller reacted with this emoji"
                                }
                              },
                              "required": [
                                "emoji",
                                "count",
                                "reacted"
                              ]
                            },
                            "description": "Reactions on the comment, one entry per emoji, by emoji"
                          }
                        },
                        "required": [
                          "attachments",
                          "id",
                          "parentId",
                          "content",
                          "author",
                          "isAuthor",
                          "canEdit",
                          "canDelete",
                          "pending",
                          "deleted",
                          "createdAt",
                          "updatedAt",
                          "reactions"
                        ]
                      },
                      "description": "Comments, oldest first"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "offset for the next page. Null on the last page.",
                      "example": 100
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board or thread does not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or comment does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createQuillsWidgetComment",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Comment on a post",
        "description": "Adds a public comment to a post as the caller. Plain text. The parent is a live comment of the same post that the caller can see; replies nest at most 10 levels (409). Locked, merged and author-only threads are 403 for others. A held comment waits for review and does not count until approved. idempotencyKey returns the first comment for a repeated request for 24 hours; another payload under the same key is 409. Records a comment.created event. Limited to 30 requests per 10 minutes per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session writes only while the workspace allows anonymous interaction.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (TypeID or UUID)",
              "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
            },
            "required": true,
            "description": "Post ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000,
                    "description": "Comment text, stored as plain text",
                    "example": "This would save me an hour every week."
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "description": "IDs of files that the caller uploaded through the portal or widget and that are not attached elsewhere. The list replaces the item's attachments: an empty list removes them all, and absence leaves them unchanged. An ID that is not such a file is 404.",
                    "example": [
                      "file_01m8rxmftrfzvv1wa12f7gb5q5"
                    ]
                  },
                  "parentId": {
                    "type": "string",
                    "description": "Comment to reply to: a live comment of the same post that the caller can see. Absent: a top-level comment.",
                    "example": "post_comment_01m8rxmftrfzvv1wajtxd31nns"
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Client-chosen key that makes a retry safe for 24 hours: the same key and payload return the first comment with replayed true; the same key with another payload is 409",
                    "example": "1c9b7e2a-4f0d-4b8e-9a51-2d3c6f7e8a90"
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "File ID",
                            "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
                          },
                          "name": {
                            "type": "string",
                            "description": "Original file name",
                            "example": "screenshot.png"
                          },
                          "contentType": {
                            "type": "string",
                            "description": "MIME type of the file",
                            "example": "image/png"
                          },
                          "size": {
                            "type": "number",
                            "description": "File size in bytes",
                            "example": 48213
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "contentType",
                          "size"
                        ]
                      },
                      "description": "Files attached to the comment, oldest first; empty for a deleted comment"
                    },
                    "id": {
                      "type": "string",
                      "description": "Comment ID",
                      "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment this one replies to. Null for a top-level comment.",
                      "example": "post_comment_01m8rxmftrfzvv1wajtxd31nns"
                    },
                    "content": {
                      "type": "string",
                      "description": "Comment text; empty for a deleted comment",
                      "example": "This would save me an hour every week."
                    },
                    "author": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name. Null for an anonymous author or a deleted comment.",
                          "example": "Jane Cooper"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's avatar URL (http or https). Null for an anonymous author, a deleted comment or no avatar.",
                          "example": "https://example.com/avatars/jane.png"
                        },
                        "isTeamMember": {
                          "type": "boolean",
                          "description": "Whether a teammate wrote the comment"
                        }
                      },
                      "required": [
                        "name",
                        "avatarUrl",
                        "isTeamMember"
                      ],
                      "description": "The comment's author as customers see them"
                    },
                    "isAuthor": {
                      "type": "boolean",
                      "description": "Whether the caller wrote the comment (false once deleted)"
                    },
                    "canEdit": {
                      "type": "boolean",
                      "description": "Whether the caller may edit the comment: its author, while no teammate has replied publicly"
                    },
                    "canDelete": {
                      "type": "boolean",
                      "description": "Whether the caller may delete the comment: its author, while no teammate has replied publicly"
                    },
                    "pending": {
                      "type": "boolean",
                      "description": "Whether this is the caller's own comment that waits for moderation review"
                    },
                    "deleted": {
                      "type": "boolean",
                      "description": "Whether the comment was deleted; it keeps its place in the thread"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the comment was written",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was last changed. Null: never changed.",
                      "example": "2026-11-30T15:20:00.000Z"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji (test customers not counted)",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reactions on the comment, one entry per emoji, by emoji"
                    },
                    "postId": {
                      "type": "string",
                      "description": "ID of the post that holds the comment",
                      "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "True when an earlier request with the same idempotencyKey created the comment; nothing new was written"
                    }
                  },
                  "required": [
                    "attachments",
                    "id",
                    "parentId",
                    "content",
                    "author",
                    "isAuthor",
                    "canEdit",
                    "canDelete",
                    "pending",
                    "deleted",
                    "createdAt",
                    "updatedAt",
                    "reactions",
                    "postId",
                    "replayed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board or thread does not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post, parent comment or attachment does not exist or the caller cannot see it (an attachment must be the caller's unused feedback upload), or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The idempotency key was already used with a different payload, or the reply would nest deeper than 10 levels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/comments/{commentId}/reactions": {
      "put": {
        "operationId": "setQuillsWidgetCommentReaction",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Add or remove the caller's emoji reaction on a comment",
        "description": "Sets whether the caller reacts to a visible comment with one emoji. Desired state, so a retry changes nothing. Needs the board's vote tier. The widget's comment vote is the 👍 reaction. Records comment.reacted or comment.unreacted when the reaction changed. Limited to 120 requests per 10 minutes per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session writes only while the workspace allows anonymous interaction.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID (TypeID or UUID)",
              "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
            },
            "required": true,
            "description": "Comment ID (TypeID or UUID)",
            "name": "commentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emoji": {
                    "type": "string",
                    "enum": [
                      "👍",
                      "❤️",
                      "🎉",
                      "😄",
                      "😕",
                      "👀",
                      "🚀"
                    ],
                    "description": "Reaction emoji",
                    "example": "👍"
                  },
                  "reacted": {
                    "type": "boolean",
                    "description": "Desired state: true to add the reaction, false to remove it",
                    "example": true
                  }
                },
                "required": [
                  "emoji",
                  "reacted"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The comment's reactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "commentId": {
                      "type": "string",
                      "description": "Comment ID",
                      "example": "post_comment_01m8rxmftrfzvv1waekkggxczh"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request added or removed the reaction; false when it was already in that state"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji (test customers not counted)",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reactions on the comment, one entry per emoji, by emoji"
                    }
                  },
                  "required": [
                    "commentId",
                    "changed",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the board or thread does not allow the action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post or comment does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/changelog/unread": {
      "get": {
        "operationId": "getQuillsWidgetChangelogUnread",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Count the changelog entries that the caller has not read",
        "description": "Counts the published entries that the caller may see and that were published after its read mark (or, before any mark, after its profile was created). At most 99. Also returns the newest unread entry not yet announced on the launcher. Zero and no announcement without a customer profile. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session works.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "categoryIds",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "minItems": 1,
                  "maxItems": 20
                }
              ],
              "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas."
            },
            "required": false,
            "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas.",
            "name": "categories",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The unread count and the launcher announcement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "number",
                      "description": "Number of unread entries, capped at 99",
                      "example": 3
                    },
                    "announce": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Changelog entry ID",
                          "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
                        },
                        "title": {
                          "type": "string",
                          "description": "Entry title",
                          "example": "Dark mode is here"
                        }
                      },
                      "required": [
                        "id",
                        "title"
                      ],
                      "description": "The newest unread entry that the caller may see and has not been shown on the launcher yet. Null: none."
                    },
                    "autoOpen": {
                      "type": "boolean",
                      "description": "Whether to open the widget to `announce` instead of showing its title (changelog setting widgetAutoOpen). False when announce is null."
                    }
                  },
                  "required": [
                    "count",
                    "announce",
                    "autoOpen"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/changelog/read": {
      "put": {
        "operationId": "markQuillsWidgetChangelogRead",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Mark every changelog entry read for the caller",
        "description": "Moves the caller's changelog read mark to now. Entries published later count as unread. Idempotent apart from the new timestamp; records no event. With `categoryIds` or `categories`, it moves only that category scope's mark and leaves the others. Limited to 120 requests per 10 minutes per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "categoryIds",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "minItems": 1,
                  "maxItems": 20
                }
              ],
              "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas."
            },
            "required": false,
            "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas.",
            "name": "categories",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's new read mark",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lastReadAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The caller's new read mark",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "lastReadAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/changelog/announced": {
      "put": {
        "operationId": "markQuillsWidgetChangelogAnnounced",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Record that the launcher showed the caller the newest entry",
        "description": "Moves the caller's announced mark to now, so the launcher shows each entry's title once. The read mark and the unread count do not change. Records no event. With `categoryIds` or `categories`, it moves only that category scope's mark and leaves the others. Limited to 120 requests per 10 minutes per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "categoryIds",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "minItems": 1,
                  "maxItems": 20
                }
              ],
              "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas."
            },
            "required": false,
            "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas.",
            "name": "categories",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's new announced mark",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "announcedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "The caller's new announced mark",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "announcedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/changelog/{entryId}/reactions": {
      "put": {
        "operationId": "setQuillsWidgetChangelogReaction",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Add or remove the caller's emoji reaction on a changelog entry",
        "description": "Sets whether the caller reacts to a visible published changelog entry with one emoji. Desired state, from the comment reaction emoji set, so a retry changes nothing. One reaction per caller, entry and emoji. Without sign-in only a widget visitor of a workspace that allows anonymous interaction reacts. Records changelog.reacted or changelog.unreacted when the reaction changed. Limited to 120 requests per 10 minutes per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog entry ID (TypeID or UUID)",
              "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
            },
            "required": true,
            "description": "Changelog entry ID (TypeID or UUID)",
            "name": "entryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emoji": {
                    "type": "string",
                    "enum": [
                      "👍",
                      "❤️",
                      "🎉",
                      "😄",
                      "😕",
                      "👀",
                      "🚀"
                    ],
                    "description": "Reaction emoji",
                    "example": "🎉"
                  },
                  "reacted": {
                    "type": "boolean",
                    "description": "Desired state: true to add the reaction, false to remove it",
                    "example": true
                  }
                },
                "required": [
                  "emoji",
                  "reacted"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The entry's reactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entryId": {
                      "type": "string",
                      "description": "Changelog entry ID",
                      "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request added or removed the reaction; false when it was already in that state"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji",
                            "example": "🎉"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji (test customers not counted)",
                            "example": 8
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reactions on the entry, one entry per emoji, by emoji"
                    }
                  },
                  "required": [
                    "entryId",
                    "changed",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal's access rules do not admit the caller, or the caller is an anonymous visitor where anonymous interaction is off",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No published entry with this ID is visible to the caller, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/changelog/subscription": {
      "get": {
        "operationId": "getQuillsWidgetChangelogSubscription",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get the caller's changelog subscription",
        "description": "Returns whether the caller gets updates about new changelog entries. subscribed is false for an anonymous visitor. 404 while the widget or the portal's changelog tab is off. Send the widget session token as `Authorization: Bearer <token>`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the caller hears about new changelog entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscribed": {
                      "type": "boolean",
                      "description": "Whether the caller has a changelog subscription that was not unsubscribed"
                    }
                  },
                  "required": [
                    "subscribed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or a private portal does not admit an anonymous session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Widget or its changelog tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "subscribeQuillsWidgetChangelog",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Subscribe the caller to the changelog",
        "description": "Subscribes the caller to updates about new changelog entries. An explicit subscribe also undoes an earlier unsubscribe; a retry changes nothing. Records no event. Limited to 30 requests per 10 minutes per client IP and workspace. Only a visitor that the host app identified, so updates reach their address. Send the widget session token as `Authorization: Bearer <token>`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller is subscribed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscribed": {
                      "type": "boolean",
                      "description": "Always true: the caller is subscribed"
                    }
                  },
                  "required": [
                    "subscribed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, a private portal does not admit the caller, or the visitor is anonymous",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Widget or its changelog tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unsubscribeQuillsWidgetChangelog",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Unsubscribe the caller from the changelog",
        "description": "Ends the caller's changelog subscription. Keeps the row with an unsubscribe time, so an import or auto-subscribe never subscribes the caller again. A retry changes nothing; records no event. Send the widget session token as `Authorization: Bearer <token>`; an anonymous visitor gets changed false.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a subscription ended",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request ended an active subscription; false when there was none"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or a private portal does not admit an anonymous session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Widget or its changelog tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/changelog": {
      "get": {
        "operationId": "listQuillsWidgetChangelog",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List the published changelog entries that the caller may see",
        "description": "Lists one page of published changelog entries that the caller may see, newest first by the shown date. Drafts, scheduled and deleted entries never show; an entry or category limited to segments shows only to a signed-in member of one of them, and a changelog set to signed-in readers shows nothing without sign-in. content is the stored text, not sanitized HTML. With locale, an entry that has a version in the reader's language returns it. Offset pagination: pass nextOffset as offset. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session works. 404 while the widget is off; on a private portal, an anonymous session gets 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "Number of entries to skip; use nextOffset from the previous page",
              "example": 0
            },
            "required": false,
            "description": "Number of entries to skip; use nextOffset from the previous page",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of entries to return",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of entries to return",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 35,
              "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
              "description": "The reader's language as a BCP 47 tag; only its language part is used. An entry with a version in this language returns it; others return their own text.",
              "example": "fr-CA"
            },
            "required": false,
            "description": "The reader's language as a BCP 47 tag; only its language part is used. An entry with a version in this language returns it; others return their own text.",
            "name": "locale",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "categoryIds",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "minItems": 1,
                  "maxItems": 20
                }
              ],
              "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas."
            },
            "required": false,
            "description": "Category names (case-insensitive) or changelog_category IDs to scope the feed (1..20 items, each 1..100 chars). Pass repeated ?categories=A&categories=B to preserve commas.",
            "name": "categories",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Changelog entry ID",
                            "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
                          },
                          "title": {
                            "type": "string",
                            "description": "Entry title, in the reader's language when locale matched a version",
                            "example": "Dark mode is here"
                          },
                          "content": {
                            "type": "string",
                            "description": "Entry body as stored (not sanitized HTML), in the reader's language when locale matched a version",
                            "example": "You can now switch the dashboard to a dark theme."
                          },
                          "locale": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The language of the version that a teammate wrote for the reader's `locale`; null for the entry's own text, the default language",
                            "example": "fr"
                          },
                          "publishedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Date shown for the entry: its display date when set, else when it was published",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Author's display name",
                                "example": "Alex Morgan"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's avatar URL (http or https). Null: none.",
                                "example": "https://example.com/avatars/alex.png"
                              }
                            },
                            "required": [
                              "name",
                              "avatarUrl"
                            ],
                            "description": "The teammate who wrote the entry. Null when unknown."
                          },
                          "categories": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Changelog category ID",
                                  "example": "changelog_category_01m8rxmftrfzvv1wb6vk0vjdhc"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Category name",
                                  "example": "New features"
                                },
                                "color": {
                                  "type": "string",
                                  "description": "Category color as a hex code",
                                  "example": "#22c55e"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "color"
                              ]
                            },
                            "description": "The entry's categories, by category position"
                          },
                          "linkedPosts": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Post ID",
                                  "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                                },
                                "title": {
                                  "type": "string",
                                  "description": "Post title",
                                  "example": "Dark mode for the dashboard"
                                },
                                "voteCount": {
                                  "type": "number",
                                  "description": "Number of counted votes. Left out when the post's board hides vote counts.",
                                  "example": 17
                                },
                                "stage": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "open",
                                    "planned",
                                    "in_progress",
                                    "shipped",
                                    null
                                  ],
                                  "description": "Public stage of the post's status. Null for a closed status.",
                                  "example": "shipped"
                                }
                              },
                              "required": [
                                "id",
                                "title",
                                "stage"
                              ]
                            },
                            "description": "Feedback posts that the entry ships and that the caller may see, in the order they were linked"
                          },
                          "requesterCount": {
                            "type": "number",
                            "description": "Distinct people who voted on the linked posts that the caller may see, on boards that show vote counts"
                          },
                          "reactions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "emoji": {
                                  "type": "string",
                                  "description": "Reaction emoji",
                                  "example": "🎉"
                                },
                                "count": {
                                  "type": "number",
                                  "description": "Number of people who reacted with this emoji (test customers not counted)",
                                  "example": 8
                                },
                                "reacted": {
                                  "type": "boolean",
                                  "description": "Whether the caller reacted with this emoji"
                                }
                              },
                              "required": [
                                "emoji",
                                "count",
                                "reacted"
                              ]
                            },
                            "description": "Reactions on the entry, one entry per emoji, by emoji"
                          },
                          "unread": {
                            "type": "boolean",
                            "description": "Published after the caller last marked the changelog read. False without a profile."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "content",
                          "locale",
                          "publishedAt",
                          "author",
                          "categories",
                          "linkedPosts",
                          "requesterCount",
                          "reactions",
                          "unread"
                        ]
                      },
                      "description": "Entries, newest shown date first"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "offset for the next page. Null on the last page.",
                      "example": 20
                    }
                  },
                  "required": [
                    "entries",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The portal's changelog tab is off, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/changelog/{entryId}": {
      "get": {
        "operationId": "getQuillsWidgetChangelogEntry",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get a published changelog entry",
        "description": "Returns one published changelog entry that the caller may see, with the same visibility rules as the list. With locale, the entry's version in the reader's language when a teammate wrote one. Send the widget session token as `Authorization: Bearer <token>`; an anonymous session works. 404 while the widget is off; on a private portal, an anonymous session gets 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog entry ID (TypeID or UUID)",
              "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
            },
            "required": true,
            "description": "Changelog entry ID (TypeID or UUID)",
            "name": "entryId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 35,
              "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
              "description": "The reader's language as a BCP 47 tag; only its language part is used. An entry with a version in this language returns it; others return their own text.",
              "example": "fr-CA"
            },
            "required": false,
            "description": "The reader's language as a BCP 47 tag; only its language part is used. An entry with a version in this language returns it; others return their own text.",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The entry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Changelog entry ID",
                      "example": "changelog_01m8rxmftrfzvv1waradcf35nv"
                    },
                    "title": {
                      "type": "string",
                      "description": "Entry title, in the reader's language when locale matched a version",
                      "example": "Dark mode is here"
                    },
                    "content": {
                      "type": "string",
                      "description": "Entry body as stored (not sanitized HTML), in the reader's language when locale matched a version",
                      "example": "You can now switch the dashboard to a dark theme."
                    },
                    "locale": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The language of the version that a teammate wrote for the reader's `locale`; null for the entry's own text, the default language",
                      "example": "fr"
                    },
                    "publishedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Date shown for the entry: its display date when set, else when it was published",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Author's display name",
                          "example": "Alex Morgan"
                        },
                        "avatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's avatar URL (http or https). Null: none.",
                          "example": "https://example.com/avatars/alex.png"
                        }
                      },
                      "required": [
                        "name",
                        "avatarUrl"
                      ],
                      "description": "The teammate who wrote the entry. Null when unknown."
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Changelog category ID",
                            "example": "changelog_category_01m8rxmftrfzvv1wb6vk0vjdhc"
                          },
                          "name": {
                            "type": "string",
                            "description": "Category name",
                            "example": "New features"
                          },
                          "color": {
                            "type": "string",
                            "description": "Category color as a hex code",
                            "example": "#22c55e"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "The entry's categories, by category position"
                    },
                    "linkedPosts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01m8rxmftqfzvv1w8t6rzanvpn"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Dark mode for the dashboard"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of counted votes. Left out when the post's board hides vote counts.",
                            "example": 17
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "open",
                              "planned",
                              "in_progress",
                              "shipped",
                              null
                            ],
                            "description": "Public stage of the post's status. Null for a closed status.",
                            "example": "shipped"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "stage"
                        ]
                      },
                      "description": "Feedback posts that the entry ships and that the caller may see, in the order they were linked"
                    },
                    "requesterCount": {
                      "type": "number",
                      "description": "Distinct people who voted on the linked posts that the caller may see, on boards that show vote counts"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji",
                            "example": "🎉"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji (test customers not counted)",
                            "example": 8
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reactions on the entry, one entry per emoji, by emoji"
                    },
                    "unread": {
                      "type": "boolean",
                      "description": "Published after the caller last marked the changelog read. False without a profile."
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "locale",
                    "publishedAt",
                    "author",
                    "categories",
                    "linkedPosts",
                    "requesterCount",
                    "reactions",
                    "unread"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked or the portal's access rules do not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No published entry with this ID is visible to the caller, the portal's changelog tab is off, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/post-draft/improve": {
      "post": {
        "operationId": "improveQuillsWidgetPostDraft",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Suggest a title and a board for a draft post",
        "description": "Asks the workspace's AI model for a title written from the customer's own words and for one of the boards that take the caller's posts (the first 50 by name reach the model). The customer's text is not changed and nothing is saved; the customer confirms by submitting the post. Uses the workspace's AI budget and logs the usage. 409 when AI is not configured or the workspace reached its monthly AI limit, 502 when the provider fails. Limited to 10 requests per 10 minutes per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "The customer's draft title; may be empty when details is set",
                    "example": "csv export"
                  },
                  "details": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "The customer's draft body; may be empty when title is set",
                    "example": "I need to export all posts to a spreadsheet every month."
                  },
                  "boardId": {
                    "type": "string",
                    "description": "Board that the customer already picked. It must take the caller's posts; the answer falls back to it when the model picks no valid board.",
                    "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                  },
                  "boardIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
                      "example": "board_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50
                  }
                },
                "required": [
                  "title",
                  "details"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The suggested title and board; nothing is saved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "maxLength": 200,
                      "description": "Suggested post title, in the language of the draft",
                      "example": "Monthly CSV export of all posts"
                    },
                    "boardId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Suggested board: the model's pick if it takes the caller's posts, else the boardId sent. Null when neither applies.",
                      "example": "board_01m8rxmftrfzvv1w9eq8gdrwzq"
                    },
                    "boardName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the suggested board. Null when boardId is null.",
                      "example": "Feature requests"
                    }
                  },
                  "required": [
                    "title",
                    "boardId",
                    "boardName"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The account is blocked, the portal does not admit the caller, or no board (or not the given board) takes the caller's posts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The given board does not exist or the caller cannot see it, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "AI is not configured, or the workspace reached its monthly AI limit; The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The AI provider failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/help/categories": {
      "get": {
        "operationId": "listQuillsWidgetHelpCategories",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List the help categories for the widget",
        "description": "Lists the public help categories the caller may see, with article counts. Works without a widget session; send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>` to also see content gated to an identified visitor's segments. Needs the help center module and the widget on, and a private portal must admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "A BCP-47 tag; an unsupported or disabled locale reads the default locale",
              "example": "pt-BR"
            },
            "required": false,
            "description": "A BCP-47 tag; an unsupported or disabled locale reads the default locale",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Public categories with article counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "locale": {
                      "type": "string",
                      "description": "The help center locale the content is in: the requested locale when enabled, else the default locale",
                      "example": "en"
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterCategory"
                      },
                      "description": "The visible categories"
                    }
                  },
                  "required": [
                    "locale",
                    "categories"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or widget is off, the caller may not open a private portal, or the category or article is not visible; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/help/articles": {
      "get": {
        "operationId": "listQuillsWidgetHelpArticles",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List help articles for the widget",
        "description": "Lists all public articles, or the direct articles of one category, in page order; paginate with offset and nextOffset. Items leave out the body. Works without a widget session; send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>` to also see content gated to an identified visitor's segments. Needs the help center module and the widget on, and a private portal must admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "A BCP-47 tag; an unsupported or disabled locale reads the default locale",
              "example": "pt-BR"
            },
            "required": false,
            "description": "A BCP-47 tag; an unsupported or disabled locale reads the default locale",
            "name": "locale",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Lists only the direct articles of this category. Omit for all public articles.",
              "example": "kb_category_01m8rxfrbhfzr9r83a29m5ke14"
            },
            "required": false,
            "description": "Lists only the direct articles of this category. Omit for all public articles.",
            "name": "categoryId",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 100000,
              "default": 0,
              "description": "Number of articles to skip; pass the previous nextOffset",
              "example": 0
            },
            "required": false,
            "description": "Number of articles to skip; pass the previous nextOffset",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of articles to return",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of articles to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of articles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "locale": {
                      "type": "string",
                      "description": "The help center locale the content is in: the requested locale when enabled, else the default locale",
                      "example": "en"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterArticleSummary"
                      },
                      "description": "One page of articles, in page order"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The offset of the next page. Null on the last page.",
                      "example": 50
                    }
                  },
                  "required": [
                    "locale",
                    "articles",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or widget is off, the caller may not open a private portal, or the category or article is not visible; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/help/articles/{ref}": {
      "get": {
        "operationId": "getQuillsWidgetHelpArticle",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get a help article for the widget by ID or slug",
        "description": "Returns one public article with its body. `ref` is an article TypeID or slug. Without a published translation in the locale the article comes in the default locale; `locale` names the one used. `helpful` is the visitor's own vote. Works without a widget session; send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>` to also see content gated to an identified visitor's segments. Needs the help center module and the widget on, and a private portal must admit the caller.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[a-z0-9][a-z0-9_-]*$",
              "description": "The article ID or slug",
              "example": "article_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The article ID or slug",
            "name": "ref",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "A BCP-47 tag; an unsupported or disabled locale reads the default locale",
              "example": "pt-BR"
            },
            "required": false,
            "description": "A BCP-47 tag; an unsupported or disabled locale reads the default locale",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The article",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/QuillsPublicHelpCenterArticle"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "locale": {
                          "type": "string",
                          "description": "The help center locale the content is in: the requested locale when enabled, else the default locale",
                          "example": "en"
                        },
                        "helpful": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "The visitor's own vote: true for helpful, false for not helpful. Null without a vote or a session.",
                          "example": null
                        }
                      },
                      "required": [
                        "locale",
                        "helpful"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or widget is off, the caller may not open a private portal, or the category or article is not visible; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/help/articles/{articleId}/feedback": {
      "put": {
        "operationId": "setQuillsWidgetHelpArticleFeedback",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Set the widget visitor's helpful or not-helpful vote on an article",
        "description": "Sets the visitor's helpful or not-helpful vote on a public article: one vote per visitor, and a repeated vote changes nothing. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. Needs the help center module and the widget on, and a private portal must admit the caller. Records a `help_center.article_feedback_recorded` event when the vote changed. Limited to 30 attempts per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The article ID",
              "example": "article_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The article ID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "helpful": {
                    "type": "boolean",
                    "description": "true: helpful. false: not helpful.",
                    "example": true
                  }
                },
                "required": [
                  "helpful"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The visitor's vote",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "feedbackId": {
                      "type": "string",
                      "description": "The vote's handle; an anonymous visitor needs it to add a reason",
                      "example": "kb_article_feedback_01jd3x7y9z1a3b5c7d9e1f3g5h"
                    },
                    "helpful": {
                      "type": "boolean",
                      "description": "The vote now recorded: true for helpful, false for not helpful"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "False when the caller's existing vote already had this value and nothing changed"
                    }
                  },
                  "required": [
                    "feedbackId",
                    "helpful",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or widget is off, or the article is not visible to the caller; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another vote by the same visitor was recorded at the same time; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/kb-search": {
      "post": {
        "operationId": "searchQuillsWidgetHelp",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Search help articles from the widget",
        "description": "Searches the public articles the caller may see with hybrid search (full-text, prefix, typo tolerance and synonyms), best match first. Returns queryId for click-through tracking when the search was recorded. Works without a widget session; send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>` to also see content gated to an identified visitor's segments. Needs the help center module and the widget on, and a private portal must admit the caller. Limited to 60 requests per client IP and workspace per minute.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "What the visitor typed, trimmed, up to 200 characters. Web-search syntax works; matching also covers word prefixes, close spellings in titles and the workspace's synonyms.",
                    "example": "reset pasword"
                  },
                  "locale": {
                    "type": "string",
                    "description": "A BCP-47 tag; an unsupported or disabled locale reads the default locale",
                    "example": "pt-BR"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20,
                    "default": 10,
                    "description": "Maximum number of articles to return",
                    "example": 10
                  },
                  "record": {
                    "type": "boolean",
                    "default": true,
                    "description": "false: leave the search out of the help-center analytics, for suggestions while typing"
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Matching articles, best first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "locale": {
                      "type": "string",
                      "description": "The help center locale the content is in: the requested locale when enabled, else the default locale",
                      "example": "en"
                    },
                    "queryId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The recorded search, for recordQuillsWidgetHelpSearchClick. Null when the search was not recorded.",
                      "example": "3f2b8c1e-9a4d-4e7b-8c2f-1a6d5e9b0c3a"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterSearchHit"
                      },
                      "description": "Matching articles, best match first"
                    }
                  },
                  "required": [
                    "locale",
                    "queryId",
                    "articles"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or widget is off, or the caller may not open a private portal; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/kb-search/{queryId}/click": {
      "post": {
        "operationId": "recordQuillsWidgetHelpSearchClick",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Record which article a widget visitor clicked from search results",
        "description": "Records the article that the visitor opened from a recorded search, for search analytics. Only the first click of a search is kept; later clicks answer recorded without a change. Works without a widget session; send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>` to also see content gated to an identified visitor's segments. Needs the help center module and the widget on, and a private portal must admit the caller. Records no event. Limited to 60 requests per client IP and workspace per minute.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The queryId from searchQuillsWidgetHelp",
              "example": "3f2b8c1e-9a4d-4e7b-8c2f-1a6d5e9b0c3a"
            },
            "required": true,
            "description": "The queryId from searchQuillsWidgetHelp",
            "name": "queryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "articleId": {
                    "type": "string",
                    "description": "The article the visitor opened",
                    "example": "article_01m8rxfrbhfzr9r837k90wcggm"
                  }
                },
                "required": [
                  "articleId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Click recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recorded": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true on success",
                      "example": true
                    }
                  },
                  "required": [
                    "recorded"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or widget is off, the search query is unknown, or the article is not visible to the caller; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc": {
      "get": {
        "operationId": "getQuillsPublicHelpCenter",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the public help-center home page",
        "description": "Gets everything the help-center home page shows: homepage text in the locale, header links, search engine settings, the public categories and the six most-viewed public articles. Anyone can call it, signed in or not, when the portal and its help center are on and the visitor passes the portal's access rules. A signed-in customer also sees categories and articles limited to their segments; drafts and scheduled articles never show. In an additional locale, only categories with a translated name and articles with a published translation appear.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "es",
                "ar",
                "ru",
                "pt-br",
                "zh-cn",
                "zh-tw",
                "nl",
                "pl",
                "th",
                "uk"
              ],
              "description": "The locale to read: `en` (the default) or an enabled additional locale. The default locale (en) when left out. A supported locale that is not enabled answers 404.",
              "example": "fr"
            },
            "required": false,
            "description": "The locale to read: `en` (the default) or an enabled additional locale. The default locale (en) when left out. A supported locale that is not enabled answers 404.",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The home page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "locale": {
                      "type": "string",
                      "description": "The locale of the response",
                      "example": "en"
                    },
                    "locales": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Every locale the help center offers, the default `en` first",
                      "example": [
                        "en",
                        "fr"
                      ]
                    },
                    "homepageTitle": {
                      "type": "string",
                      "description": "Homepage heading in the locale, or the default-locale heading when the locale has none",
                      "example": "How can we help?"
                    },
                    "homepageDescription": {
                      "type": "string",
                      "description": "Homepage text in the locale, or the default-locale text when the locale has none",
                      "example": "Search our knowledge base or browse by category"
                    },
                    "searchPlaceholder": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Search box placeholder for an additional locale; null in the default locale or when not set",
                      "example": null
                    },
                    "headerLinks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string",
                            "description": "Link text",
                            "example": "Status"
                          },
                          "url": {
                            "type": "string",
                            "description": "Absolute http(s) URL or a path starting with `/`",
                            "example": "https://status.example.com"
                          }
                        },
                        "required": [
                          "label",
                          "url"
                        ]
                      },
                      "description": "Header links, in display order"
                    },
                    "seo": {
                      "type": "object",
                      "properties": {
                        "metaDescription": {
                          "type": "string",
                          "description": "Meta description for the home page; empty when not set",
                          "example": "Guides and answers for Acme customers"
                        },
                        "indexable": {
                          "type": "boolean",
                          "description": "Whether search engines may index the help center"
                        },
                        "structuredDataEnabled": {
                          "type": "boolean",
                          "description": "Whether pages should include structured data for search engines"
                        }
                      },
                      "required": [
                        "metaDescription",
                        "indexable",
                        "structuredDataEnabled"
                      ],
                      "description": "Search engine settings for the page"
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterCategory"
                      },
                      "description": "Public categories with at least one public article, flat and sorted by position (use `parentId` to nest)"
                    },
                    "popular": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterArticleSummary"
                      },
                      "description": "Up to six public articles, most viewed first"
                    }
                  },
                  "required": [
                    "locale",
                    "locales",
                    "homepageTitle",
                    "homepageDescription",
                    "searchPlaceholder",
                    "headerLinks",
                    "seo",
                    "categories",
                    "popular"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or portal is off, the visitor fails the portal's access rules, the locale is not enabled, or the page is not visible to the visitor; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/categories/{categorySlug}": {
      "get": {
        "operationId": "getQuillsPublicHelpCenterCategory",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a public help-center category page by slug",
        "description": "Gets a category page by slug: the category, its public articles, its public subcategories with their articles, and every public category for navigation. `canonicalPath` is the collection URL, which uses the stable numeric ID. Only categories with at least one public article are found. Anyone can call it, under the same portal access and segment rules as the home page.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
              "description": "URL slug of the category",
              "example": "billing"
            },
            "required": true,
            "description": "URL slug of the category",
            "name": "categorySlug",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "es",
                "ar",
                "ru",
                "pt-br",
                "zh-cn",
                "zh-tw",
                "nl",
                "pl",
                "th",
                "uk"
              ],
              "description": "The locale to read: `en` (the default) or an enabled additional locale. The default locale (en) when left out. A supported locale that is not enabled answers 404.",
              "example": "fr"
            },
            "required": false,
            "description": "The locale to read: `en` (the default) or an enabled additional locale. The default locale (en) when left out. A supported locale that is not enabled answers 404.",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The category page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "canonicalPath": {
                      "type": "string",
                      "description": "Canonical help-center path of the collection page in the response locale",
                      "example": "/hc/en/collections/12-billing"
                    },
                    "category": {
                      "$ref": "#/components/schemas/QuillsPublicHelpCenterCategory"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterArticleSummary"
                      },
                      "description": "Public articles filed directly in the category, in page order, at most 100"
                    },
                    "subcategories": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/QuillsPublicHelpCenterCategory"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "articles": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/QuillsPublicHelpCenterArticleSummary"
                                },
                                "description": "Public articles filed directly in the subcategory, in page order, at most 100"
                              }
                            },
                            "required": [
                              "articles"
                            ]
                          }
                        ]
                      },
                      "description": "Public direct subcategories, each with its public articles"
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterCategory"
                      },
                      "description": "Every public category, for navigation and breadcrumbs"
                    }
                  },
                  "required": [
                    "canonicalPath",
                    "category",
                    "articles",
                    "subcategories",
                    "categories"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or portal is off, the visitor fails the portal's access rules, the locale is not enabled, or the page is not visible to the visitor; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/collections/{idSlug}": {
      "get": {
        "operationId": "getQuillsPublicHelpCenterCollection",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a public help-center collection page",
        "description": "Gets the same page as `getQuillsPublicHelpCenterCategory`, looked up by the stable numeric URL ID. Only categories with at least one public article are found. Anyone can call it, under the same portal access and segment rules as the home page.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 220,
              "pattern": "^\\d{1,9}(-[a-z0-9-]*)?$",
              "description": "{urlId}-{slug}, for example 12-getting-started. Only the numeric URL ID is used for the lookup; the slug can be stale or left out.",
              "example": "12-getting-started"
            },
            "required": true,
            "description": "{urlId}-{slug}, for example 12-getting-started. Only the numeric URL ID is used for the lookup; the slug can be stale or left out.",
            "name": "idSlug",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "es",
                "ar",
                "ru",
                "pt-br",
                "zh-cn",
                "zh-tw",
                "nl",
                "pl",
                "th",
                "uk"
              ],
              "description": "The locale to read: `en` (the default) or an enabled additional locale. The default locale (en) when left out. A supported locale that is not enabled answers 404.",
              "example": "fr"
            },
            "required": false,
            "description": "The locale to read: `en` (the default) or an enabled additional locale. The default locale (en) when left out. A supported locale that is not enabled answers 404.",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The collection page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "canonicalPath": {
                      "type": "string",
                      "description": "Canonical help-center path of the collection page in the response locale",
                      "example": "/hc/en/collections/12-billing"
                    },
                    "category": {
                      "$ref": "#/components/schemas/QuillsPublicHelpCenterCategory"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterArticleSummary"
                      },
                      "description": "Public articles filed directly in the category, in page order, at most 100"
                    },
                    "subcategories": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/QuillsPublicHelpCenterCategory"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "articles": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/components/schemas/QuillsPublicHelpCenterArticleSummary"
                                },
                                "description": "Public articles filed directly in the subcategory, in page order, at most 100"
                              }
                            },
                            "required": [
                              "articles"
                            ]
                          }
                        ]
                      },
                      "description": "Public direct subcategories, each with its public articles"
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterCategory"
                      },
                      "description": "Every public category, for navigation and breadcrumbs"
                    }
                  },
                  "required": [
                    "canonicalPath",
                    "category",
                    "articles",
                    "subcategories",
                    "categories"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or portal is off, the visitor fails the portal's access rules, the locale is not enabled, or the page is not visible to the visitor; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/articles/{idSlug}": {
      "get": {
        "operationId": "getQuillsPublicHelpCenterArticle",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a public help-center article page",
        "description": "Gets an article page by numeric URL ID: the article with its Markdown body in the locale, the public articles of its category and every public category. Helpfulness counts are not public. In an additional locale, an article without a published translation is not found. Anyone can call it, under the same portal access and segment rules as the home page.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 220,
              "pattern": "^\\d{1,9}(-[a-z0-9-]*)?$",
              "description": "{urlId}-{slug}, for example 12-getting-started. Only the numeric URL ID is used for the lookup; the slug can be stale or left out.",
              "example": "12-getting-started"
            },
            "required": true,
            "description": "{urlId}-{slug}, for example 12-getting-started. Only the numeric URL ID is used for the lookup; the slug can be stale or left out.",
            "name": "idSlug",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "es",
                "ar",
                "ru",
                "pt-br",
                "zh-cn",
                "zh-tw",
                "nl",
                "pl",
                "th",
                "uk"
              ],
              "description": "The locale to read: `en` (the default) or an enabled additional locale. The default locale (en) when left out. A supported locale that is not enabled answers 404.",
              "example": "fr"
            },
            "required": false,
            "description": "The locale to read: `en` (the default) or an enabled additional locale. The default locale (en) when left out. A supported locale that is not enabled answers 404.",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The article page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "canonicalPath": {
                      "type": "string",
                      "description": "Canonical help-center path of the article page in the response locale",
                      "example": "/hc/en/articles/42-reset-your-password"
                    },
                    "article": {
                      "$ref": "#/components/schemas/QuillsPublicHelpCenterArticle"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterArticleSummary"
                      },
                      "description": "Public articles of the same category, this one included"
                    },
                    "categories": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterCategory"
                      },
                      "description": "Every public category, for navigation and breadcrumbs"
                    }
                  },
                  "required": [
                    "canonicalPath",
                    "article",
                    "articles",
                    "categories"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or portal is off, the visitor fails the portal's access rules, the locale is not enabled, or the page is not visible to the visitor; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/categories/{categoryId}/articles": {
      "get": {
        "operationId": "listQuillsPublicHelpCenterCategoryArticles",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the public articles of a category",
        "description": "Lists the public articles filed directly in a public category, at most 100, in page order (position, then publish time). Subcategories are not included. Anyone can call it, under the same portal access and segment rules as the home page.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Category ID: a `kb_category_` TypeID or its UUID",
              "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Category ID: a `kb_category_` TypeID or its UUID",
            "name": "categoryId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "es",
                "ar",
                "ru",
                "pt-br",
                "zh-cn",
                "zh-tw",
                "nl",
                "pl",
                "th",
                "uk"
              ],
              "description": "The locale to read: `en` (the default) or an enabled additional locale. The default locale (en) when left out. A supported locale that is not enabled answers 404.",
              "example": "fr"
            },
            "required": false,
            "description": "The locale to read: `en` (the default) or an enabled additional locale. The default locale (en) when left out. A supported locale that is not enabled answers 404.",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The category's public articles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "articles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterArticleSummary"
                      },
                      "description": "Public articles of the category, in page order"
                    }
                  },
                  "required": [
                    "articles"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or portal is off, the visitor fails the portal's access rules, the locale is not enabled, or the page is not visible to the visitor; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/editors": {
      "get": {
        "operationId": "listQuillsPublicHelpCenterEditors",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the teammates who wrote each category's public articles",
        "description": "Lists, for each category, the names of up to three teammates who wrote its public articles, most recently published first. Names only; only public articles in the default locale count, and categories without a named author are left out. Anyone can call it, under the same portal access and segment rules as the home page.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Authors by category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "categoryId": {
                            "type": "string",
                            "description": "Category ID",
                            "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "names": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Display names of up to three authors, most recently published first",
                            "example": [
                              "Ada Park",
                              "Sam Rivera"
                            ]
                          }
                        },
                        "required": [
                          "categoryId",
                          "names"
                        ]
                      },
                      "description": "Categories that have at least one named author"
                    }
                  },
                  "required": [
                    "categories"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or portal is off, or the visitor fails the portal's access rules; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/redirect": {
      "get": {
        "operationId": "resolveQuillsPublicHelpCenterRedirect",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Look up the redirect rule for an unmatched help-center path",
        "description": "Looks up the redirect rule for a help-center path that matched no page and returns the default-locale path of its target, or null when no rule matches or the target is not visible to the visitor. The path is normalized the same way rules are (repeated slashes collapsed, trailing slash dropped). Anyone can call it, under the same portal access and segment rules as the home page.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500,
              "description": "The unmatched help-center path, starting with `/`",
              "example": "/kb/old-password-guide"
            },
            "required": true,
            "description": "The unmatched help-center path, starting with `/`",
            "name": "path",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The redirect target",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "target": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Canonical default-locale path to redirect to; null when there is nothing to redirect to",
                      "example": "/hc/en/articles/42-reset-your-password"
                    }
                  },
                  "required": [
                    "target"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or portal is off, or the visitor fails the portal's access rules; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/search": {
      "post": {
        "operationId": "searchQuillsPublicHelpCenter",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Search the public help center",
        "description": "Searches the published articles a visitor can see, in the requested locale (an unsupported or disabled locale searches the default one). Combines full-text search, word-prefix matching, typo-tolerant title matching and the workspace's synonym groups, best match first. Anyone can call it, signed in or not, when the portal and its help center are on and the visitor passes the portal's access rules; a signed-in customer also sees articles limited to their segments. Unless `record` is false, the search is logged for search analytics and `queryId` identifies it for click tracking. Rate limited to 60 requests a minute per client IP address and workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "What the visitor typed, trimmed, up to 200 characters. Web-search syntax works; matching also covers word prefixes, close spellings in titles and the workspace's synonyms.",
                    "example": "reset pasword"
                  },
                  "locale": {
                    "type": "string",
                    "description": "A BCP-47 tag; an unsupported or disabled locale reads the default locale",
                    "example": "pt-BR"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20,
                    "default": 10,
                    "description": "Maximum number of articles to return",
                    "example": 10
                  },
                  "record": {
                    "type": "boolean",
                    "default": true,
                    "description": "false: leave the search out of the help-center analytics, for suggestions while typing"
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Matching articles, best first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "locale": {
                      "type": "string",
                      "description": "The locale searched: the requested one when enabled, otherwise the default",
                      "example": "en"
                    },
                    "queryId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the logged search, for `recordQuillsPublicHelpCenterSearchClick`; null when `record` was false",
                      "example": "8b2e4c6a-1d3f-4a5b-9c7e-0f2a4b6c8d1e"
                    },
                    "articles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicHelpCenterSearchHit"
                      },
                      "description": "Matching articles, best match first"
                    }
                  },
                  "required": [
                    "locale",
                    "queryId",
                    "articles"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center is off, the portal is off, or the visitor fails the portal's access rules; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/search/{queryId}/click": {
      "post": {
        "operationId": "recordQuillsPublicHelpCenterSearchClick",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Record which article a visitor clicked from a help-center search",
        "description": "Marks a logged search as clicked through to an article the visitor can see in the default locale. Only the first click on a search is kept; a later click answers success and changes nothing. Feeds the click-through numbers of the search insights. Anyone can call it, signed in or not, under the same help-center and portal access rules as search. Rate limited to 60 requests a minute per client IP address and workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The `queryId` that the search returned",
              "example": "8b2e4c6a-1d3f-4a5b-9c7e-0f2a4b6c8d1e"
            },
            "required": true,
            "description": "The `queryId` that the search returned",
            "name": "queryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "articleId": {
                    "type": "string",
                    "description": "ID of the article the visitor opened from the results",
                    "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                  }
                },
                "required": [
                  "articleId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Click recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recorded": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true: the search has a recorded click"
                    }
                  },
                  "required": [
                    "recorded"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Help center unavailable to the visitor, search not logged, or article not visible to the visitor; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/articles/{articleId}/feedback": {
      "post": {
        "operationId": "recordQuillsPublicArticleFeedback",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Record a visitor's helpful or not-helpful vote on a public article",
        "description": "Records a visitor's vote on an article they can see (published, public, past the segment gates, in the default locale). Anyone can call it, signed in or not, when the portal and its help center are on and the visitor passes the portal's access rules. A signed-in visitor gets a customer profile if needed and has one vote per article: the same value again changes nothing, and a changed vote moves the counts and clears its reason. Each anonymous vote is a new vote. Updates the article's helpful counts, which are not public. Records a `help_center.article_feedback_recorded` event when the vote changed. Rate limited to 30 requests per 10 minutes per client IP address and workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "helpful": {
                    "type": "boolean",
                    "description": "True for a helpful vote, false for not helpful"
                  }
                },
                "required": [
                  "helpful"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The vote",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "feedbackId": {
                      "type": "string",
                      "description": "The vote's handle; an anonymous visitor needs it to add a reason",
                      "example": "kb_article_feedback_01jd3x7y9z1a3b5c7d9e1f3g5h"
                    },
                    "helpful": {
                      "type": "boolean",
                      "description": "The vote now recorded: true for helpful, false for not helpful"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "False when the caller's existing vote already had this value and nothing changed"
                    }
                  },
                  "required": [
                    "feedbackId",
                    "helpful",
                    "changed"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center or portal is off, the visitor fails the portal's access rules, or the article is not visible to the visitor; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A concurrent vote by the same visitor; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/feedback/{feedbackId}/reason": {
      "post": {
        "operationId": "submitQuillsPublicArticleFeedbackReason",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Add a reason to a visitor's not-helpful vote",
        "description": "Adds a free-text reason to a not-helpful article vote, once per vote; a reason is never replaced. No sign-in is needed when the portal and its help center are on and the visitor passes the portal's access rules. An anonymous vote takes a reason from whoever holds its ID; a signed-in visitor's vote only from that visitor. Records a `help_center.article_feedback_reason_added` event. Rate limited to 10 requests per 10 minutes per client IP address and workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the not-helpful vote, as returned when the vote was recorded",
              "example": "kb_article_feedback_01jd3k8m2q5r7t9v1w3x5y7z9k"
            },
            "required": true,
            "description": "ID of the not-helpful vote, as returned when the vote was recorded",
            "name": "feedbackId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "Why the article did not help, 1 to 1,000 characters after trimming. Visible to teammates only.",
                    "example": "The steps don't match the current settings page."
                  }
                },
                "required": [
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The vote that took the reason",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "feedbackId": {
                      "type": "string",
                      "description": "ID of the vote that took the reason",
                      "example": "kb_article_feedback_01jd3k8m2q5r7t9v1w3x5y7z9k"
                    },
                    "articleId": {
                      "type": "string",
                      "description": "ID of the voted article",
                      "example": "article_01jd3k8m2q5r7t9v1w3x5y7z9m"
                    }
                  },
                  "required": [
                    "feedbackId",
                    "articleId"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Help center not found, or no not-helpful vote of the caller with this ID awaits a reason (it has one already, was helpful, or belongs to another visitor); Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/hc/sitemap.xml": {
      "get": {
        "operationId": "getQuillsPublicHelpCenterSitemap",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the public help-center sitemap",
        "description": "Returns the sitemap XML of the help center's home pages, collections and articles in every enabled locale, with the other locales of each page as hreflang alternates. No sign-in is needed; the sitemap is built as an anonymous visitor sees the help center, so gated content never appears. URLs are absolute portal URLs. Answers 404 when the help center is off, or search-engine indexing or the sitemap is turned off. At most 50,000 URLs.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The sitemap document",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "description": "Sitemap protocol XML document (`urlset`)"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The help center is off, or indexing or the sitemap is turned off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/status": {
      "get": {
        "operationId": "getQuillsPublicStatusPage",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the public status page",
        "description": "Returns the public status page as the caller may see it: visible components by group, the overall status they derive, open incidents and running maintenance, upcoming maintenance, incidents resolved in the last 14 days and 90-day uptime for components that show it. At most 50 open and 50 upcoming items. Sign-in is optional. The status page must be published with the statusPage module on, the private-portal gate must pass and the page audience must admit the caller; otherwise the route answers 404, as for a missing incident. Components gated to segments, and incidents that affect only such components, are hidden from non-members.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The status page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pageDescription": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Description from the status page settings. Null when none is set.",
                      "example": "Live status of the Example Co. app and API."
                    },
                    "topLevelStatus": {
                      "type": "string",
                      "enum": [
                        "operational",
                        "under_maintenance",
                        "degraded_performance",
                        "partial_outage",
                        "major_outage"
                      ],
                      "description": "Overall status: the most severe status of the components the caller can see, `operational` when there are none. Values: `operational`, `under_maintenance`, `degraded_performance`, `partial_outage`, `major_outage`."
                    },
                    "activeIncidentCount": {
                      "type": "number",
                      "description": "Number of open incidents in `activeIncidents`, running maintenance windows excluded",
                      "example": 1
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Group ID",
                            "example": "status_group_01jd3j8fssz5awsh8vhtpre95b"
                          },
                          "name": {
                            "type": "string",
                            "description": "Group name",
                            "example": "Core services"
                          },
                          "collapsed": {
                            "type": "boolean",
                            "description": "Whether the page shows the group collapsed"
                          },
                          "components": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Component ID",
                                  "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Component name",
                                  "example": "API"
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Short description shown with the component. Null when none is set.",
                                  "example": "REST API and webhooks"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "operational",
                                    "under_maintenance",
                                    "degraded_performance",
                                    "partial_outage",
                                    "major_outage"
                                  ],
                                  "description": "Component status, least to most severe. `operational`: working normally. `under_maintenance`: in planned maintenance; counts as up for uptime. `degraded_performance`: working, but slower or less reliable than usual. `partial_outage`: unavailable for some users or functions. `major_outage`: unavailable for most or all users."
                                },
                                "showUptime": {
                                  "type": "boolean",
                                  "description": "Whether the page shows the component's uptime. When true, `uptime` has a series for it."
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "description",
                                "status",
                                "showUptime"
                              ]
                            },
                            "description": "Visible components in the group, in position order"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "collapsed",
                          "components"
                        ]
                      },
                      "description": "Groups with at least one visible component, in position order"
                    },
                    "ungroupedComponents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Component ID",
                            "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                          },
                          "name": {
                            "type": "string",
                            "description": "Component name",
                            "example": "API"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Short description shown with the component. Null when none is set.",
                            "example": "REST API and webhooks"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "operational",
                              "under_maintenance",
                              "degraded_performance",
                              "partial_outage",
                              "major_outage"
                            ],
                            "description": "Component status, least to most severe. `operational`: working normally. `under_maintenance`: in planned maintenance; counts as up for uptime. `degraded_performance`: working, but slower or less reliable than usual. `partial_outage`: unavailable for some users or functions. `major_outage`: unavailable for most or all users."
                          },
                          "showUptime": {
                            "type": "boolean",
                            "description": "Whether the page shows the component's uptime. When true, `uptime` has a series for it."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "status",
                          "showUptime"
                        ]
                      },
                      "description": "Visible components in no group, in position order"
                    },
                    "activeIncidents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicStatusIncident"
                      },
                      "description": "Open incidents and running maintenance windows (`in_progress` or `verifying`), latest start first, at most 50"
                    },
                    "upcomingMaintenance": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicStatusIncident"
                      },
                      "description": "Scheduled maintenance windows, earliest planned start first and those without one last, at most 50"
                    },
                    "recentIncidents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "description": "UTC day the incidents started, in YYYY-MM-DD form",
                            "example": "2026-11-18"
                          },
                          "incidents": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/QuillsPublicStatusIncident"
                            },
                            "description": "Incidents that started that day, latest start first"
                          }
                        },
                        "required": [
                          "date",
                          "incidents"
                        ]
                      },
                      "description": "Resolved incidents that started within `recentWindow`, grouped by UTC start day, newest day first. Days without incidents are left out. At most 100 incidents."
                    },
                    "recentWindow": {
                      "type": "object",
                      "properties": {
                        "start": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Start of the span: midnight UTC 14 days before today. Pass it as `before` to the history route to continue after `recentIncidents`.",
                          "example": "2026-11-17T00:00:00.000Z"
                        },
                        "days": {
                          "type": "number",
                          "description": "Length of the span in days",
                          "example": 14
                        }
                      },
                      "required": [
                        "start",
                        "days"
                      ],
                      "description": "The span that `recentIncidents` covers"
                    },
                    "uptime": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "componentId": {
                            "type": "string",
                            "description": "Component ID",
                            "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                          },
                          "days": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "UTC calendar day, in YYYY-MM-DD form",
                                  "example": "2026-11-18"
                                },
                                "worstStatus": {
                                  "type": "string",
                                  "enum": [
                                    "operational",
                                    "under_maintenance",
                                    "degraded_performance",
                                    "partial_outage",
                                    "major_outage"
                                  ],
                                  "description": "Most severe status the component had at any time that day: `operational`, `under_maintenance`, `degraded_performance`, `partial_outage` or `major_outage`"
                                },
                                "uptimePct": {
                                  "type": "number",
                                  "description": "Share of the day spent `operational` or `under_maintenance`, as a percentage from 0 to 100 rounded to two decimals. Today counts only up to now.",
                                  "example": 99.86
                                }
                              },
                              "required": [
                                "date",
                                "worstStatus",
                                "uptimePct"
                              ]
                            },
                            "description": "One entry per UTC day of the window, oldest first, ending today"
                          }
                        },
                        "required": [
                          "componentId",
                          "days"
                        ]
                      },
                      "description": "Daily uptime over the last 90 UTC days for each visible component with `showUptime` on"
                    }
                  },
                  "required": [
                    "pageDescription",
                    "topLevelStatus",
                    "activeIncidentCount",
                    "groups",
                    "ungroupedComponents",
                    "activeIncidents",
                    "upcomingMaintenance",
                    "recentIncidents",
                    "recentWindow",
                    "uptime"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The status page is not open to the caller, or the incident does not exist or is not visible to them; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/status/incidents/{incidentId}": {
      "get": {
        "operationId": "getQuillsPublicStatusIncident",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a public incident or maintenance window",
        "description": "Returns one incident or maintenance window with its timeline, as the caller may see it. A missing or deleted incident, one with no component the caller can see and a closed page all answer 404 alike. Sign-in is optional. The status page must be published with the statusPage module on, the private-portal gate must pass and the page audience must admit the caller; otherwise the route answers 404, as for a missing incident. Components gated to segments, and incidents that affect only such components, are hidden from non-members.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Incident or maintenance window ID, as a TypeID or a UUID",
              "example": "status_incident_01jd3e28jt97kb6cq643dzvmxx"
            },
            "required": true,
            "description": "Incident or maintenance window ID, as a TypeID or a UUID",
            "name": "incidentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The incident with its timeline",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsPublicStatusIncident"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The status page is not open to the caller, or the incident does not exist or is not visible to them; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/status/uptime": {
      "get": {
        "operationId": "getQuillsPublicStatusUptime",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get daily uptime for visible status components",
        "description": "Returns daily uptime over the last `windowDays` UTC days for the requested components that the caller can see. Hidden, deleted and unknown components are left out. Sign-in is optional. The status page must be published with the statusPage module on, the private-portal gate must pass and the page audience must admit the caller; otherwise the route answers 404, as for a missing incident. Components gated to segments, and incidents that affect only such components, are hidden from non-members.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated component IDs (TypeIDs or UUIDs), 1 to 50",
              "example": "status_component_11jd3kfbf5kznwj47tan9zt24m,status_component_11jd3pzx45hy43kwjrp1xpa7z3"
            },
            "required": true,
            "description": "Comma-separated component IDs (TypeIDs or UUIDs), 1 to 50",
            "name": "componentIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 90,
              "description": "Number of UTC days to cover, ending today, 1 to 365",
              "example": 90
            },
            "required": false,
            "description": "Number of UTC days to cover, ending today, 1 to 365",
            "name": "windowDays",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One series per visible component",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "series": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "componentId": {
                            "type": "string",
                            "description": "Component ID",
                            "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                          },
                          "days": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "UTC calendar day, in YYYY-MM-DD form",
                                  "example": "2026-11-18"
                                },
                                "worstStatus": {
                                  "type": "string",
                                  "enum": [
                                    "operational",
                                    "under_maintenance",
                                    "degraded_performance",
                                    "partial_outage",
                                    "major_outage"
                                  ],
                                  "description": "Most severe status the component had at any time that day: `operational`, `under_maintenance`, `degraded_performance`, `partial_outage` or `major_outage`"
                                },
                                "uptimePct": {
                                  "type": "number",
                                  "description": "Share of the day spent `operational` or `under_maintenance`, as a percentage from 0 to 100 rounded to two decimals. Today counts only up to now.",
                                  "example": 99.86
                                }
                              },
                              "required": [
                                "date",
                                "worstStatus",
                                "uptimePct"
                              ]
                            },
                            "description": "One entry per UTC day of the window, oldest first, ending today"
                          }
                        },
                        "required": [
                          "componentId",
                          "days"
                        ]
                      },
                      "description": "One series per visible requested component"
                    }
                  },
                  "required": [
                    "series"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The status page is not open to the caller, or the incident does not exist or is not visible to them; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/status/history": {
      "get": {
        "operationId": "listQuillsPublicStatusHistory",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List resolved incidents and completed maintenance",
        "description": "Lists resolved incidents and completed maintenance windows, latest start first. Pass the page's `recentWindow.start` as `before` to continue after the incidents the page lists; maintenance windows are not on the page and are always included. Uses cursor pagination: pass `nextCursor` as `cursor` for the next page. Sign-in is optional. The status page must be published with the statusPage module on, the private-portal gate must pass and the page audience must admit the caller; otherwise the route answers 404, as for a missing incident. Components gated to segments, and incidents that affect only such components, are hidden from non-members.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The previous page's `nextCursor`: returns the items that follow it, latest start first. Absent: the first page.",
              "example": "status_incident_11jd39s346q3d25vt4f5v37e3s"
            },
            "required": false,
            "description": "The previous page's `nextCursor`: returns the items that follow it, latest start first. Absent: the first page.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of items to return, 1 to 50",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of items to return, 1 to 50",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "ISO 8601 time with a UTC offset. Leaves out incidents that started at or after it; maintenance windows are not filtered. Absent: no time filter.",
              "example": "2026-11-17T00:00:00Z"
            },
            "required": false,
            "description": "ISO 8601 time with a UTC offset. Leaves out incidents that started at or after it; maintenance windows are not filtered. Absent: no time filter.",
            "name": "before",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPublicStatusIncident"
                      },
                      "description": "The page of resolved incidents and completed windows"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page: the ID of the last item on this page. Null on the last page.",
                      "example": "status_incident_11jd39s346q3d25vt4f5v37e3s"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The status page is not open to the caller, or the incident does not exist or is not visible to them; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/status/rss.xml": {
      "get": {
        "operationId": "listQuillsPublicStatusFeed",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the status RSS feed",
        "description": "Returns the status page as an RSS 2.0 feed: one item per timeline update of open incidents, scheduled and running maintenance windows and recently resolved items, plus one item for a details edit made after the latest update. Newest first, at most `limit` items; the newest item of each open incident or window always stays. Links point to the portal pages of the web app (/portal/{workspaceId}). Sign-in is optional. The status page must be published with the statusPage module on, the private-portal gate must pass and the page audience must admit the caller; otherwise the route answers 404, as for a missing incident. Components gated to segments, and incidents that affect only such components, are hidden from non-members.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of feed items, 1 to 100",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of feed items, 1 to 100",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The RSS document",
            "content": {
              "application/rss+xml": {
                "schema": {
                  "type": "string",
                  "description": "RSS 2.0 XML document"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The status page is not open to the caller, or the incident does not exist or is not visible to them; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/status/subscription": {
      "get": {
        "operationId": "getQuillsMyStatusSubscription",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the caller's status-page subscription",
        "description": "Returns the signed-in caller's status page subscription; a caller who never subscribed gets `subscribed: false` with scope `page`. Requires a portal sign-in. Works while the page is closed, so a subscriber can always see their state.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscribed": {
                      "type": "boolean",
                      "description": "Whether the caller currently receives status emails. False when they never subscribed or opted out."
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "page",
                        "components"
                      ],
                      "description": "What the subscription covers. `page`: the whole status page. `components`: only the components in `componentIds`. `page` when the caller never subscribed."
                    },
                    "componentIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Component IDs followed when `scope` is `components`. Empty for `page`.",
                      "example": [
                        "status_component_11jd3kfbf5kznwj47tan9zt24m"
                      ]
                    },
                    "unsubscribedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the caller opted out, in ISO 8601 UTC. Null while subscribed or when they never subscribed.",
                      "example": "2026-11-25T08:12:44.000Z"
                    }
                  },
                  "required": [
                    "subscribed",
                    "scope",
                    "componentIds",
                    "unsubscribedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "subscribeQuillsStatus",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Subscribe the caller to status-page updates",
        "description": "Subscribes the signed-in caller to status emails for the whole page or for the listed components they can see. A new call replaces the scope and clears an earlier unsubscribe. Creates the caller's customer profile when missing. Requires a portal sign-in and an open status page. Limited to 20 requests per client IP and workspace in 10 minutes, failed ones included. Records a `status.subscribed` event when the subscription changed.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scope": {
                    "type": "string",
                    "enum": [
                      "page",
                      "components"
                    ],
                    "description": "What to follow. `page`: the whole status page. `components`: only the components in `componentIds`."
                  },
                  "componentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `status_component` prefix. Requests also accept the bare UUID.",
                      "example": "status_component_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Components to follow when `scope` is `components`: 1 to 50 distinct IDs (TypeIDs or UUIDs) that the caller can see. Ignored for `page`.",
                    "example": [
                      "status_component_11jd3kfbf5kznwj47tan9zt24m"
                    ]
                  }
                },
                "required": [
                  "scope"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The caller's subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscribed": {
                      "type": "boolean",
                      "description": "Whether the caller currently receives status emails. False when they never subscribed or opted out."
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "page",
                        "components"
                      ],
                      "description": "What the subscription covers. `page`: the whole status page. `components`: only the components in `componentIds`. `page` when the caller never subscribed."
                    },
                    "componentIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Component IDs followed when `scope` is `components`. Empty for `page`.",
                      "example": [
                        "status_component_11jd3kfbf5kznwj47tan9zt24m"
                      ]
                    },
                    "unsubscribedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the caller opted out, in ISO 8601 UTC. Null while subscribed or when they never subscribed.",
                      "example": "2026-11-25T08:12:44.000Z"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request changed the subscription"
                    }
                  },
                  "required": [
                    "subscribed",
                    "scope",
                    "componentIds",
                    "unsubscribedAt",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The status page is not open to the caller, or a listed component does not exist or is not visible to them; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unsubscribeQuillsStatus",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Unsubscribe the caller from status-page updates",
        "description": "Unsubscribes the signed-in caller from status emails. The subscription row stays as the record of the opt-out. Requires a portal sign-in. Works while the page is closed. Records a `status.unsubscribed` event when the caller was subscribed.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscribed": {
                      "type": "boolean",
                      "description": "Whether the caller currently receives status emails. False when they never subscribed or opted out."
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "page",
                        "components"
                      ],
                      "description": "What the subscription covers. `page`: the whole status page. `components`: only the components in `componentIds`. `page` when the caller never subscribed."
                    },
                    "componentIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Component IDs followed when `scope` is `components`. Empty for `page`.",
                      "example": [
                        "status_component_11jd3kfbf5kznwj47tan9zt24m"
                      ]
                    },
                    "unsubscribedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the caller opted out, in ISO 8601 UTC. Null while subscribed or when they never subscribed.",
                      "example": "2026-11-25T08:12:44.000Z"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request changed the subscription"
                    }
                  },
                  "required": [
                    "subscribed",
                    "scope",
                    "componentIds",
                    "unsubscribedAt",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/status/unsubscribe": {
      "post": {
        "operationId": "unsubscribeQuillsStatusByToken",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Unsubscribe through a status email's one-time link token",
        "description": "Unsubscribes the person named by the one-time token in a status email's unsubscribe link and spends the token. No sign-in needed. Answers 200 for every token: `changed` is false for an unknown, used or expired token and for a subscriber who already left. Works while the page is closed. Limited to 20 requests per client IP and workspace in 10 minutes, failed ones included. Records a `status.unsubscribed` event when someone was unsubscribed.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 200,
                    "description": "One-time unsubscribe token from the status email's link, 20 to 200 characters",
                    "example": "q8Zt3vN1pXw7Lr2bKc9Hd4Fs6Gm0Ya5Ej"
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Whether this request unsubscribed someone",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request unsubscribed someone"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/kb-ask": {
      "post": {
        "operationId": "createQuillsWidgetKbAsk",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Ask the help center a question from the widget",
        "description": "Asks the help center a question with AI and returns a pending run; poll getQuillsWidgetKbAsk. A background job answers after commit from published articles that no segment gates and from public snippets only, and the answer cites only that content. The AI call's token usage is logged. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`. Records an `assistant_run.requested` event. 409 when AI is not configured. Limited to 10 attempts per client IP and workspace per 10 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 1000,
                    "description": "The visitor's question",
                    "example": "How do I reset my password?"
                  }
                },
                "required": [
                  "question"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The pending run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The run's ID, a UUID. A run is kept for 24 hours; read it again by this ID until it finishes.",
                      "example": "8c1f4b2e-5d7a-4e93-b6c0-2a9f7e1d3b58"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "copilot",
                        "translate_message",
                        "attribute_preview",
                        "ticket_fields",
                        "kb_ask",
                        "reply_suggestion"
                      ],
                      "description": "What the run does. copilot: a teammate's copilot question. translate_message: a message translation. attribute_preview: an attribute detection preview. ticket_fields: ticket field suggestions. kb_ask: a help center question from the widget. reply_suggestion: a draft reply to the customer.",
                      "example": "reply_suggestion"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "succeeded",
                        "failed"
                      ],
                      "description": "pending: a worker has not answered yet. succeeded: output is set. failed: error is set; a run still pending after 30 minutes reads as failed.",
                      "example": "pending"
                    },
                    "output": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The answer, translation or draft reply text. Null for runs that return values instead.",
                          "example": "You can request a refund within 30 days from Billing > Invoices."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "article",
                                  "snippet",
                                  "document",
                                  "webpage",
                                  "post"
                                ],
                                "description": "The source's kind: a help center article, an assistant snippet, an assistant document, a web source page or a feedback post",
                                "example": "article"
                              },
                              "id": {
                                "type": "string",
                                "description": "The source's ID",
                                "example": "article_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The source's title",
                                "example": "How refunds work"
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title"
                            ]
                          },
                          "description": "The knowledge sources that the answer used. Empty when none."
                        },
                        "proposedActionIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Pending actions that a copilot run proposed for a teammate's approval. Empty for other kinds.",
                          "example": [
                            "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "The attribute or ticket field key that the value is for",
                                "example": "plan"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The suggested value. Null: the AI found no value.",
                                "example": "enterprise"
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The AI's short reason for the value. Null when none was given.",
                                "example": "The customer mentions their enterprise contract."
                              }
                            },
                            "required": [
                              "key",
                              "value",
                              "reason"
                            ]
                          },
                          "description": "Detected attribute values (attribute_preview) or suggested ticket field values (ticket_fields). Empty for other kinds."
                        }
                      },
                      "required": [
                        "text",
                        "citations",
                        "proposedActionIds",
                        "values"
                      ],
                      "description": "The run's result. Null until the run succeeds."
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the run failed. Null unless status is failed.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "When the run was created, as an ISO 8601 timestamp",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "finishedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the worker finished the run, as an ISO 8601 timestamp. Null while pending.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "output",
                    "error",
                    "createdAt",
                    "finishedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "AI is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/kb-ask/{runId}": {
      "get": {
        "operationId": "getQuillsWidgetKbAsk",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get the answer to a widget question",
        "description": "Returns a help-center question run and, once finished, its answer. Only the visitor who asked can read it. A run lasts a day. Send the widget session token from identifyQuillsWidgetVisitor or createQuillsWidgetAnonymousSession as `Authorization: Bearer <token>`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The run ID from createQuillsWidgetKbAsk",
              "example": "7c1e4b2a-3d5f-4a6b-9c8d-0e1f2a3b4c5d"
            },
            "required": true,
            "description": "The run ID from createQuillsWidgetKbAsk",
            "name": "runId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The run and, once finished, its answer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The run's ID, a UUID. A run is kept for 24 hours; read it again by this ID until it finishes.",
                      "example": "8c1f4b2e-5d7a-4e93-b6c0-2a9f7e1d3b58"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "copilot",
                        "translate_message",
                        "attribute_preview",
                        "ticket_fields",
                        "kb_ask",
                        "reply_suggestion"
                      ],
                      "description": "What the run does. copilot: a teammate's copilot question. translate_message: a message translation. attribute_preview: an attribute detection preview. ticket_fields: ticket field suggestions. kb_ask: a help center question from the widget. reply_suggestion: a draft reply to the customer.",
                      "example": "reply_suggestion"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "succeeded",
                        "failed"
                      ],
                      "description": "pending: a worker has not answered yet. succeeded: output is set. failed: error is set; a run still pending after 30 minutes reads as failed.",
                      "example": "pending"
                    },
                    "output": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The answer, translation or draft reply text. Null for runs that return values instead.",
                          "example": "You can request a refund within 30 days from Billing > Invoices."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "article",
                                  "snippet",
                                  "document",
                                  "webpage",
                                  "post"
                                ],
                                "description": "The source's kind: a help center article, an assistant snippet, an assistant document, a web source page or a feedback post",
                                "example": "article"
                              },
                              "id": {
                                "type": "string",
                                "description": "The source's ID",
                                "example": "article_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The source's title",
                                "example": "How refunds work"
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title"
                            ]
                          },
                          "description": "The knowledge sources that the answer used. Empty when none."
                        },
                        "proposedActionIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Pending actions that a copilot run proposed for a teammate's approval. Empty for other kinds.",
                          "example": [
                            "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "The attribute or ticket field key that the value is for",
                                "example": "plan"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The suggested value. Null: the AI found no value.",
                                "example": "enterprise"
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The AI's short reason for the value. Null when none was given.",
                                "example": "The customer mentions their enterprise contract."
                              }
                            },
                            "required": [
                              "key",
                              "value",
                              "reason"
                            ]
                          },
                          "description": "Detected attribute values (attribute_preview) or suggested ticket field values (ticket_fields). Empty for other kinds."
                        }
                      },
                      "required": [
                        "text",
                        "citations",
                        "proposedActionIds",
                        "values"
                      ],
                      "description": "The run's result. Null until the run succeeds."
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the run failed. Null unless status is failed.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "When the run was created, as an ISO 8601 timestamp",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "finishedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the worker finished the run, as an ISO 8601 timestamp. Null while pending.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "output",
                    "error",
                    "createdAt",
                    "finishedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No help-center run with this ID asked by the visitor, or it expired; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/csat-email": {
      "get": {
        "operationId": "validateQuillsCsatEmailToken",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Check a CSAT email link",
        "description": "Checks whether a satisfaction survey link can still rate its conversation, without spending the token, so a mail scanner that opens the link can't rate. `valid` is false for an unknown, used or expired token, and when the conversation no longer belongs to the token's customer. Anyone with the link may call it: the token is the credential, and no sign-in or switch applies, so the link keeps working with the portal off. The token travels in the query string, so it can appear in access logs.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 20,
              "maxLength": 200,
              "description": "Rating token from the link in the satisfaction survey email, 20 to 200 characters. Single use, valid for 30 days, and only for the conversation it was issued for.",
              "example": "dGhpcy1pcy1hLWZha2UtY3NhdC10b2tlbi1leGFtcGxl"
            },
            "required": true,
            "description": "Rating token from the link in the satisfaction survey email, 20 to 200 characters. Single use, valid for 30 days, and only for the conversation it was issued for.",
            "name": "token",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the link can still rate",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "valid": {
                      "type": "boolean",
                      "description": "Whether the token can still rate its conversation.",
                      "example": true
                    }
                  },
                  "required": [
                    "valid"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "recordQuillsCsatViaToken",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Rate a conversation from a CSAT email link",
        "description": "Rates a conversation from the link in a satisfaction survey email and spends the token, so each link rates once. As in the widget and portal, the conversation's first rating and its time stay, and a comment can be added once; each change adds an internal note with the rating for the team. When the first rating is at or below the workspace's low-score threshold (default 2) and automatic follow-up is on (the default), also opens a high-priority back-office ticket linked to the conversation, except for test visitors. An unknown, used or expired token answers 200 with `recorded: false`. Records a `conversation.csat_submitted` event when something changed, plus a `ticket.created` event for a follow-up ticket. Anyone with the link may call it: the token is the credential, and no sign-in or switch applies. Limited to 20 attempts per 10 minutes per client IP address, failed ones included (429).",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 200,
                    "description": "Rating token from the link in the satisfaction survey email, 20 to 200 characters. Single use, valid for 30 days, and only for the conversation it was issued for.",
                    "example": "dGhpcy1pcy1hLWZha2UtY3NhdC10b2tlbi1leGFtcGxl"
                  },
                  "rating": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "Satisfaction rating, a whole number from 1 (worst) to 5 (best). Ignored when the conversation is already rated.",
                    "example": 5
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Optional comment, up to 2,000 characters; surrounding whitespace is trimmed and a blank comment is ignored. Kept only when the conversation has no comment yet.",
                    "example": "Solved on the first reply."
                  }
                },
                "required": [
                  "token",
                  "rating"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The outcome",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recorded": {
                      "type": "boolean",
                      "description": "Whether the token was valid and spent. False for an unknown, used or expired token.",
                      "example": true
                    },
                    "conversationId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the rated conversation. Null when nothing was recorded.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "rating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Stored rating, from 1 to 5: the conversation's first rating, which may differ from the one sent. Null when nothing was recorded.",
                      "example": 5
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether a rating or a comment was stored. False when the request added nothing to an already rated conversation, or when nothing was recorded.",
                      "example": true
                    }
                  },
                  "required": [
                    "recorded",
                    "conversationId",
                    "rating",
                    "changed"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/request-link/{token}": {
      "get": {
        "operationId": "getQuillsRequestByMagicLink",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Read a single support request via its signed magic link",
        "description": "Returns the one conversation a request link names, with its customer-visible messages, for a customer without a portal account. Internal notes, scheduled or recalled messages and the customer's other requests never appear. Read-only, so an email link scanner can't use up or change anything. Anyone with the link may call it: the token is the credential. A token of another workspace, an expired or revoked link, or a blocked customer answers 404. The response is never cached. Limited to 60 attempts per minute per client IP address, failed ones included (429).",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 20,
              "maxLength": 512,
              "description": "Signed request-link token from a support email or a link a teammate created, 20 to 512 characters. It names one conversation and its customer, belongs to this workspace, and works until it expires or a teammate revokes it.",
              "example": "rl1.ZmFrZS1yZXF1ZXN0LWxpbmstcGF5bG9hZA.ZmFrZS1zaWduYXR1cmU"
            },
            "required": true,
            "description": "Signed request-link token from a support email or a link a teammate created, 20 to 512 characters. It names one conversation and its customer, belongs to this workspace, and works until it expires or a teammate revokes it.",
            "name": "token",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The bound conversation and its customer-visible messages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceName": {
                      "type": "string",
                      "description": "Name of the workspace, or `Support` when none is set.",
                      "example": "Acme Support"
                    },
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Subject of the conversation. Null when it has none.",
                          "example": "I can't sign in after resetting my password"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                          "example": "open"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "subject",
                        "status",
                        "createdAt",
                        "updatedAt"
                      ],
                      "description": "The conversation the link names."
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Message ID.",
                            "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                          },
                          "fromVisitor": {
                            "type": "boolean",
                            "description": "Whether the customer wrote the message.",
                            "example": false
                          },
                          "senderType": {
                            "type": "string",
                            "enum": [
                              "visitor",
                              "agent",
                              "system"
                            ],
                            "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice.",
                            "example": "agent"
                          },
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the author. Null when none is known, for example for a notice.",
                            "example": "Dana Whitfield"
                          },
                          "content": {
                            "type": "string",
                            "description": "Message text, as plain text.",
                            "example": "I've reset the password on the account. Please try signing in again."
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fileId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "ID of the file. Null for older attachments and inline images that have no file record; those can't be downloaded.",
                                  "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "File name.",
                                  "example": "invoice-2026-03.pdf"
                                },
                                "contentType": {
                                  "type": "string",
                                  "description": "MIME type of the file.",
                                  "example": "application/pdf"
                                },
                                "size": {
                                  "type": "number",
                                  "description": "File size in bytes.",
                                  "example": 48213
                                },
                                "inline": {
                                  "type": "boolean",
                                  "description": "Whether the file is shown inside the message body, such as an image in an email. Absent when not set.",
                                  "example": false
                                },
                                "downloadPath": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Path of this attachment's download route under this link (`GET .../request-link/{token}/files/{fileId}`), relative to the API origin. Null when `fileId` is null."
                                }
                              },
                              "required": [
                                "fileId",
                                "name",
                                "contentType",
                                "size",
                                "downloadPath"
                              ]
                            },
                            "description": "Files attached to the message, in the order they were attached."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the message was written, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "fromVisitor",
                          "senderType",
                          "authorName",
                          "content",
                          "attachments",
                          "createdAt"
                        ],
                        "description": "A customer-visible message of the linked conversation."
                      },
                      "description": "Customer-visible messages of the conversation, oldest first, up to the first 200."
                    }
                  },
                  "required": [
                    "workspaceName",
                    "conversation",
                    "messages"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Request link invalid, expired or revoked, or its customer is blocked; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/request-link/{token}/reply": {
      "post": {
        "operationId": "replyQuillsRequestByMagicLink",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Reply to a single support request via its signed magic link",
        "description": "Adds a reply from the customer to the one conversation a request link names, with no sign-in. The reply reopens a closed or snoozed conversation unless it ended as spam, and returns it to the team's inbox. Not idempotent: each call adds a message. Records a `message.created` event. Anyone with the link may call it: the token is the credential. A token of another workspace, an expired or revoked link, or a blocked customer answers 404. Limited to 20 attempts per 10 minutes per client IP address, failed ones included (429).",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 20,
              "maxLength": 512,
              "description": "Signed request-link token from a support email or a link a teammate created, 20 to 512 characters. It names one conversation and its customer, belongs to this workspace, and works until it expires or a teammate revokes it.",
              "example": "rl1.ZmFrZS1yZXF1ZXN0LWxpbmstcGF5bG9hZA.ZmFrZS1zaWduYXR1cmU"
            },
            "required": true,
            "description": "Signed request-link token from a support email or a link a teammate created, 20 to 512 characters. It names one conversation and its customer, belongs to this workspace, and works until it expires or a teammate revokes it.",
            "name": "token",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Message text, as plain text. Leading and trailing whitespace is trimmed. 1 to 10,000 characters.",
                    "example": "I've reset the password on the account. Please try signing in again."
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created customer reply",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                        },
                        "fromVisitor": {
                          "type": "boolean",
                          "description": "Whether the customer wrote the message.",
                          "example": false
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice.",
                          "example": "agent"
                        },
                        "authorName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Display name of the author. Null when none is known, for example for a notice.",
                          "example": "Dana Whitfield"
                        },
                        "content": {
                          "type": "string",
                          "description": "Message text, as plain text.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the file. Null for older attachments and inline images that have no file record; those can't be downloaded.",
                                "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              },
                              "inline": {
                                "type": "boolean",
                                "description": "Whether the file is shown inside the message body, such as an image in an email. Absent when not set.",
                                "example": false
                              },
                              "downloadPath": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Path of this attachment's download route under this link (`GET .../request-link/{token}/files/{fileId}`), relative to the API origin. Null when `fileId` is null."
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size",
                              "downloadPath"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was written, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:26:53.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "fromVisitor",
                        "senderType",
                        "authorName",
                        "content",
                        "attachments",
                        "createdAt"
                      ],
                      "description": "A customer-visible message of the linked conversation."
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Request link invalid, expired or revoked, or its customer is blocked; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many replies from this IP address; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/request-link/{token}/files/{fileId}": {
      "get": {
        "operationId": "downloadQuillsRequestLinkFile",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Download an attachment from a magic-link request",
        "description": "Redirects (302) to a short-lived signed download URL for a file attached to a customer-visible message of the conversation a request link names. Files of internal notes, of deleted messages and of other conversations answer 404. The URL opens images inline and downloads other files; the redirect itself isn't cached. Anyone with the link may call it: the token is the credential. Limited to 60 attempts per minute per client IP address, failed ones included (429).",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 20,
              "maxLength": 512,
              "description": "Signed request-link token from a support email or a link a teammate created, 20 to 512 characters. It names one conversation and its customer, belongs to this workspace, and works until it expires or a teammate revokes it.",
              "example": "rl1.ZmFrZS1yZXF1ZXN0LWxpbmstcGF5bG9hZA.ZmFrZS1zaWduYXR1cmU"
            },
            "required": true,
            "description": "Signed request-link token from a support email or a link a teammate created, 20 to 512 characters. It names one conversation and its customer, belongs to this workspace, and works until it expires or a teammate revokes it.",
            "name": "token",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "File ID, from a message's `attachments[].fileId`. Accepts the TypeID or its UUID.",
              "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
            },
            "required": true,
            "description": "File ID, from a message's `attachments[].fileId`. Accepts the TypeID or its UUID.",
            "name": "fileId",
            "in": "path"
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to a short-lived signed download URL",
            "headers": {
              "Location": {
                "description": "The target URL",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "description": "Private, until shortly before the target expires",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "File not found, or request link invalid, expired or revoked, or its customer is blocked; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations": {
      "get": {
        "operationId": "listQuillsMyConversations",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the conversations of the signed-in customer",
        "description": "Lists the caller's own conversations, most recent activity (`lastMessageAt`) first, with each one's unread count. Pages with `cursor` and `limit`; `nextCursor` is null on the last page. A caller without a customer profile yet gets an empty list. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the last conversation on the previous page; the page starts after it. Must be one of the caller's conversations (404 otherwise). Accepts the TypeID or its UUID. Omit for the first page.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": false,
            "description": "ID of the last conversation on the previous page; the page starts after it. Must be one of the caller's conversations (404 otherwise). Accepts the TypeID or its UUID. Omit for the first page.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of conversations to return, from 1 to 50. Defaults to 20.",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of conversations to return, from 1 to 50. Defaults to 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the caller's conversations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation ID.",
                            "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "open",
                              "snoozed",
                              "closed"
                            ],
                            "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                            "example": "open"
                          },
                          "customerStatus": {
                            "type": "string",
                            "enum": [
                              "received",
                              "in_progress",
                              "awaiting_requester",
                              "resolved"
                            ],
                            "description": "Progress as shown to the customer. `received`: no teammate has answered or taken it yet; `in_progress`: a teammate answered or was assigned; `awaiting_requester`: a teammate offered a solution that waits for the customer's confirmation; `resolved`: the conversation is closed.",
                            "example": "in_progress"
                          },
                          "isReadOnly": {
                            "type": "boolean",
                            "description": "Whether the conversation is closed. The customer can still send a message: it reopens the conversation or, under the workspace's reopen policy, starts a follow-up conversation.",
                            "example": false
                          },
                          "subject": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Subject of the conversation. For one the customer started, the first 140 characters of the first message. Null when it has none.",
                            "example": "I can't sign in after resetting my password"
                          },
                          "preview": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Preview of the latest message, up to 140 characters. Null when there's none.",
                            "example": "I've reset the password on the account. Please try signing in again."
                          },
                          "lastMessageAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time of the latest message, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the conversation was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:02:11.000Z"
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "solutionOfferedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time a teammate offered a solution that waits for the customer's confirmation, in ISO 8601 UTC. Null when no solution is pending.",
                            "example": null
                          },
                          "unreadCount": {
                            "type": "number",
                            "description": "Number of team messages after the caller's read watermark.",
                            "example": 1
                          },
                          "csatRating": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Customer's satisfaction rating, from 1 (worst) to 5 (best). Null until rated.",
                            "example": null
                          },
                          "csatSubmittedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time of the first rating, in ISO 8601 UTC. Null until rated.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "isReadOnly",
                          "subject",
                          "preview",
                          "lastMessageAt",
                          "createdAt",
                          "unreadCount",
                          "csatRating",
                          "csatSubmittedAt"
                        ],
                        "description": "A conversation as the customer sees it. Assignees, tags and internal fields never appear."
                      },
                      "description": "The caller's conversations on this page."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Value of `cursor` for the next page: the ID of the last conversation here. Null on the last page.",
                      "example": null
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Cursor conversation not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "startQuillsMyConversation",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Start a conversation as the signed-in customer",
        "description": "Starts a conversation with the caller's first message and returns both. The first 140 characters of the message become the subject. When the workspace's away reply is on and the team is away (outside office hours or with no teammate online), posts the away reply. A message that looks like spam, from a sender who isn't on the workspace's trusted list, creates the conversation already closed as spam, with no away reply. Idempotent by `idempotencyKey`: a retry with the same key and text returns the first result with `replayed: true`. Records a `conversation.created` event, except on a replay. Limited to 20 attempts per 10 minutes per client IP address, failed ones included (429). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Message text, as plain text. Leading and trailing whitespace is trimmed. 1 to 10,000 characters.",
                    "example": "I've reset the password on the account. Please try signing in again."
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$",
                    "description": "Client-generated key that makes the request safe to retry: 8 to 128 letters, digits, `_` or `-`. Use a new key for each new message. A retry with the same key, text and attachments returns the first result with `replayed: true` and writes nothing. The key is scoped to the caller and, for a reply, to the conversation. Reusing it with other text or attachments fails with 409, and so does a key whose 7-day receipt has expired.",
                    "example": "msg-7f3c9a2e41b8"
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "default": [],
                    "description": "IDs of files to attach, up to 10 and each once. Each must be one of the caller's own uploads that isn't attached to a message yet; a file of another person, a removed file or an attached one fails the request with 404 and nothing is attached. Accepts TypeIDs or UUIDs. Attachments keep the order sent. Defaults to none.",
                    "example": [
                      "file_01m8rxy505fewvz41w7gqgp4p1"
                    ]
                  }
                },
                "required": [
                  "content",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new conversation and its first message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "fromVisitor": {
                          "type": "boolean",
                          "description": "Whether the caller wrote the message.",
                          "example": false
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                          "example": "agent"
                        },
                        "author": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                              "example": "Dana Whitfield"
                            },
                            "avatarUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "URL of the author's avatar image. Null when there's none.",
                              "example": "https://cdn.example.com/avatars/dana.png"
                            }
                          },
                          "required": [
                            "name",
                            "avatarUrl"
                          ],
                          "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                        },
                        "content": {
                          "type": "string",
                          "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Kind of the shared record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the shared record.",
                                "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                          "example": null
                        },
                        "fromAssistant": {
                          "type": "boolean",
                          "description": "Whether the AI assistant wrote the message.",
                          "example": false
                        },
                        "feedbackCard": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "title": {
                              "type": "string",
                              "description": "Proposed title of the feedback post.",
                              "example": "Export boards to CSV"
                            },
                            "body": {
                              "type": "string",
                              "description": "Proposed text of the feedback post.",
                              "example": "I'd like to export a board with all its posts to a CSV file."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "confirmed"
                              ],
                              "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                              "example": "proposed"
                            },
                            "postId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                              "example": null
                            }
                          },
                          "required": [
                            "title",
                            "body",
                            "status",
                            "postId"
                          ],
                          "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Title of the cited source.",
                                "example": "Reset your password"
                              },
                              "url": {
                                "type": "string",
                                "description": "URL of the cited source.",
                                "example": "https://help.example.com/articles/reset-your-password"
                              },
                              "sourceType": {
                                "type": "string",
                                "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                "example": "article"
                              }
                            },
                            "required": [
                              "title",
                              "url",
                              "sourceType"
                            ]
                          },
                          "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "fromVisitor",
                        "senderType",
                        "author",
                        "content",
                        "embeds",
                        "attachments",
                        "createdAt",
                        "editedAt",
                        "fromAssistant",
                        "feedbackCard",
                        "citations"
                      ],
                      "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                    },
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                          "example": "open"
                        },
                        "customerStatus": {
                          "type": "string",
                          "enum": [
                            "received",
                            "in_progress",
                            "awaiting_requester",
                            "resolved"
                          ],
                          "description": "Progress as shown to the customer. `received`: no teammate has answered or taken it yet; `in_progress`: a teammate answered or was assigned; `awaiting_requester`: a teammate offered a solution that waits for the customer's confirmation; `resolved`: the conversation is closed.",
                          "example": "in_progress"
                        },
                        "isReadOnly": {
                          "type": "boolean",
                          "description": "Whether the conversation is closed. The customer can still send a message: it reopens the conversation or, under the workspace's reopen policy, starts a follow-up conversation.",
                          "example": false
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Subject of the conversation. For one the customer started, the first 140 characters of the first message. Null when it has none.",
                          "example": "I can't sign in after resetting my password"
                        },
                        "preview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Preview of the latest message, up to 140 characters. Null when there's none.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of the latest message, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "solutionOfferedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate offered a solution that waits for the customer's confirmation, in ISO 8601 UTC. Null when no solution is pending.",
                          "example": null
                        },
                        "unreadCount": {
                          "type": "number",
                          "description": "Number of team messages after the caller's read watermark.",
                          "example": 1
                        },
                        "csatRating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer's satisfaction rating, from 1 (worst) to 5 (best). Null until rated.",
                          "example": null
                        },
                        "csatSubmittedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the first rating, in ISO 8601 UTC. Null until rated.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "isReadOnly",
                        "subject",
                        "preview",
                        "lastMessageAt",
                        "createdAt",
                        "unreadCount",
                        "csatRating",
                        "csatSubmittedAt"
                      ],
                      "description": "A conversation as the customer sees it. Assignees, tags and internal fields never appear."
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "Whether this request repeated an earlier one with the same idempotency key. When true, nothing new was written and the response describes the first request's message.",
                      "example": false
                    }
                  },
                  "required": [
                    "message",
                    "conversation",
                    "replayed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The portal or its support is off, or an attachment isn't one of the caller's unattached uploads; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The idempotency key was used for a different message, or its 7-day receipt has expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/unread": {
      "get": {
        "operationId": "getQuillsMyUnreadCount",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Count the unread team messages of the signed-in customer",
        "description": "Returns the number of team messages after the caller's read watermark, across all of the caller's conversations, for the launcher badge to poll. A caller without a customer profile yet gets 0. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The unread count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of unread team messages across the caller's conversations.",
                      "example": 2
                    }
                  },
                  "required": [
                    "unreadCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}": {
      "get": {
        "operationId": "getQuillsMyConversation",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a conversation of the signed-in customer with its latest messages",
        "description": "Returns one of the caller's conversations with its latest 30 customer-visible messages, oldest first. When `hasMore` is true, older messages exist: page back with the messages route and `before`. `teamTyping` is true for 8 seconds after a teammate signals typing. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                          "example": "open"
                        },
                        "customerStatus": {
                          "type": "string",
                          "enum": [
                            "received",
                            "in_progress",
                            "awaiting_requester",
                            "resolved"
                          ],
                          "description": "Progress as shown to the customer. `received`: no teammate has answered or taken it yet; `in_progress`: a teammate answered or was assigned; `awaiting_requester`: a teammate offered a solution that waits for the customer's confirmation; `resolved`: the conversation is closed.",
                          "example": "in_progress"
                        },
                        "isReadOnly": {
                          "type": "boolean",
                          "description": "Whether the conversation is closed. The customer can still send a message: it reopens the conversation or, under the workspace's reopen policy, starts a follow-up conversation.",
                          "example": false
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Subject of the conversation. For one the customer started, the first 140 characters of the first message. Null when it has none.",
                          "example": "I can't sign in after resetting my password"
                        },
                        "preview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Preview of the latest message, up to 140 characters. Null when there's none.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of the latest message, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "solutionOfferedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate offered a solution that waits for the customer's confirmation, in ISO 8601 UTC. Null when no solution is pending.",
                          "example": null
                        },
                        "unreadCount": {
                          "type": "number",
                          "description": "Number of team messages after the caller's read watermark.",
                          "example": 1
                        },
                        "csatRating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer's satisfaction rating, from 1 (worst) to 5 (best). Null until rated.",
                          "example": null
                        },
                        "csatSubmittedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the first rating, in ISO 8601 UTC. Null until rated.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "isReadOnly",
                        "subject",
                        "preview",
                        "lastMessageAt",
                        "createdAt",
                        "unreadCount",
                        "csatRating",
                        "csatSubmittedAt"
                      ],
                      "description": "A conversation as the customer sees it. Assignees, tags and internal fields never appear."
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Message ID.",
                            "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                          },
                          "conversationId": {
                            "type": "string",
                            "description": "ID of the conversation the message belongs to.",
                            "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                          },
                          "fromVisitor": {
                            "type": "boolean",
                            "description": "Whether the caller wrote the message.",
                            "example": false
                          },
                          "senderType": {
                            "type": "string",
                            "enum": [
                              "visitor",
                              "agent",
                              "system"
                            ],
                            "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                            "example": "agent"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                                "example": "Dana Whitfield"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "URL of the author's avatar image. Null when there's none.",
                                "example": "https://cdn.example.com/avatars/dana.png"
                              }
                            },
                            "required": [
                              "name",
                              "avatarUrl"
                            ],
                            "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                          },
                          "content": {
                            "type": "string",
                            "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                            "example": "I've reset the password on the account. Please try signing in again."
                          },
                          "embeds": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "description": "Kind of the shared record, such as `post`.",
                                  "example": "post"
                                },
                                "id": {
                                  "type": "string",
                                  "description": "ID of the shared record.",
                                  "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                                }
                              },
                              "required": [
                                "kind",
                                "id"
                              ]
                            },
                            "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fileId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                  "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "File name.",
                                  "example": "invoice-2026-03.pdf"
                                },
                                "contentType": {
                                  "type": "string",
                                  "description": "MIME type of the file.",
                                  "example": "application/pdf"
                                },
                                "size": {
                                  "type": "number",
                                  "description": "File size in bytes.",
                                  "example": 48213
                                }
                              },
                              "required": [
                                "fileId",
                                "name",
                                "contentType",
                                "size"
                              ]
                            },
                            "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "editedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                            "example": null
                          },
                          "fromAssistant": {
                            "type": "boolean",
                            "description": "Whether the AI assistant wrote the message.",
                            "example": false
                          },
                          "feedbackCard": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Proposed title of the feedback post.",
                                "example": "Export boards to CSV"
                              },
                              "body": {
                                "type": "string",
                                "description": "Proposed text of the feedback post.",
                                "example": "I'd like to export a board with all its posts to a CSV file."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "proposed",
                                  "confirmed"
                                ],
                                "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                                "example": "proposed"
                              },
                              "postId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                                "example": null
                              }
                            },
                            "required": [
                              "title",
                              "body",
                              "status",
                              "postId"
                            ],
                            "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                          },
                          "citations": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "title": {
                                  "type": "string",
                                  "description": "Title of the cited source.",
                                  "example": "Reset your password"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "URL of the cited source.",
                                  "example": "https://help.example.com/articles/reset-your-password"
                                },
                                "sourceType": {
                                  "type": "string",
                                  "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                  "example": "article"
                                }
                              },
                              "required": [
                                "title",
                                "url",
                                "sourceType"
                              ]
                            },
                            "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "fromVisitor",
                          "senderType",
                          "author",
                          "content",
                          "embeds",
                          "attachments",
                          "createdAt",
                          "editedAt",
                          "fromAssistant",
                          "feedbackCard",
                          "citations"
                        ],
                        "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                      },
                      "description": "The latest 30 messages, oldest first."
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether older messages exist before `messages`.",
                      "example": false
                    },
                    "teamTyping": {
                      "type": "boolean",
                      "description": "Whether a teammate is typing: true for 8 seconds after a teammate's latest typing signal.",
                      "example": false
                    }
                  },
                  "required": [
                    "conversation",
                    "messages",
                    "hasMore",
                    "teamTyping"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}/messages": {
      "get": {
        "operationId": "listQuillsMyConversationMessages",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the messages of a conversation of the signed-in customer",
        "description": "Lists the customer-visible messages of one of the caller's conversations, oldest first. Without a cursor, returns the latest messages. `before` pages back to older messages. `after` returns newer messages and also those from the 30 seconds before the cursor, because a message that commits late can carry an earlier time: merge by message ID. A client without a push channel polls with `after` to catch up. Each cursor must be a message of this conversation (404 otherwise). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of a message of this conversation; returns the messages before it. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": false,
            "description": "ID of a message of this conversation; returns the messages before it. Accepts the TypeID or its UUID.",
            "name": "before",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of a message of this conversation; returns the messages after it, plus those written in the 30 seconds before it (never the cursor message itself). Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": false,
            "description": "ID of a message of this conversation; returns the messages after it, plus those written in the 30 seconds before it (never the cursor message itself). Accepts the TypeID or its UUID.",
            "name": "after",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30,
              "description": "Maximum number of messages to return, from 1 to 100. Defaults to 30.",
              "example": 30
            },
            "required": false,
            "description": "Maximum number of messages to return, from 1 to 100. Defaults to 30.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of messages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Message ID.",
                            "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                          },
                          "conversationId": {
                            "type": "string",
                            "description": "ID of the conversation the message belongs to.",
                            "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                          },
                          "fromVisitor": {
                            "type": "boolean",
                            "description": "Whether the caller wrote the message.",
                            "example": false
                          },
                          "senderType": {
                            "type": "string",
                            "enum": [
                              "visitor",
                              "agent",
                              "system"
                            ],
                            "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                            "example": "agent"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                                "example": "Dana Whitfield"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "URL of the author's avatar image. Null when there's none.",
                                "example": "https://cdn.example.com/avatars/dana.png"
                              }
                            },
                            "required": [
                              "name",
                              "avatarUrl"
                            ],
                            "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                          },
                          "content": {
                            "type": "string",
                            "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                            "example": "I've reset the password on the account. Please try signing in again."
                          },
                          "embeds": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "description": "Kind of the shared record, such as `post`.",
                                  "example": "post"
                                },
                                "id": {
                                  "type": "string",
                                  "description": "ID of the shared record.",
                                  "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                                }
                              },
                              "required": [
                                "kind",
                                "id"
                              ]
                            },
                            "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fileId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                  "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "File name.",
                                  "example": "invoice-2026-03.pdf"
                                },
                                "contentType": {
                                  "type": "string",
                                  "description": "MIME type of the file.",
                                  "example": "application/pdf"
                                },
                                "size": {
                                  "type": "number",
                                  "description": "File size in bytes.",
                                  "example": 48213
                                }
                              },
                              "required": [
                                "fileId",
                                "name",
                                "contentType",
                                "size"
                              ]
                            },
                            "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "editedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                            "example": null
                          },
                          "fromAssistant": {
                            "type": "boolean",
                            "description": "Whether the AI assistant wrote the message.",
                            "example": false
                          },
                          "feedbackCard": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Proposed title of the feedback post.",
                                "example": "Export boards to CSV"
                              },
                              "body": {
                                "type": "string",
                                "description": "Proposed text of the feedback post.",
                                "example": "I'd like to export a board with all its posts to a CSV file."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "proposed",
                                  "confirmed"
                                ],
                                "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                                "example": "proposed"
                              },
                              "postId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                                "example": null
                              }
                            },
                            "required": [
                              "title",
                              "body",
                              "status",
                              "postId"
                            ],
                            "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                          },
                          "citations": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "title": {
                                  "type": "string",
                                  "description": "Title of the cited source.",
                                  "example": "Reset your password"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "URL of the cited source.",
                                  "example": "https://help.example.com/articles/reset-your-password"
                                },
                                "sourceType": {
                                  "type": "string",
                                  "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                  "example": "article"
                                }
                              },
                              "required": [
                                "title",
                                "url",
                                "sourceType"
                              ]
                            },
                            "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "fromVisitor",
                          "senderType",
                          "author",
                          "content",
                          "embeds",
                          "attachments",
                          "createdAt",
                          "editedAt",
                          "fromAssistant",
                          "feedbackCard",
                          "citations"
                        ],
                        "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                      },
                      "description": "Messages on this page, oldest first."
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more messages exist past this page: newer ones for an `after` read, older ones otherwise.",
                      "example": false
                    }
                  },
                  "required": [
                    "items",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation or cursor message not found, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "sendQuillsMyConversationMessage",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Send a message in a conversation of the signed-in customer",
        "description": "Sends the caller's message in one of their conversations and returns it with the updated conversation. The message reopens a closed or snoozed conversation, unless it ended as spam or was merged. Unless the conversation ended as spam, linked tickets in a closed status move back to an open status. For a closed conversation, the workspace's reopen policy can start a follow-up conversation instead: always under `never_link_new`, and under `within_days` (the default) once the conversation has been closed longer than the policy's window. The response then carries the new conversation. When the away reply is on and the team is away, posts it, at most once every 12 hours per conversation. Idempotent by `idempotencyKey`: a retry with the same key and text returns the first result with `replayed: true`. Records a `message.created` event, except on a replay. Limited to 60 attempts per 10 minutes per client IP address, failed ones included (429). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Message text, as plain text. Leading and trailing whitespace is trimmed. 1 to 10,000 characters.",
                    "example": "I've reset the password on the account. Please try signing in again."
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$",
                    "description": "Client-generated key that makes the request safe to retry: 8 to 128 letters, digits, `_` or `-`. Use a new key for each new message. A retry with the same key, text and attachments returns the first result with `replayed: true` and writes nothing. The key is scoped to the caller and, for a reply, to the conversation. Reusing it with other text or attachments fails with 409, and so does a key whose 7-day receipt has expired.",
                    "example": "msg-7f3c9a2e41b8"
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "default": [],
                    "description": "IDs of files to attach, up to 10 and each once. Each must be one of the caller's own uploads that isn't attached to a message yet; a file of another person, a removed file or an attached one fails the request with 404 and nothing is attached. Accepts TypeIDs or UUIDs. Attachments keep the order sent. Defaults to none.",
                    "example": [
                      "file_01m8rxy505fewvz41w7gqgp4p1"
                    ]
                  }
                },
                "required": [
                  "content",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The message and the updated conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "fromVisitor": {
                          "type": "boolean",
                          "description": "Whether the caller wrote the message.",
                          "example": false
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                          "example": "agent"
                        },
                        "author": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                              "example": "Dana Whitfield"
                            },
                            "avatarUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "URL of the author's avatar image. Null when there's none.",
                              "example": "https://cdn.example.com/avatars/dana.png"
                            }
                          },
                          "required": [
                            "name",
                            "avatarUrl"
                          ],
                          "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                        },
                        "content": {
                          "type": "string",
                          "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Kind of the shared record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the shared record.",
                                "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                          "example": null
                        },
                        "fromAssistant": {
                          "type": "boolean",
                          "description": "Whether the AI assistant wrote the message.",
                          "example": false
                        },
                        "feedbackCard": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "title": {
                              "type": "string",
                              "description": "Proposed title of the feedback post.",
                              "example": "Export boards to CSV"
                            },
                            "body": {
                              "type": "string",
                              "description": "Proposed text of the feedback post.",
                              "example": "I'd like to export a board with all its posts to a CSV file."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "confirmed"
                              ],
                              "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                              "example": "proposed"
                            },
                            "postId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                              "example": null
                            }
                          },
                          "required": [
                            "title",
                            "body",
                            "status",
                            "postId"
                          ],
                          "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Title of the cited source.",
                                "example": "Reset your password"
                              },
                              "url": {
                                "type": "string",
                                "description": "URL of the cited source.",
                                "example": "https://help.example.com/articles/reset-your-password"
                              },
                              "sourceType": {
                                "type": "string",
                                "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                "example": "article"
                              }
                            },
                            "required": [
                              "title",
                              "url",
                              "sourceType"
                            ]
                          },
                          "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "fromVisitor",
                        "senderType",
                        "author",
                        "content",
                        "embeds",
                        "attachments",
                        "createdAt",
                        "editedAt",
                        "fromAssistant",
                        "feedbackCard",
                        "citations"
                      ],
                      "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                    },
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                          "example": "open"
                        },
                        "customerStatus": {
                          "type": "string",
                          "enum": [
                            "received",
                            "in_progress",
                            "awaiting_requester",
                            "resolved"
                          ],
                          "description": "Progress as shown to the customer. `received`: no teammate has answered or taken it yet; `in_progress`: a teammate answered or was assigned; `awaiting_requester`: a teammate offered a solution that waits for the customer's confirmation; `resolved`: the conversation is closed.",
                          "example": "in_progress"
                        },
                        "isReadOnly": {
                          "type": "boolean",
                          "description": "Whether the conversation is closed. The customer can still send a message: it reopens the conversation or, under the workspace's reopen policy, starts a follow-up conversation.",
                          "example": false
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Subject of the conversation. For one the customer started, the first 140 characters of the first message. Null when it has none.",
                          "example": "I can't sign in after resetting my password"
                        },
                        "preview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Preview of the latest message, up to 140 characters. Null when there's none.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of the latest message, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "solutionOfferedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate offered a solution that waits for the customer's confirmation, in ISO 8601 UTC. Null when no solution is pending.",
                          "example": null
                        },
                        "unreadCount": {
                          "type": "number",
                          "description": "Number of team messages after the caller's read watermark.",
                          "example": 1
                        },
                        "csatRating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer's satisfaction rating, from 1 (worst) to 5 (best). Null until rated.",
                          "example": null
                        },
                        "csatSubmittedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the first rating, in ISO 8601 UTC. Null until rated.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "isReadOnly",
                        "subject",
                        "preview",
                        "lastMessageAt",
                        "createdAt",
                        "unreadCount",
                        "csatRating",
                        "csatSubmittedAt"
                      ],
                      "description": "A conversation as the customer sees it. Assignees, tags and internal fields never appear."
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "Whether this request repeated an earlier one with the same idempotency key. When true, nothing new was written and the response describes the first request's message.",
                      "example": false
                    }
                  },
                  "required": [
                    "message",
                    "conversation",
                    "replayed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the portal or its support is off, or an attachment isn't one of the caller's unattached uploads; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The idempotency key was used for a different message, or its 7-day receipt has expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}/files/{fileId}": {
      "get": {
        "operationId": "getQuillsMyConversationFile",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a file of a conversation of the signed-in customer and a short-lived download URL",
        "description": "Returns a file attached to a customer-visible message of one of the caller's conversations, with a short-lived download URL. Files of internal notes, of deleted messages and of other conversations answer 404. The URL opens images inline and downloads other files. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "File ID, from a message's `attachments[].fileId`. Accepts the TypeID or its UUID.",
              "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
            },
            "required": true,
            "description": "File ID, from a message's `attachments[].fileId`. Accepts the TypeID or its UUID.",
            "name": "fileId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "File ID.",
                      "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                    },
                    "name": {
                      "type": "string",
                      "description": "File name.",
                      "example": "invoice-2026-03.pdf"
                    },
                    "contentType": {
                      "type": "string",
                      "description": "MIME type of the file.",
                      "example": "application/pdf"
                    },
                    "size": {
                      "type": "number",
                      "description": "File size in bytes.",
                      "example": 48213
                    },
                    "downloadUrl": {
                      "type": "string",
                      "description": "Signed URL that downloads the file until `downloadExpiresAt`. Needs no other credential, so don't share it.",
                      "example": "https://files.example.com/download/invoice-2026-03.pdf?signature=fake-signature"
                    },
                    "downloadExpiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time `downloadUrl` stops working, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:31:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "contentType",
                    "size",
                    "downloadUrl",
                    "downloadExpiresAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation or file not found, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}/confirm-resolution": {
      "post": {
        "operationId": "confirmQuillsMyConversationResolution",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Confirm a conversation is solved as the signed-in customer",
        "description": "Closes one of the caller's conversations as resolved, for a customer who confirms that a solution worked, and posts a customer-visible \"Customer confirmed the solution\" notice. It works on any open or snoozed conversation, whether or not a solution was offered. Clears the pending solution, snooze and auto-close. Idempotent: a conversation that's already closed stays as it is, with `changed: false`. Records a `conversation.status_changed` event when it closes the conversation. Limited to 30 attempts per 10 minutes per client IP address, failed ones included (429). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The closed conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                          "example": "open"
                        },
                        "customerStatus": {
                          "type": "string",
                          "enum": [
                            "received",
                            "in_progress",
                            "awaiting_requester",
                            "resolved"
                          ],
                          "description": "Progress as shown to the customer. `received`: no teammate has answered or taken it yet; `in_progress`: a teammate answered or was assigned; `awaiting_requester`: a teammate offered a solution that waits for the customer's confirmation; `resolved`: the conversation is closed.",
                          "example": "in_progress"
                        },
                        "isReadOnly": {
                          "type": "boolean",
                          "description": "Whether the conversation is closed. The customer can still send a message: it reopens the conversation or, under the workspace's reopen policy, starts a follow-up conversation.",
                          "example": false
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Subject of the conversation. For one the customer started, the first 140 characters of the first message. Null when it has none.",
                          "example": "I can't sign in after resetting my password"
                        },
                        "preview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Preview of the latest message, up to 140 characters. Null when there's none.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of the latest message, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "solutionOfferedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate offered a solution that waits for the customer's confirmation, in ISO 8601 UTC. Null when no solution is pending.",
                          "example": null
                        },
                        "unreadCount": {
                          "type": "number",
                          "description": "Number of team messages after the caller's read watermark.",
                          "example": 1
                        },
                        "csatRating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer's satisfaction rating, from 1 (worst) to 5 (best). Null until rated.",
                          "example": null
                        },
                        "csatSubmittedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the first rating, in ISO 8601 UTC. Null until rated.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "isReadOnly",
                        "subject",
                        "preview",
                        "lastMessageAt",
                        "createdAt",
                        "unreadCount",
                        "csatRating",
                        "csatSubmittedAt"
                      ],
                      "description": "A conversation as the customer sees it. Assignees, tags and internal fields never appear."
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request closed the conversation. False when it was already closed.",
                      "example": true
                    }
                  },
                  "required": [
                    "conversation",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}/read": {
      "put": {
        "operationId": "markQuillsMyConversationRead",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Mark a conversation of the signed-in customer read through a message",
        "description": "Moves the caller's read watermark in one of their conversations to the time of `throughMessageId`, so team messages up to it stop counting as unread. The watermark only moves forward: acknowledging a message older than the watermark changes nothing (`changed: false`). Records no event, since read state is the customer's own. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "throughMessageId": {
                    "type": "string",
                    "description": "ID of the latest message the caller has seen; must be a customer-visible message of this conversation. Accepts the TypeID or its UUID.",
                    "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
                  }
                },
                "required": [
                  "throughMessageId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation's unread count after the change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of team messages in this conversation still after the watermark.",
                      "example": 0
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the watermark moved.",
                      "example": true
                    }
                  },
                  "required": [
                    "unreadCount",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation or message not found, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}/typing": {
      "post": {
        "operationId": "sendQuillsMyConversationTyping",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Signal that the signed-in customer is typing",
        "description": "Signals that the caller is typing in one of their conversations. Each conversation side keeps one marker that lapses 8 seconds after the latest signal; teammates read it with `GET /conversations/{conversationId}/typing`. Records no event, since the marker is ephemeral. Limited to 120 attempts per 10 minutes per client IP address, failed ones included (429). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The signal is stored",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`: the signal is stored.",
                      "example": true
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}/csat": {
      "post": {
        "operationId": "submitQuillsCsat",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Rate a conversation of the signed-in customer",
        "description": "Rates one of the caller's conversations from 1 to 5, with an optional comment. The first rating and its time stay: a later call can only add a comment, once. Each change adds an internal note with the rating for the team. When the first rating is at or below the workspace's low-score threshold (default 2) and automatic follow-up is on (the default), also opens a high-priority back-office ticket linked to the conversation, except for test visitors. Records a `conversation.csat_submitted` event when something changed, plus a `ticket.created` event for a follow-up ticket; a repeat that adds nothing records none. Limited to 30 attempts per 10 minutes per client IP address, failed ones included (429). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rating": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "Satisfaction rating, a whole number from 1 (worst) to 5 (best). Ignored when the conversation is already rated.",
                    "example": 4
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Optional comment, up to 2,000 characters; surrounding whitespace is trimmed and a blank comment is ignored. Kept only when the conversation has no comment yet.",
                    "example": "Quick answer, thanks!"
                  }
                },
                "required": [
                  "rating"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored rating",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rating": {
                      "type": "number",
                      "description": "Stored rating, from 1 to 5: the first rating the conversation received, which may differ from the one sent.",
                      "example": 4
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request stored a rating or a comment. False for a repeat that added nothing.",
                      "example": true
                    }
                  },
                  "required": [
                    "rating",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}/messages/{messageId}/feedback-card": {
      "put": {
        "operationId": "confirmQuillsFeedbackCard",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Confirm the feedback request that the assistant proposed to the signed-in customer",
        "description": "Marks the feedback request that the AI assistant proposed in a message as confirmed, with the post the caller made from it, and returns the updated message. The caller creates the post first, then confirms the card with its ID. Each card is confirmed once: a confirmed card answers 409. Records a `message.updated` event. Limited to 30 attempts per 10 minutes per client IP address, failed ones included (429). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the message that carries the feedback card. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": true,
            "description": "ID of the message that carries the feedback card. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postId": {
                    "type": "string",
                    "description": "ID of the caller's own feedback post made from the card. Accepts the TypeID or its UUID.",
                    "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                  }
                },
                "required": [
                  "postId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The message with its confirmed card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "fromVisitor": {
                          "type": "boolean",
                          "description": "Whether the caller wrote the message.",
                          "example": false
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                          "example": "agent"
                        },
                        "author": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                              "example": "Dana Whitfield"
                            },
                            "avatarUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "URL of the author's avatar image. Null when there's none.",
                              "example": "https://cdn.example.com/avatars/dana.png"
                            }
                          },
                          "required": [
                            "name",
                            "avatarUrl"
                          ],
                          "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                        },
                        "content": {
                          "type": "string",
                          "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Kind of the shared record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the shared record.",
                                "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                          "example": null
                        },
                        "fromAssistant": {
                          "type": "boolean",
                          "description": "Whether the AI assistant wrote the message.",
                          "example": false
                        },
                        "feedbackCard": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "title": {
                              "type": "string",
                              "description": "Proposed title of the feedback post.",
                              "example": "Export boards to CSV"
                            },
                            "body": {
                              "type": "string",
                              "description": "Proposed text of the feedback post.",
                              "example": "I'd like to export a board with all its posts to a CSV file."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "confirmed"
                              ],
                              "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                              "example": "proposed"
                            },
                            "postId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                              "example": null
                            }
                          },
                          "required": [
                            "title",
                            "body",
                            "status",
                            "postId"
                          ],
                          "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Title of the cited source.",
                                "example": "Reset your password"
                              },
                              "url": {
                                "type": "string",
                                "description": "URL of the cited source.",
                                "example": "https://help.example.com/articles/reset-your-password"
                              },
                              "sourceType": {
                                "type": "string",
                                "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                "example": "article"
                              }
                            },
                            "required": [
                              "title",
                              "url",
                              "sourceType"
                            ]
                          },
                          "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "fromVisitor",
                        "senderType",
                        "author",
                        "content",
                        "embeds",
                        "attachments",
                        "createdAt",
                        "editedAt",
                        "fromAssistant",
                        "feedbackCard",
                        "citations"
                      ],
                      "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation, message with a feedback card, or the caller's post not found, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The card is confirmed already",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}/resolution-feedback": {
      "post": {
        "operationId": "submitQuillsResolutionFeedback",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Confirm whether the assistant resolved a conversation of the signed-in customer",
        "description": "Records whether the AI assistant resolved one of the caller's conversations, on the conversation's latest assistant involvement. `resolved: true` marks it `resolved_confirmed`. `resolved: false` marks it `handed_off`, counts it as reopened after a resolution, and puts the conversation back in the team's queue as open and waiting, unless it ended as spam. Records an `assistant.resolution_feedback_recorded` event. Limited to 30 attempts per 10 minutes per client IP address, failed ones included (429). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resolved": {
                    "type": "boolean",
                    "description": "Whether the assistant's answer solved the caller's problem. False asks for a teammate.",
                    "example": true
                  }
                },
                "required": [
                  "resolved"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated assistant involvement status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "involvementId": {
                      "type": "string",
                      "description": "ID of the assistant involvement that was updated.",
                      "example": "assistant_involvement_01m8rzbs0tfk1asn1evm1ywsf8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "handed_off",
                        "resolved_confirmed",
                        "resolved_assumed",
                        "abandoned"
                      ],
                      "description": "Status of the involvement after the change: `resolved_confirmed` when the caller confirmed, `handed_off` when they didn't. Other values (`active`, `resolved_assumed`, `abandoned`) aren't returned by this route.",
                      "example": "resolved_confirmed"
                    }
                  },
                  "required": [
                    "involvementId",
                    "status"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, the assistant hasn't been involved in it, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}/handoff": {
      "post": {
        "operationId": "handoffQuillsPortalConversation",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Hand off a conversation to a human teammate",
        "description": "Hands one of the caller's conversations from the AI assistant to the team, for a customer who asks for a person. Makes no AI model call. Ends the assistant's active involvement so it stops replying, adds an internal handoff summary note for teammates, posts the confirmation reply \"I've connected you with our team.\", and sets the conversation open and waiting for the team. Not idempotent: each call adds a note and a reply. Records a `conversation.handed_off` event. Limited to 20 attempts per 15 minutes per client IP address and per signed-in account, failed ones included (429). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation message after deterministic handoff",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "handedOff": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`: the conversation was handed off.",
                      "example": true
                    },
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "fromVisitor": {
                          "type": "boolean",
                          "description": "Whether the caller wrote the message.",
                          "example": false
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                          "example": "agent"
                        },
                        "author": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                              "example": "Dana Whitfield"
                            },
                            "avatarUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "URL of the author's avatar image. Null when there's none.",
                              "example": "https://cdn.example.com/avatars/dana.png"
                            }
                          },
                          "required": [
                            "name",
                            "avatarUrl"
                          ],
                          "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                        },
                        "content": {
                          "type": "string",
                          "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Kind of the shared record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the shared record.",
                                "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                          "example": null
                        },
                        "fromAssistant": {
                          "type": "boolean",
                          "description": "Whether the AI assistant wrote the message.",
                          "example": false
                        },
                        "feedbackCard": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "title": {
                              "type": "string",
                              "description": "Proposed title of the feedback post.",
                              "example": "Export boards to CSV"
                            },
                            "body": {
                              "type": "string",
                              "description": "Proposed text of the feedback post.",
                              "example": "I'd like to export a board with all its posts to a CSV file."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "confirmed"
                              ],
                              "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                              "example": "proposed"
                            },
                            "postId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                              "example": null
                            }
                          },
                          "required": [
                            "title",
                            "body",
                            "status",
                            "postId"
                          ],
                          "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Title of the cited source.",
                                "example": "Reset your password"
                              },
                              "url": {
                                "type": "string",
                                "description": "URL of the cited source.",
                                "example": "https://help.example.com/articles/reset-your-password"
                              },
                              "sourceType": {
                                "type": "string",
                                "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                "example": "article"
                              }
                            },
                            "required": [
                              "title",
                              "url",
                              "sourceType"
                            ]
                          },
                          "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "fromVisitor",
                        "senderType",
                        "author",
                        "content",
                        "embeds",
                        "attachments",
                        "createdAt",
                        "editedAt",
                        "fromAssistant",
                        "feedbackCard",
                        "citations"
                      ],
                      "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                    }
                  },
                  "required": [
                    "handedOff",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/tickets": {
      "get": {
        "operationId": "getQuillsMyTickets",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "List the tickets of the signed-in customer",
        "description": "Lists the live customer tickets where the caller is the requester, newest first. Pages with `cursor` and `limit`; `nextCursor` is null on the last page. A caller without a customer profile yet gets an empty list. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the last ticket on the previous page; the page starts after it. Must be one of the caller's tickets (404 otherwise). Accepts the TypeID or its UUID. Omit for the first page.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": false,
            "description": "ID of the last ticket on the previous page; the page starts after it. Must be one of the caller's tickets (404 otherwise). Accepts the TypeID or its UUID. Omit for the first page.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of tickets to return, from 1 to 50. Defaults to 20.",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of tickets to return, from 1 to 50. Defaults to 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the caller's tickets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Ticket ID.",
                            "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                          },
                          "number": {
                            "type": "number",
                            "description": "Sequential ticket number, unique to the ticket.",
                            "example": 1042
                          },
                          "reference": {
                            "type": "string",
                            "description": "Display reference: `#` followed by the number.",
                            "example": "#1042"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title of the ticket.",
                            "example": "Refund for a duplicate charge"
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "received",
                              "in_progress",
                              "awaiting_requester",
                              "resolved",
                              null
                            ],
                            "description": "Requester-facing stage of the ticket's status. `received`: logged, not started; `in_progress`: the team is working on it; `awaiting_requester`: the team waits for the requester's reply; `resolved`: done. Null when the status has no public stage, so internal status names never show.",
                            "example": "in_progress"
                          },
                          "stageLabel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The workspace's label for `stage`, or the default label. Null when `stage` is null.",
                            "example": "In progress"
                          },
                          "ticketType": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Name of the ticket type.",
                                "example": "Billing question"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "description": "Type of the ticket. Null when it has none."
                          },
                          "conversationId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the paired conversation that carries the ticket's thread; read and reply there. Null when the ticket has none.",
                            "example": "conversation_01m8rzbs0sfk1asmzrwghg3gz9"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the ticket was opened, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:02:11.000Z"
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the ticket last changed, in ISO 8601 UTC. Null when it hasn't changed since it was opened.",
                            "example": "2026-03-14T10:15:42.000Z"
                          },
                          "resolvedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the ticket was resolved, in ISO 8601 UTC. Null while it's unresolved.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "number",
                          "reference",
                          "title",
                          "stage",
                          "stageLabel",
                          "ticketType",
                          "conversationId",
                          "createdAt",
                          "updatedAt",
                          "resolvedAt"
                        ],
                        "description": "A ticket as its requester sees it. Internal status names, priority, assignees and internal fields never appear."
                      },
                      "description": "The caller's tickets on this page."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Value of `cursor` for the next page: the ID of the last ticket here. Null on the last page.",
                      "example": null
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Cursor ticket not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createQuillsMyTicket",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Open a ticket as the signed-in customer",
        "description": "Opens a customer ticket with the caller as its requester, in the workspace's default status and with no priority. Without `ticketTypeId` the default intake type applies, if there is one. `fieldValues` answer the type's customer-visible fields, which are checked against the form (400 for a missing required answer or an invalid one); keys that aren't fields of the form are dropped. The ticket gets its own paired conversation, which carries its thread, with the description as the first message. The caller watches the ticket as its requester. An anonymous widget visitor needs a contact email first (409). Records a `ticket.created` event. Limited to 10 attempts per 10 minutes per client IP address, failed ones included (429). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300,
                    "description": "Title of the ticket, 1 to 300 characters after trimming surrounding whitespace.",
                    "example": "Refund for a duplicate charge"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "Details of the request, up to 4,000 characters after trimming. Becomes the first message of the ticket's conversation. Omit or leave empty for no first message.",
                    "example": "I was charged twice for my March invoice. Order A-10442."
                  },
                  "ticketTypeId": {
                    "type": "string",
                    "description": "ID of the ticket type, from the intake form. Must be a live customer type shown on the form (404 otherwise). Accepts the TypeID or its UUID. Omit for the default type.",
                    "example": "ticket_type_01m8rzbs0tfk1asn0xzha8ebsg"
                  },
                  "fieldValues": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Map of attribute key (1 to 64 characters) to value: a string of up to 4000 characters, a number, a boolean, or null. At most 50 keys.",
                    "example": {
                      "order_number": "A-10442",
                      "priority_customer": true
                    }
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new ticket",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Ticket ID.",
                      "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                    },
                    "number": {
                      "type": "number",
                      "description": "Sequential ticket number, unique to the ticket.",
                      "example": 1042
                    },
                    "reference": {
                      "type": "string",
                      "description": "Display reference: `#` followed by the number.",
                      "example": "#1042"
                    },
                    "title": {
                      "type": "string",
                      "description": "Title of the ticket.",
                      "example": "Refund for a duplicate charge"
                    },
                    "stage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "received",
                        "in_progress",
                        "awaiting_requester",
                        "resolved",
                        null
                      ],
                      "description": "Requester-facing stage of the ticket's status. `received`: logged, not started; `in_progress`: the team is working on it; `awaiting_requester`: the team waits for the requester's reply; `resolved`: done. Null when the status has no public stage, so internal status names never show.",
                      "example": "in_progress"
                    },
                    "stageLabel": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The workspace's label for `stage`, or the default label. Null when `stage` is null.",
                      "example": "In progress"
                    },
                    "ticketType": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Name of the ticket type.",
                          "example": "Billing question"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "Type of the ticket. Null when it has none."
                    },
                    "conversationId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the paired conversation that carries the ticket's thread; read and reply there. Null when the ticket has none.",
                      "example": "conversation_01m8rzbs0sfk1asmzrwghg3gz9"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the ticket was opened, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the ticket last changed, in ISO 8601 UTC. Null when it hasn't changed since it was opened.",
                      "example": "2026-03-14T10:15:42.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the ticket was resolved, in ISO 8601 UTC. Null while it's unresolved.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "reference",
                    "title",
                    "stage",
                    "stageLabel",
                    "ticketType",
                    "conversationId",
                    "createdAt",
                    "updatedAt",
                    "resolvedAt"
                  ],
                  "description": "A ticket as its requester sees it. Internal status names, priority, assignees and internal fields never appear."
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket type not found or not on the intake form, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No contact email for an anonymous visitor, or no default ticket status is configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/ticket-form": {
      "get": {
        "operationId": "getQuillsMyTicketForm",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the ticket types and fields the signed-in customer can file",
        "description": "Returns the ticket types the caller can file: live customer types shown on the intake form, in the workspace's order, each with only its customer-visible fields in form order. Answer the fields in `fieldValues` when opening a ticket. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The intake form",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "types": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Ticket type ID, for `ticketTypeId`.",
                            "example": "ticket_type_01m8rzbs0tfk1asn0xzha8ebsg"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the ticket type.",
                            "example": "Billing question"
                          },
                          "slug": {
                            "type": "string",
                            "description": "URL-safe identifier of the ticket type.",
                            "example": "billing-question"
                          },
                          "isDefault": {
                            "type": "boolean",
                            "description": "Whether this is the default type, used when a ticket names none.",
                            "example": true
                          },
                          "fields": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Key of the field in `fieldValues`.",
                                  "example": "order_number"
                                },
                                "label": {
                                  "type": "string",
                                  "description": "Label to show for the field.",
                                  "example": "Order number"
                                },
                                "type": {
                                  "type": "string",
                                  "description": "Kind of answer. `text` and `long_text`: a string of up to 4,000 characters; `number`: a number; `select`: one of `options`; `date`: an ISO 8601 date; `checkbox`: a boolean.",
                                  "example": "text"
                                },
                                "required": {
                                  "type": "boolean",
                                  "description": "Whether the field must be answered; a required checkbox must be checked.",
                                  "example": true
                                },
                                "options": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "Allowed answers of a `select` field. Empty for other kinds.",
                                  "example": []
                                }
                              },
                              "required": [
                                "key",
                                "label",
                                "type",
                                "required",
                                "options"
                              ]
                            },
                            "description": "Customer-visible fields of the type, in form order."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "isDefault",
                          "fields"
                        ]
                      },
                      "description": "Ticket types the caller can choose from. Empty when none is set up."
                    }
                  },
                  "required": [
                    "types"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/ticket-stage-labels": {
      "get": {
        "operationId": "getQuillsMyTicketStageLabels",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the requester-facing ticket stage labels",
        "description": "Returns the label to show for each requester-facing ticket stage, for the stage tracker: the workspace's saved label, else the default (`Received`, `In progress`, `Awaiting your reply`, `Resolved`). Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The stage labels",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "received": {
                      "type": "string",
                      "description": "Label of the `received` stage, up to 60 characters. Defaults to \"Received\".",
                      "example": "Received"
                    },
                    "in_progress": {
                      "type": "string",
                      "description": "Label of the `in_progress` stage, up to 60 characters. Defaults to \"In progress\".",
                      "example": "In progress"
                    },
                    "awaiting_requester": {
                      "type": "string",
                      "description": "Label of the `awaiting_requester` stage, up to 60 characters. Defaults to \"Awaiting your reply\".",
                      "example": "Awaiting your reply"
                    },
                    "resolved": {
                      "type": "string",
                      "description": "Label of the `resolved` stage, up to 60 characters. Defaults to \"Resolved\".",
                      "example": "Resolved"
                    }
                  },
                  "required": [
                    "received",
                    "in_progress",
                    "awaiting_requester",
                    "resolved"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/tickets/{ticketId}/watch": {
      "get": {
        "operationId": "getQuillsMyTicketWatchStatus",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get whether the signed-in customer watches a ticket",
        "description": "Returns whether the caller watches one of their own tickets, and until when the watch is muted. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the caller's watch is muted, in ISO 8601 UTC. Null when not muted or not watching.",
                      "example": null
                    }
                  },
                  "required": [
                    "watching",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "watchQuillsMyTicket",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Watch a ticket of the signed-in customer",
        "description": "Subscribes the caller to one of their own tickets. Idempotent: an existing subscription keeps its reason and mute. Records no event, since a watch is the requester's own preference. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the caller's watch is muted, in ISO 8601 UTC. Null when not muted or not watching.",
                      "example": null
                    }
                  },
                  "required": [
                    "watching",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unwatchQuillsMyTicket",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Stop watching a ticket of the signed-in customer",
        "description": "Removes the caller's subscription to one of their own tickets, whatever its reason. Idempotent. Records no event, since a watch is the requester's own preference. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked. Writes from a blocked IP address also get 403. Creates the caller's customer profile on first use.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the caller's watch is muted, in ISO 8601 UTC. Null when not muted or not watching.",
                      "example": null
                    }
                  },
                  "required": [
                    "watching",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/conversations/{conversationId}/ticket": {
      "get": {
        "operationId": "getQuillsConversationLinkedTicket",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the ticket paired with a conversation of the signed-in customer",
        "description": "Returns the customer ticket paired with one of the caller's conversations, or null when the conversation has no live ticket of the caller. Called by a customer signed in to the portal with their session (401 when signed out). 404 while the portal or its support is off; 403 when a private portal doesn't admit the caller or the customer is blocked.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The paired ticket, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ticket": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Ticket ID.",
                          "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                        },
                        "number": {
                          "type": "number",
                          "description": "Sequential ticket number, unique to the ticket.",
                          "example": 1042
                        },
                        "reference": {
                          "type": "string",
                          "description": "Display reference: `#` followed by the number.",
                          "example": "#1042"
                        },
                        "title": {
                          "type": "string",
                          "description": "Title of the ticket.",
                          "example": "Refund for a duplicate charge"
                        },
                        "stage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "received",
                            "in_progress",
                            "awaiting_requester",
                            "resolved",
                            null
                          ],
                          "description": "Requester-facing stage of the ticket's status. `received`: logged, not started; `in_progress`: the team is working on it; `awaiting_requester`: the team waits for the requester's reply; `resolved`: done. Null when the status has no public stage, so internal status names never show.",
                          "example": "in_progress"
                        },
                        "stageLabel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The workspace's label for `stage`, or the default label. Null when `stage` is null.",
                          "example": "In progress"
                        },
                        "ticketType": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "Name of the ticket type.",
                              "example": "Billing question"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "description": "Type of the ticket. Null when it has none."
                        },
                        "conversationId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the paired conversation that carries the ticket's thread; read and reply there. Null when the ticket has none.",
                          "example": "conversation_01m8rzbs0sfk1asmzrwghg3gz9"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the ticket was opened, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the ticket last changed, in ISO 8601 UTC. Null when it hasn't changed since it was opened.",
                          "example": "2026-03-14T10:15:42.000Z"
                        },
                        "resolvedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the ticket was resolved, in ISO 8601 UTC. Null while it's unresolved.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "number",
                        "reference",
                        "title",
                        "stage",
                        "stageLabel",
                        "ticketType",
                        "conversationId",
                        "createdAt",
                        "updatedAt",
                        "resolvedAt"
                      ],
                      "description": "The ticket paired with the conversation. Null when there's none."
                    }
                  },
                  "required": [
                    "ticket"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the portal or its support is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/presence": {
      "get": {
        "operationId": "getQuillsConversationPresence",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the team's availability for the portal support pages",
        "description": "Returns the support team's availability for the portal's support pages: whether a teammate is online, whether the office hours are open and when they next open, and the typical wait for a first reply. Sign-in is optional, and the answer holds no ID or email. `agentsOnline` is true while a teammate who isn't set to away has the inbox open. Answers 404 while the portal or its support pages are off, and 403 when the portal is private and the caller has no access.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The team's availability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agentsOnline": {
                      "type": "boolean",
                      "description": "Whether at least one teammate is online: one who sent an inbox heartbeat in the last 90 seconds and hasn't set their chat availability to away.",
                      "example": true
                    },
                    "withinOfficeHours": {
                      "type": "boolean",
                      "description": "Whether the workspace's office hours are open now. True when office hours are off, unset or invalid.",
                      "example": false
                    },
                    "nextOpenAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Time the office hours next open, as an ISO 8601 UTC string, looked up to 14 days ahead. Null while they're open, when they're off, or when no opening falls in the next 14 days.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "estimatedWaitMinutes": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Median time to a first reply, in whole minutes (at least 1), over conversations created in the last 30 days, leaving out test and spam conversations. Null when fewer than 3 such conversations had a reply.",
                      "example": 12
                    },
                    "estimatedWaitRange": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "minMinutes": {
                          "type": "number",
                          "description": "25th percentile of the first-reply time, in whole minutes. At least 1.",
                          "example": 6
                        },
                        "maxMinutes": {
                          "type": "number",
                          "description": "75th percentile of the first-reply time, in whole minutes. Never below `medianMinutes`.",
                          "example": 18
                        },
                        "medianMinutes": {
                          "type": "number",
                          "description": "Median first-reply time, in whole minutes. Never below `minMinutes`.",
                          "example": 12
                        },
                        "label": {
                          "type": "string",
                          "description": "Readable form of the range, such as `under 10 minutes`, `5–20 minutes`, `about 2 hours` or `about 1 business day`.",
                          "example": "5–20 minutes"
                        }
                      },
                      "required": [
                        "minMinutes",
                        "maxMinutes",
                        "medianMinutes",
                        "label"
                      ],
                      "description": "Typical wait for a first reply, from the same 30-day sample as `estimatedWaitMinutes`. Null when there are too few replies to estimate."
                    }
                  },
                  "required": [
                    "agentsOnline",
                    "withinOfficeHours"
                  ],
                  "description": "The support team's availability and an estimate of the wait for a first reply."
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Portal not found or off, or its support pages are off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/embed-preview": {
      "get": {
        "operationId": "getQuillsEmbedPreview",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get an embed preview card for the portal",
        "description": "Returns a preview card for a record that rich text or a message embeds: a feedback post, a changelog entry, a help-center article or a ticket. Each kind follows the read rule of its own customer routes, so a card never shows what the caller couldn't open: a post the caller can see on the portal, a published changelog entry the caller may read, an article of the help center while it's open to the caller, or the caller's own customer ticket while the tickets tab is on. A record that is missing or hidden from the caller answers `unavailable: true` and names nothing. The card sits under the key named by `kind`; the other cards are null. Sign-in is optional. Answers 404 while the portal is off, and 403 for a blocked account or when the portal is private and the caller has no access.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "post",
                "changelog",
                "article",
                "ticket"
              ],
              "description": "Kind of record to preview. `post`: a feedback post. `changelog`: a changelog entry. `article`: a help-center article. `ticket`: one of the caller's own tickets.",
              "example": "post"
            },
            "required": true,
            "description": "Kind of record to preview. `post`: a feedback post. `changelog`: a changelog entry. `article`: a help-center article. `ticket`: one of the caller's own tickets.",
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[\\x21-\\x7e]+$",
              "description": "TypeID of the post, changelog entry or ticket, or the slug of the article. Visible ASCII characters only, 1 to 200.",
              "example": "post_01m8rzgvbkeh787gg7n4dxh1eg"
            },
            "required": true,
            "description": "TypeID of the post, changelog entry or ticket, or the slug of the article. Visible ASCII characters only, 1 to 200.",
            "name": "id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The card, or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unavailable": {
                      "type": "boolean",
                      "description": "Whether the record is unavailable: missing, or not visible to the caller. When true, every card is null.",
                      "example": false
                    },
                    "post": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Title of the post, changelog entry, article or ticket.",
                          "example": "Export conversations to CSV"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Link to the record's portal page. Null for a ticket without a support conversation.",
                          "example": "https://app.example.com/portal/cfklow33tpuxgpxko9nxqllg/posts/post_01m8rzgvbkeh787gg7n4dxh1eg"
                        },
                        "postId": {
                          "type": "string",
                          "description": "ID of the post.",
                          "example": "post_01m8rzgvbkeh787gg7n4dxh1eg"
                        },
                        "excerpt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Start of the post's body, on one line and cut to 140 characters with a trailing `…`. Null when the body is empty.",
                          "example": "Dana needs a monthly CSV export of all conversations."
                        },
                        "voteCount": {
                          "type": "number",
                          "description": "Number of votes on the post.",
                          "example": 24
                        },
                        "statusName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Name of the post's status. Null when it has none or the status was deleted.",
                          "example": "Planned"
                        },
                        "statusColor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Color of the post's status, as stored (a hex code). Null when the post has no live status.",
                          "example": "#3b82f6"
                        },
                        "boardName": {
                          "type": "string",
                          "description": "Name of the post's board.",
                          "example": "Feature requests"
                        },
                        "boardSlug": {
                          "type": "string",
                          "description": "URL slug of the post's board.",
                          "example": "feature-requests"
                        },
                        "createdAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the post was created, in ISO 8601 UTC.",
                          "example": "2026-02-03T15:20:00.000Z"
                        }
                      },
                      "required": [
                        "title",
                        "url",
                        "postId",
                        "excerpt",
                        "voteCount",
                        "statusName",
                        "statusColor",
                        "boardName",
                        "boardSlug",
                        "createdAt"
                      ],
                      "description": "Post card, when `kind` is `post` and the post is available. Null otherwise."
                    },
                    "changelog": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Title of the post, changelog entry, article or ticket.",
                          "example": "Export conversations to CSV"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Link to the record's portal page. Null for a ticket without a support conversation.",
                          "example": "https://app.example.com/portal/cfklow33tpuxgpxko9nxqllg/posts/post_01m8rzgvbkeh787gg7n4dxh1eg"
                        },
                        "entryId": {
                          "type": "string",
                          "description": "ID of the changelog entry.",
                          "example": "changelog_01m8rzgvbkeh787ggem6sxnwd6"
                        },
                        "publishedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Date shown for the entry, in ISO 8601 UTC: its display date when set, else its publish time.",
                          "example": "2026-03-10T12:00:00.000Z"
                        }
                      },
                      "required": [
                        "title",
                        "url",
                        "entryId",
                        "publishedAt"
                      ],
                      "description": "Changelog entry card, when `kind` is `changelog` and the entry is available. Null otherwise."
                    },
                    "article": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Title of the post, changelog entry, article or ticket.",
                          "example": "Export conversations to CSV"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Link to the record's portal page. Null for a ticket without a support conversation.",
                          "example": "https://app.example.com/portal/cfklow33tpuxgpxko9nxqllg/posts/post_01m8rzgvbkeh787gg7n4dxh1eg"
                        },
                        "articleId": {
                          "type": "string",
                          "description": "ID of the help-center article.",
                          "example": "article_01m8rzgvbkeh787ggqabcer0dp"
                        },
                        "slug": {
                          "type": "string",
                          "description": "URL slug of the article.",
                          "example": "reset-your-password"
                        },
                        "excerpt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The article's description, else the start of its content, on one line and cut to 140 characters with a trailing `…`. Null when both are empty.",
                          "example": "Steps to reset a forgotten password from the sign-in page."
                        },
                        "categorySlug": {
                          "type": "string",
                          "description": "URL slug of the article's category.",
                          "example": "account"
                        }
                      },
                      "required": [
                        "title",
                        "url",
                        "articleId",
                        "slug",
                        "excerpt",
                        "categorySlug"
                      ],
                      "description": "Help-center article card, when `kind` is `article` and the article is available. Null otherwise."
                    },
                    "ticket": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Title of the post, changelog entry, article or ticket.",
                          "example": "Export conversations to CSV"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Link to the record's portal page. Null for a ticket without a support conversation.",
                          "example": "https://app.example.com/portal/cfklow33tpuxgpxko9nxqllg/posts/post_01m8rzgvbkeh787gg7n4dxh1eg"
                        },
                        "ticketId": {
                          "type": "string",
                          "description": "ID of the ticket.",
                          "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                        },
                        "conversationId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the support conversation paired with the ticket, which `url` opens. Null when there's none.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "reference": {
                          "type": "string",
                          "description": "Ticket number with a leading `#`.",
                          "example": "#1042"
                        },
                        "stageLabel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Label of the ticket's public stage, as the workspace names it (for example `Received`, `In progress`, `Awaiting your reply` or `Resolved`). Null when its status has no public stage.",
                          "example": "In progress"
                        },
                        "createdAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the ticket was created, in ISO 8601 UTC.",
                          "example": "2026-03-12T08:45:00.000Z"
                        }
                      },
                      "required": [
                        "title",
                        "url",
                        "ticketId",
                        "conversationId",
                        "reference",
                        "stageLabel",
                        "createdAt"
                      ],
                      "description": "Ticket card, when `kind` is `ticket` and the ticket is available to the caller. Null otherwise."
                    }
                  },
                  "required": [
                    "unavailable",
                    "post",
                    "changelog",
                    "article",
                    "ticket"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Blocked account, or a private portal that the caller can't access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Portal not found or off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/support/link-preview": {
      "get": {
        "operationId": "unfurlQuillsPortalLink",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get a link preview for a web page",
        "description": "Returns a link preview of a web page: its title, description and site name, read from the first 200 KB of the page's HTML head. Answers `preview: null`, with no error detail, for a private, loopback, link-local or metadata address or a redirect to one, more than 3 redirects, no answer within 5 seconds, a status other than 2xx, a body that isn't HTML, a page with neither a title nor a description, more than 2 previews already running in the API process, or any other failure. Nothing is cached. Needs a signed-in portal customer, and answers 404 while the portal or its support pages are off. At most 30 requests a minute for each client address. A private address is never previewed here: while the instance allows private destinations, this route answers `preview: null` for every URL.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri",
              "description": "URL of the web page to preview: an absolute `http` or `https` URL, up to 2,048 characters.",
              "example": "https://example.com/blog/spring-release"
            },
            "required": true,
            "description": "URL of the web page to preview: an absolute `http` or `https` URL, up to 2,048 characters.",
            "name": "url",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The preview, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "preview": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Final URL of the page, after redirects.",
                          "example": "https://example.com/blog/spring-release"
                        },
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Page title: the OpenGraph title, else the Twitter title, else the `<title>` tag. HTML entities decoded, on one line, up to 200 characters. Null when the page has none.",
                          "example": "Our spring release is here"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Page description: the OpenGraph description, else the Twitter description, else the `description` meta tag. HTML entities decoded, on one line, up to 500 characters. Null when the page has none.",
                          "example": "Faster search, saved replies and a new mobile inbox."
                        },
                        "siteName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Site name from the OpenGraph `og:site_name` tag, up to 100 characters. Null when the page has none.",
                          "example": "Example Blog"
                        }
                      },
                      "required": [
                        "url",
                        "title",
                        "description",
                        "siteName"
                      ],
                      "description": "The preview. Null when the page couldn't be fetched or read, or has neither a title nor a description."
                    }
                  },
                  "required": [
                    "preview"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Portal not found or off, or its support pages are off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/team-avatars": {
      "get": {
        "operationId": "listQuillsWidgetTeamAvatars",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List up to four teammate avatars for the widget header",
        "description": "Lists the display name and avatar of up to four teammate principals, oldest first: never a customer, a visitor or a service principal. Needs no credential and returns no ID or email. Empty while Home's team avatars are off. Answers 404 while the widget is off.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Teammate avatars",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "The teammate's display name",
                            "example": "Sam Lee"
                          },
                          "avatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The teammate's avatar URL. Null when none is set.",
                            "example": "https://cdn.example.com/avatars/sam.png"
                          }
                        },
                        "required": [
                          "name",
                          "avatarUrl"
                        ]
                      },
                      "description": "Up to four teammates"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations": {
      "get": {
        "operationId": "listQuillsWidgetConversations",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List the conversations of the widget visitor",
        "description": "Lists the caller's own conversations, most recent activity (`lastMessageAt`) first, with each one's unread count. Pages with `cursor` and `limit`; `nextCursor` is null on the last page. A caller without a customer profile yet gets an empty list. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the last conversation on the previous page; the page starts after it. Must be one of the caller's conversations (404 otherwise). Accepts the TypeID or its UUID. Omit for the first page.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": false,
            "description": "ID of the last conversation on the previous page; the page starts after it. Must be one of the caller's conversations (404 otherwise). Accepts the TypeID or its UUID. Omit for the first page.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of conversations to return, from 1 to 50. Defaults to 20.",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of conversations to return, from 1 to 50. Defaults to 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the caller's conversations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation ID.",
                            "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "open",
                              "snoozed",
                              "closed"
                            ],
                            "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                            "example": "open"
                          },
                          "customerStatus": {
                            "type": "string",
                            "enum": [
                              "received",
                              "in_progress",
                              "awaiting_requester",
                              "resolved"
                            ],
                            "description": "Progress as shown to the customer. `received`: no teammate has answered or taken it yet; `in_progress`: a teammate answered or was assigned; `awaiting_requester`: a teammate offered a solution that waits for the customer's confirmation; `resolved`: the conversation is closed.",
                            "example": "in_progress"
                          },
                          "isReadOnly": {
                            "type": "boolean",
                            "description": "Whether the conversation is closed. The customer can still send a message: it reopens the conversation or, under the workspace's reopen policy, starts a follow-up conversation.",
                            "example": false
                          },
                          "subject": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Subject of the conversation. For one the customer started, the first 140 characters of the first message. Null when it has none.",
                            "example": "I can't sign in after resetting my password"
                          },
                          "preview": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Preview of the latest message, up to 140 characters. Null when there's none.",
                            "example": "I've reset the password on the account. Please try signing in again."
                          },
                          "lastMessageAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time of the latest message, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the conversation was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:02:11.000Z"
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "solutionOfferedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time a teammate offered a solution that waits for the customer's confirmation, in ISO 8601 UTC. Null when no solution is pending.",
                            "example": null
                          },
                          "unreadCount": {
                            "type": "number",
                            "description": "Number of team messages after the caller's read watermark.",
                            "example": 1
                          },
                          "csatRating": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Customer's satisfaction rating, from 1 (worst) to 5 (best). Null until rated.",
                            "example": null
                          },
                          "csatSubmittedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time of the first rating, in ISO 8601 UTC. Null until rated.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "isReadOnly",
                          "subject",
                          "preview",
                          "lastMessageAt",
                          "createdAt",
                          "unreadCount",
                          "csatRating",
                          "csatSubmittedAt"
                        ],
                        "description": "A conversation as the customer sees it. Assignees, tags and internal fields never appear."
                      },
                      "description": "The caller's conversations on this page."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Value of `cursor` for the next page: the ID of the last conversation here. Null on the last page.",
                      "example": null
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Cursor conversation not found or not the caller's, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "startQuillsWidgetConversation",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Start a conversation as the widget visitor",
        "description": "Starts a conversation with the caller's first message and returns both. The first 140 characters of the message become the subject. When the workspace's away reply is on and the team is away (outside office hours or with no teammate online), posts the away reply. A message that looks like spam, from a sender who isn't on the workspace's trusted list, creates the conversation already closed as spam, with no away reply. The widget's anti-spam settings can require a solved `challenge` (403 without a valid one) and apply their own per-address, per-visitor and per-workspace limits (429). Idempotent by `idempotencyKey`: a retry with the same key and text returns the first result with `replayed: true`. Records a `conversation.created` event, except on a replay. Limited to 500 attempts per 10 minutes per client IP address, failed ones included (429). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Message text, as plain text. Leading and trailing whitespace is trimmed. 1 to 10,000 characters.",
                    "example": "I've reset the password on the account. Please try signing in again."
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$",
                    "description": "Client-generated key that makes the request safe to retry: 8 to 128 letters, digits, `_` or `-`. Use a new key for each new message. A retry with the same key, text and attachments returns the first result with `replayed: true` and writes nothing. The key is scoped to the caller and, for a reply, to the conversation. Reusing it with other text or attachments fails with 409, and so does a key whose 7-day receipt has expired.",
                    "example": "msg-7f3c9a2e41b8"
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "default": [],
                    "description": "IDs of files to attach, up to 10 and each once. Each must be one of the caller's own uploads that isn't attached to a message yet; a file of another person, a removed file or an attached one fails the request with 404 and nothing is attached. Accepts TypeIDs or UUIDs. Attachments keep the order sent. Defaults to none.",
                    "example": [
                      "file_01m8rxy505fewvz41w7gqgp4p1"
                    ]
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": "Context from the host page, such as pageUrl and browser, and keys that the host app set with the widget's metadata command: up to 20 keys of 1 to 64 characters, each value up to 500 characters. Stored with the message for the team; never returned to the visitor."
                  },
                  "challenge": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "pow"
                            ],
                            "description": "A proof-of-work challenge that this API issued."
                          },
                          "token": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "description": "The challenge token as issued. It is bound to the workspace and the client IP address, expires, and works once.",
                            "example": "tz4a98xxat96iws9zmbrgj3a.Q2hhbGxlbmdlSVA.18.1767225600.c2FsdHNhbHQ.c2lnbmF0dXJl"
                          },
                          "nonce": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "description": "A value whose SHA-256 hash of `token:nonce` starts with the required number of zero bits.",
                            "example": "48213"
                          }
                        },
                        "required": [
                          "provider",
                          "token",
                          "nonce"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "provider": {
                            "type": "string",
                            "enum": [
                              "turnstile"
                            ],
                            "description": "A Cloudflare Turnstile challenge."
                          },
                          "token": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096,
                            "description": "The token that the Turnstile widget returned.",
                            "example": "0.ZmFrZS10dXJuc3RpbGUtdG9rZW4"
                          }
                        },
                        "required": [
                          "provider",
                          "token"
                        ]
                      }
                    ],
                    "description": "A solved anti-spam challenge. Needed only when the widget's anti-spam settings ask for one. A missing or wrong one then gets 403 with CHALLENGE_REQUIRED or CHALLENGE_INVALID."
                  }
                },
                "required": [
                  "content",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new conversation and its first message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "fromVisitor": {
                          "type": "boolean",
                          "description": "Whether the caller wrote the message.",
                          "example": false
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                          "example": "agent"
                        },
                        "author": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                              "example": "Dana Whitfield"
                            },
                            "avatarUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "URL of the author's avatar image. Null when there's none.",
                              "example": "https://cdn.example.com/avatars/dana.png"
                            }
                          },
                          "required": [
                            "name",
                            "avatarUrl"
                          ],
                          "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                        },
                        "content": {
                          "type": "string",
                          "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Kind of the shared record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the shared record.",
                                "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                          "example": null
                        },
                        "fromAssistant": {
                          "type": "boolean",
                          "description": "Whether the AI assistant wrote the message.",
                          "example": false
                        },
                        "feedbackCard": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "title": {
                              "type": "string",
                              "description": "Proposed title of the feedback post.",
                              "example": "Export boards to CSV"
                            },
                            "body": {
                              "type": "string",
                              "description": "Proposed text of the feedback post.",
                              "example": "I'd like to export a board with all its posts to a CSV file."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "confirmed"
                              ],
                              "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                              "example": "proposed"
                            },
                            "postId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                              "example": null
                            }
                          },
                          "required": [
                            "title",
                            "body",
                            "status",
                            "postId"
                          ],
                          "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Title of the cited source.",
                                "example": "Reset your password"
                              },
                              "url": {
                                "type": "string",
                                "description": "URL of the cited source.",
                                "example": "https://help.example.com/articles/reset-your-password"
                              },
                              "sourceType": {
                                "type": "string",
                                "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                "example": "article"
                              }
                            },
                            "required": [
                              "title",
                              "url",
                              "sourceType"
                            ]
                          },
                          "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "fromVisitor",
                        "senderType",
                        "author",
                        "content",
                        "embeds",
                        "attachments",
                        "createdAt",
                        "editedAt",
                        "fromAssistant",
                        "feedbackCard",
                        "citations"
                      ],
                      "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                    },
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                          "example": "open"
                        },
                        "customerStatus": {
                          "type": "string",
                          "enum": [
                            "received",
                            "in_progress",
                            "awaiting_requester",
                            "resolved"
                          ],
                          "description": "Progress as shown to the customer. `received`: no teammate has answered or taken it yet; `in_progress`: a teammate answered or was assigned; `awaiting_requester`: a teammate offered a solution that waits for the customer's confirmation; `resolved`: the conversation is closed.",
                          "example": "in_progress"
                        },
                        "isReadOnly": {
                          "type": "boolean",
                          "description": "Whether the conversation is closed. The customer can still send a message: it reopens the conversation or, under the workspace's reopen policy, starts a follow-up conversation.",
                          "example": false
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Subject of the conversation. For one the customer started, the first 140 characters of the first message. Null when it has none.",
                          "example": "I can't sign in after resetting my password"
                        },
                        "preview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Preview of the latest message, up to 140 characters. Null when there's none.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of the latest message, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "solutionOfferedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate offered a solution that waits for the customer's confirmation, in ISO 8601 UTC. Null when no solution is pending.",
                          "example": null
                        },
                        "unreadCount": {
                          "type": "number",
                          "description": "Number of team messages after the caller's read watermark.",
                          "example": 1
                        },
                        "csatRating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer's satisfaction rating, from 1 (worst) to 5 (best). Null until rated.",
                          "example": null
                        },
                        "csatSubmittedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the first rating, in ISO 8601 UTC. Null until rated.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "isReadOnly",
                        "subject",
                        "preview",
                        "lastMessageAt",
                        "createdAt",
                        "unreadCount",
                        "csatRating",
                        "csatSubmittedAt"
                      ],
                      "description": "A conversation as the customer sees it. Assignees, tags and internal fields never appear."
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "Whether this request repeated an earlier one with the same idempotency key. When true, nothing new was written and the response describes the first request's message.",
                      "example": false
                    }
                  },
                  "required": [
                    "message",
                    "conversation",
                    "replayed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Anti-spam challenge required (`CHALLENGE_REQUIRED`) or invalid (`CHALLENGE_INVALID`), host origin not allowed, or visitor or IP address blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The widget's messenger tab is off, or an attachment isn't one of the caller's unattached uploads; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The idempotency key was used for a different message, or its 7-day receipt has expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/unread": {
      "get": {
        "operationId": "getQuillsWidgetUnreadCount",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Count the unread team messages of the widget visitor",
        "description": "Returns the number of team messages after the caller's read watermark, across all of the caller's conversations, for the launcher badge to poll. A caller without a customer profile yet gets 0. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The unread count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of unread team messages across the caller's conversations.",
                      "example": 2
                    }
                  },
                  "required": [
                    "unreadCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}": {
      "get": {
        "operationId": "getQuillsWidgetConversation",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get a conversation of the widget visitor with its latest messages",
        "description": "Returns one of the caller's conversations with its latest 30 customer-visible messages, oldest first. When `hasMore` is true, older messages exist: page back with the messages route and `before`. `teamTyping` is true for 8 seconds after a teammate signals typing. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                          "example": "open"
                        },
                        "customerStatus": {
                          "type": "string",
                          "enum": [
                            "received",
                            "in_progress",
                            "awaiting_requester",
                            "resolved"
                          ],
                          "description": "Progress as shown to the customer. `received`: no teammate has answered or taken it yet; `in_progress`: a teammate answered or was assigned; `awaiting_requester`: a teammate offered a solution that waits for the customer's confirmation; `resolved`: the conversation is closed.",
                          "example": "in_progress"
                        },
                        "isReadOnly": {
                          "type": "boolean",
                          "description": "Whether the conversation is closed. The customer can still send a message: it reopens the conversation or, under the workspace's reopen policy, starts a follow-up conversation.",
                          "example": false
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Subject of the conversation. For one the customer started, the first 140 characters of the first message. Null when it has none.",
                          "example": "I can't sign in after resetting my password"
                        },
                        "preview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Preview of the latest message, up to 140 characters. Null when there's none.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of the latest message, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "solutionOfferedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate offered a solution that waits for the customer's confirmation, in ISO 8601 UTC. Null when no solution is pending.",
                          "example": null
                        },
                        "unreadCount": {
                          "type": "number",
                          "description": "Number of team messages after the caller's read watermark.",
                          "example": 1
                        },
                        "csatRating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer's satisfaction rating, from 1 (worst) to 5 (best). Null until rated.",
                          "example": null
                        },
                        "csatSubmittedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the first rating, in ISO 8601 UTC. Null until rated.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "isReadOnly",
                        "subject",
                        "preview",
                        "lastMessageAt",
                        "createdAt",
                        "unreadCount",
                        "csatRating",
                        "csatSubmittedAt"
                      ],
                      "description": "A conversation as the customer sees it. Assignees, tags and internal fields never appear."
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Message ID.",
                            "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                          },
                          "conversationId": {
                            "type": "string",
                            "description": "ID of the conversation the message belongs to.",
                            "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                          },
                          "fromVisitor": {
                            "type": "boolean",
                            "description": "Whether the caller wrote the message.",
                            "example": false
                          },
                          "senderType": {
                            "type": "string",
                            "enum": [
                              "visitor",
                              "agent",
                              "system"
                            ],
                            "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                            "example": "agent"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                                "example": "Dana Whitfield"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "URL of the author's avatar image. Null when there's none.",
                                "example": "https://cdn.example.com/avatars/dana.png"
                              }
                            },
                            "required": [
                              "name",
                              "avatarUrl"
                            ],
                            "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                          },
                          "content": {
                            "type": "string",
                            "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                            "example": "I've reset the password on the account. Please try signing in again."
                          },
                          "embeds": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "description": "Kind of the shared record, such as `post`.",
                                  "example": "post"
                                },
                                "id": {
                                  "type": "string",
                                  "description": "ID of the shared record.",
                                  "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                                }
                              },
                              "required": [
                                "kind",
                                "id"
                              ]
                            },
                            "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fileId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                  "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "File name.",
                                  "example": "invoice-2026-03.pdf"
                                },
                                "contentType": {
                                  "type": "string",
                                  "description": "MIME type of the file.",
                                  "example": "application/pdf"
                                },
                                "size": {
                                  "type": "number",
                                  "description": "File size in bytes.",
                                  "example": 48213
                                }
                              },
                              "required": [
                                "fileId",
                                "name",
                                "contentType",
                                "size"
                              ]
                            },
                            "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "editedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                            "example": null
                          },
                          "fromAssistant": {
                            "type": "boolean",
                            "description": "Whether the AI assistant wrote the message.",
                            "example": false
                          },
                          "feedbackCard": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Proposed title of the feedback post.",
                                "example": "Export boards to CSV"
                              },
                              "body": {
                                "type": "string",
                                "description": "Proposed text of the feedback post.",
                                "example": "I'd like to export a board with all its posts to a CSV file."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "proposed",
                                  "confirmed"
                                ],
                                "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                                "example": "proposed"
                              },
                              "postId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                                "example": null
                              }
                            },
                            "required": [
                              "title",
                              "body",
                              "status",
                              "postId"
                            ],
                            "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                          },
                          "citations": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "title": {
                                  "type": "string",
                                  "description": "Title of the cited source.",
                                  "example": "Reset your password"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "URL of the cited source.",
                                  "example": "https://help.example.com/articles/reset-your-password"
                                },
                                "sourceType": {
                                  "type": "string",
                                  "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                  "example": "article"
                                }
                              },
                              "required": [
                                "title",
                                "url",
                                "sourceType"
                              ]
                            },
                            "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "fromVisitor",
                          "senderType",
                          "author",
                          "content",
                          "embeds",
                          "attachments",
                          "createdAt",
                          "editedAt",
                          "fromAssistant",
                          "feedbackCard",
                          "citations"
                        ],
                        "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                      },
                      "description": "The latest 30 messages, oldest first."
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether older messages exist before `messages`.",
                      "example": false
                    },
                    "teamTyping": {
                      "type": "boolean",
                      "description": "Whether a teammate is typing: true for 8 seconds after a teammate's latest typing signal.",
                      "example": false
                    }
                  },
                  "required": [
                    "conversation",
                    "messages",
                    "hasMore",
                    "teamTyping"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}/messages": {
      "get": {
        "operationId": "listQuillsWidgetConversationMessages",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List the messages of a conversation of the widget visitor",
        "description": "Lists the customer-visible messages of one of the caller's conversations, oldest first. Without a cursor, returns the latest messages. `before` pages back to older messages. `after` returns newer messages and also those from the 30 seconds before the cursor, because a message that commits late can carry an earlier time: merge by message ID. A client without a push channel polls with `after` to catch up. Each cursor must be a message of this conversation (404 otherwise). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of a message of this conversation; returns the messages before it. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": false,
            "description": "ID of a message of this conversation; returns the messages before it. Accepts the TypeID or its UUID.",
            "name": "before",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of a message of this conversation; returns the messages after it, plus those written in the 30 seconds before it (never the cursor message itself). Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": false,
            "description": "ID of a message of this conversation; returns the messages after it, plus those written in the 30 seconds before it (never the cursor message itself). Accepts the TypeID or its UUID.",
            "name": "after",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30,
              "description": "Maximum number of messages to return, from 1 to 100. Defaults to 30.",
              "example": 30
            },
            "required": false,
            "description": "Maximum number of messages to return, from 1 to 100. Defaults to 30.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of messages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Message ID.",
                            "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                          },
                          "conversationId": {
                            "type": "string",
                            "description": "ID of the conversation the message belongs to.",
                            "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                          },
                          "fromVisitor": {
                            "type": "boolean",
                            "description": "Whether the caller wrote the message.",
                            "example": false
                          },
                          "senderType": {
                            "type": "string",
                            "enum": [
                              "visitor",
                              "agent",
                              "system"
                            ],
                            "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                            "example": "agent"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                                "example": "Dana Whitfield"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "URL of the author's avatar image. Null when there's none.",
                                "example": "https://cdn.example.com/avatars/dana.png"
                              }
                            },
                            "required": [
                              "name",
                              "avatarUrl"
                            ],
                            "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                          },
                          "content": {
                            "type": "string",
                            "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                            "example": "I've reset the password on the account. Please try signing in again."
                          },
                          "embeds": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "description": "Kind of the shared record, such as `post`.",
                                  "example": "post"
                                },
                                "id": {
                                  "type": "string",
                                  "description": "ID of the shared record.",
                                  "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                                }
                              },
                              "required": [
                                "kind",
                                "id"
                              ]
                            },
                            "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fileId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                  "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "File name.",
                                  "example": "invoice-2026-03.pdf"
                                },
                                "contentType": {
                                  "type": "string",
                                  "description": "MIME type of the file.",
                                  "example": "application/pdf"
                                },
                                "size": {
                                  "type": "number",
                                  "description": "File size in bytes.",
                                  "example": 48213
                                }
                              },
                              "required": [
                                "fileId",
                                "name",
                                "contentType",
                                "size"
                              ]
                            },
                            "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "editedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                            "example": null
                          },
                          "fromAssistant": {
                            "type": "boolean",
                            "description": "Whether the AI assistant wrote the message.",
                            "example": false
                          },
                          "feedbackCard": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Proposed title of the feedback post.",
                                "example": "Export boards to CSV"
                              },
                              "body": {
                                "type": "string",
                                "description": "Proposed text of the feedback post.",
                                "example": "I'd like to export a board with all its posts to a CSV file."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "proposed",
                                  "confirmed"
                                ],
                                "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                                "example": "proposed"
                              },
                              "postId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                                "example": null
                              }
                            },
                            "required": [
                              "title",
                              "body",
                              "status",
                              "postId"
                            ],
                            "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                          },
                          "citations": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "title": {
                                  "type": "string",
                                  "description": "Title of the cited source.",
                                  "example": "Reset your password"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "URL of the cited source.",
                                  "example": "https://help.example.com/articles/reset-your-password"
                                },
                                "sourceType": {
                                  "type": "string",
                                  "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                  "example": "article"
                                }
                              },
                              "required": [
                                "title",
                                "url",
                                "sourceType"
                              ]
                            },
                            "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "fromVisitor",
                          "senderType",
                          "author",
                          "content",
                          "embeds",
                          "attachments",
                          "createdAt",
                          "editedAt",
                          "fromAssistant",
                          "feedbackCard",
                          "citations"
                        ],
                        "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                      },
                      "description": "Messages on this page, oldest first."
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more messages exist past this page: newer ones for an `after` read, older ones otherwise.",
                      "example": false
                    }
                  },
                  "required": [
                    "items",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation or cursor message not found, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "sendQuillsWidgetConversationMessage",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Send a message in a conversation of the widget visitor",
        "description": "Sends the caller's message in one of their conversations and returns it with the updated conversation. The message reopens a closed or snoozed conversation, unless it ended as spam or was merged. Unless the conversation ended as spam, linked tickets in a closed status move back to an open status. For a closed conversation, the workspace's reopen policy can start a follow-up conversation instead: always under `never_link_new`, and under `within_days` (the default) once the conversation has been closed longer than the policy's window. The response then carries the new conversation. When the away reply is on and the team is away, posts it, at most once every 12 hours per conversation. Idempotent by `idempotencyKey`: a retry with the same key and text returns the first result with `replayed: true`. Records a `message.created` event, except on a replay. Limited to 60 attempts per 10 minutes per client IP address, failed ones included (429). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Message text, as plain text. Leading and trailing whitespace is trimmed. 1 to 10,000 characters.",
                    "example": "I've reset the password on the account. Please try signing in again."
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_-]+$",
                    "description": "Client-generated key that makes the request safe to retry: 8 to 128 letters, digits, `_` or `-`. Use a new key for each new message. A retry with the same key, text and attachments returns the first result with `replayed: true` and writes nothing. The key is scoped to the caller and, for a reply, to the conversation. Reusing it with other text or attachments fails with 409, and so does a key whose 7-day receipt has expired.",
                    "example": "msg-7f3c9a2e41b8"
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "default": [],
                    "description": "IDs of files to attach, up to 10 and each once. Each must be one of the caller's own uploads that isn't attached to a message yet; a file of another person, a removed file or an attached one fails the request with 404 and nothing is attached. Accepts TypeIDs or UUIDs. Attachments keep the order sent. Defaults to none.",
                    "example": [
                      "file_01m8rxy505fewvz41w7gqgp4p1"
                    ]
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "description": "Context from the host page, such as pageUrl and browser, and keys that the host app set with the widget's metadata command: up to 20 keys of 1 to 64 characters, each value up to 500 characters. Stored with the message for the team; never returned to the visitor."
                  }
                },
                "required": [
                  "content",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The message and the updated conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "fromVisitor": {
                          "type": "boolean",
                          "description": "Whether the caller wrote the message.",
                          "example": false
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                          "example": "agent"
                        },
                        "author": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                              "example": "Dana Whitfield"
                            },
                            "avatarUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "URL of the author's avatar image. Null when there's none.",
                              "example": "https://cdn.example.com/avatars/dana.png"
                            }
                          },
                          "required": [
                            "name",
                            "avatarUrl"
                          ],
                          "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                        },
                        "content": {
                          "type": "string",
                          "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Kind of the shared record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the shared record.",
                                "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                          "example": null
                        },
                        "fromAssistant": {
                          "type": "boolean",
                          "description": "Whether the AI assistant wrote the message.",
                          "example": false
                        },
                        "feedbackCard": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "title": {
                              "type": "string",
                              "description": "Proposed title of the feedback post.",
                              "example": "Export boards to CSV"
                            },
                            "body": {
                              "type": "string",
                              "description": "Proposed text of the feedback post.",
                              "example": "I'd like to export a board with all its posts to a CSV file."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "confirmed"
                              ],
                              "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                              "example": "proposed"
                            },
                            "postId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                              "example": null
                            }
                          },
                          "required": [
                            "title",
                            "body",
                            "status",
                            "postId"
                          ],
                          "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Title of the cited source.",
                                "example": "Reset your password"
                              },
                              "url": {
                                "type": "string",
                                "description": "URL of the cited source.",
                                "example": "https://help.example.com/articles/reset-your-password"
                              },
                              "sourceType": {
                                "type": "string",
                                "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                "example": "article"
                              }
                            },
                            "required": [
                              "title",
                              "url",
                              "sourceType"
                            ]
                          },
                          "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "fromVisitor",
                        "senderType",
                        "author",
                        "content",
                        "embeds",
                        "attachments",
                        "createdAt",
                        "editedAt",
                        "fromAssistant",
                        "feedbackCard",
                        "citations"
                      ],
                      "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                    },
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                          "example": "open"
                        },
                        "customerStatus": {
                          "type": "string",
                          "enum": [
                            "received",
                            "in_progress",
                            "awaiting_requester",
                            "resolved"
                          ],
                          "description": "Progress as shown to the customer. `received`: no teammate has answered or taken it yet; `in_progress`: a teammate answered or was assigned; `awaiting_requester`: a teammate offered a solution that waits for the customer's confirmation; `resolved`: the conversation is closed.",
                          "example": "in_progress"
                        },
                        "isReadOnly": {
                          "type": "boolean",
                          "description": "Whether the conversation is closed. The customer can still send a message: it reopens the conversation or, under the workspace's reopen policy, starts a follow-up conversation.",
                          "example": false
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Subject of the conversation. For one the customer started, the first 140 characters of the first message. Null when it has none.",
                          "example": "I can't sign in after resetting my password"
                        },
                        "preview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Preview of the latest message, up to 140 characters. Null when there's none.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of the latest message, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "solutionOfferedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate offered a solution that waits for the customer's confirmation, in ISO 8601 UTC. Null when no solution is pending.",
                          "example": null
                        },
                        "unreadCount": {
                          "type": "number",
                          "description": "Number of team messages after the caller's read watermark.",
                          "example": 1
                        },
                        "csatRating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer's satisfaction rating, from 1 (worst) to 5 (best). Null until rated.",
                          "example": null
                        },
                        "csatSubmittedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the first rating, in ISO 8601 UTC. Null until rated.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "isReadOnly",
                        "subject",
                        "preview",
                        "lastMessageAt",
                        "createdAt",
                        "unreadCount",
                        "csatRating",
                        "csatSubmittedAt"
                      ],
                      "description": "A conversation as the customer sees it. Assignees, tags and internal fields never appear."
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "Whether this request repeated an earlier one with the same idempotency key. When true, nothing new was written and the response describes the first request's message.",
                      "example": false
                    }
                  },
                  "required": [
                    "message",
                    "conversation",
                    "replayed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the widget's messenger tab is off, or an attachment isn't one of the caller's unattached uploads; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The idempotency key was used for a different message, or its 7-day receipt has expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}/files/{fileId}": {
      "get": {
        "operationId": "getQuillsWidgetConversationFile",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get a file of a conversation of the widget visitor and a short-lived download URL",
        "description": "Returns a file attached to a customer-visible message of one of the caller's conversations, with a short-lived download URL. Files of internal notes, of deleted messages and of other conversations answer 404. The URL opens images inline and downloads other files. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "File ID, from a message's `attachments[].fileId`. Accepts the TypeID or its UUID.",
              "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
            },
            "required": true,
            "description": "File ID, from a message's `attachments[].fileId`. Accepts the TypeID or its UUID.",
            "name": "fileId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "File ID.",
                      "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                    },
                    "name": {
                      "type": "string",
                      "description": "File name.",
                      "example": "invoice-2026-03.pdf"
                    },
                    "contentType": {
                      "type": "string",
                      "description": "MIME type of the file.",
                      "example": "application/pdf"
                    },
                    "size": {
                      "type": "number",
                      "description": "File size in bytes.",
                      "example": 48213
                    },
                    "downloadUrl": {
                      "type": "string",
                      "description": "Signed URL that downloads the file until `downloadExpiresAt`. Needs no other credential, so don't share it.",
                      "example": "https://files.example.com/download/invoice-2026-03.pdf?signature=fake-signature"
                    },
                    "downloadExpiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time `downloadUrl` stops working, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:31:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "contentType",
                    "size",
                    "downloadUrl",
                    "downloadExpiresAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation or file not found, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}/confirm-resolution": {
      "post": {
        "operationId": "confirmQuillsWidgetConversationResolution",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Confirm a conversation is solved as the widget visitor",
        "description": "Closes one of the caller's conversations as resolved, for a customer who confirms that a solution worked, and posts a customer-visible \"Customer confirmed the solution\" notice. It works on any open or snoozed conversation, whether or not a solution was offered. Clears the pending solution, snooze and auto-close. Idempotent: a conversation that's already closed stays as it is, with `changed: false`. Records a `conversation.status_changed` event when it closes the conversation. Limited to 30 attempts per 10 minutes per client IP address, failed ones included (429). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The closed conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Status of the conversation. `open`: active; `snoozed`: a teammate set it aside until later; `closed`: ended.",
                          "example": "open"
                        },
                        "customerStatus": {
                          "type": "string",
                          "enum": [
                            "received",
                            "in_progress",
                            "awaiting_requester",
                            "resolved"
                          ],
                          "description": "Progress as shown to the customer. `received`: no teammate has answered or taken it yet; `in_progress`: a teammate answered or was assigned; `awaiting_requester`: a teammate offered a solution that waits for the customer's confirmation; `resolved`: the conversation is closed.",
                          "example": "in_progress"
                        },
                        "isReadOnly": {
                          "type": "boolean",
                          "description": "Whether the conversation is closed. The customer can still send a message: it reopens the conversation or, under the workspace's reopen policy, starts a follow-up conversation.",
                          "example": false
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Subject of the conversation. For one the customer started, the first 140 characters of the first message. Null when it has none.",
                          "example": "I can't sign in after resetting my password"
                        },
                        "preview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Preview of the latest message, up to 140 characters. Null when there's none.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of the latest message, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed, in ISO 8601 UTC. Null when it hasn't changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "solutionOfferedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate offered a solution that waits for the customer's confirmation, in ISO 8601 UTC. Null when no solution is pending.",
                          "example": null
                        },
                        "unreadCount": {
                          "type": "number",
                          "description": "Number of team messages after the caller's read watermark.",
                          "example": 1
                        },
                        "csatRating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer's satisfaction rating, from 1 (worst) to 5 (best). Null until rated.",
                          "example": null
                        },
                        "csatSubmittedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the first rating, in ISO 8601 UTC. Null until rated.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "isReadOnly",
                        "subject",
                        "preview",
                        "lastMessageAt",
                        "createdAt",
                        "unreadCount",
                        "csatRating",
                        "csatSubmittedAt"
                      ],
                      "description": "A conversation as the customer sees it. Assignees, tags and internal fields never appear."
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request closed the conversation. False when it was already closed.",
                      "example": true
                    }
                  },
                  "required": [
                    "conversation",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}/read": {
      "put": {
        "operationId": "markQuillsWidgetConversationRead",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Mark a conversation of the widget visitor read through a message",
        "description": "Moves the caller's read watermark in one of their conversations to the time of `throughMessageId`, so team messages up to it stop counting as unread. The watermark only moves forward: acknowledging a message older than the watermark changes nothing (`changed: false`). Records no event, since read state is the customer's own. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "throughMessageId": {
                    "type": "string",
                    "description": "ID of the latest message the caller has seen; must be a customer-visible message of this conversation. Accepts the TypeID or its UUID.",
                    "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
                  }
                },
                "required": [
                  "throughMessageId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation's unread count after the change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of team messages in this conversation still after the watermark.",
                      "example": 0
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the watermark moved.",
                      "example": true
                    }
                  },
                  "required": [
                    "unreadCount",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation or message not found, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}/typing": {
      "post": {
        "operationId": "sendQuillsWidgetConversationTyping",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Signal that the widget visitor is typing",
        "description": "Signals that the caller is typing in one of their conversations. Each conversation side keeps one marker that lapses 8 seconds after the latest signal; teammates read it with `GET /conversations/{conversationId}/typing`. Records no event, since the marker is ephemeral. Limited to 120 attempts per 10 minutes per client IP address, failed ones included (429). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The signal is stored",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`: the signal is stored.",
                      "example": true
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}/csat": {
      "post": {
        "operationId": "submitQuillsWidgetCsat",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Rate a conversation of the widget visitor",
        "description": "Rates one of the caller's conversations from 1 to 5, with an optional comment. The first rating and its time stay: a later call can only add a comment, once. Each change adds an internal note with the rating for the team. When the first rating is at or below the workspace's low-score threshold (default 2) and automatic follow-up is on (the default), also opens a high-priority back-office ticket linked to the conversation, except for test visitors. Records a `conversation.csat_submitted` event when something changed, plus a `ticket.created` event for a follow-up ticket; a repeat that adds nothing records none. Limited to 30 attempts per 10 minutes per client IP address, failed ones included (429). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rating": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "Satisfaction rating, a whole number from 1 (worst) to 5 (best). Ignored when the conversation is already rated.",
                    "example": 4
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Optional comment, up to 2,000 characters; surrounding whitespace is trimmed and a blank comment is ignored. Kept only when the conversation has no comment yet.",
                    "example": "Quick answer, thanks!"
                  }
                },
                "required": [
                  "rating"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored rating",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rating": {
                      "type": "number",
                      "description": "Stored rating, from 1 to 5: the first rating the conversation received, which may differ from the one sent.",
                      "example": 4
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request stored a rating or a comment. False for a repeat that added nothing.",
                      "example": true
                    }
                  },
                  "required": [
                    "rating",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}/messages/{messageId}/feedback-card": {
      "put": {
        "operationId": "confirmQuillsWidgetFeedbackCard",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Confirm the feedback request that the assistant proposed to the widget visitor",
        "description": "Marks the feedback request that the AI assistant proposed in a message as confirmed, with the post the caller made from it, and returns the updated message. The caller creates the post first, then confirms the card with its ID. Each card is confirmed once: a confirmed card answers 409. Records a `message.updated` event. Limited to 30 attempts per 10 minutes per client IP address, failed ones included (429). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the message that carries the feedback card. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": true,
            "description": "ID of the message that carries the feedback card. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postId": {
                    "type": "string",
                    "description": "ID of the caller's own feedback post made from the card. Accepts the TypeID or its UUID.",
                    "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                  }
                },
                "required": [
                  "postId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The message with its confirmed card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "fromVisitor": {
                          "type": "boolean",
                          "description": "Whether the caller wrote the message.",
                          "example": false
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                          "example": "agent"
                        },
                        "author": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                              "example": "Dana Whitfield"
                            },
                            "avatarUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "URL of the author's avatar image. Null when there's none.",
                              "example": "https://cdn.example.com/avatars/dana.png"
                            }
                          },
                          "required": [
                            "name",
                            "avatarUrl"
                          ],
                          "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                        },
                        "content": {
                          "type": "string",
                          "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Kind of the shared record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the shared record.",
                                "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                          "example": null
                        },
                        "fromAssistant": {
                          "type": "boolean",
                          "description": "Whether the AI assistant wrote the message.",
                          "example": false
                        },
                        "feedbackCard": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "title": {
                              "type": "string",
                              "description": "Proposed title of the feedback post.",
                              "example": "Export boards to CSV"
                            },
                            "body": {
                              "type": "string",
                              "description": "Proposed text of the feedback post.",
                              "example": "I'd like to export a board with all its posts to a CSV file."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "confirmed"
                              ],
                              "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                              "example": "proposed"
                            },
                            "postId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                              "example": null
                            }
                          },
                          "required": [
                            "title",
                            "body",
                            "status",
                            "postId"
                          ],
                          "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Title of the cited source.",
                                "example": "Reset your password"
                              },
                              "url": {
                                "type": "string",
                                "description": "URL of the cited source.",
                                "example": "https://help.example.com/articles/reset-your-password"
                              },
                              "sourceType": {
                                "type": "string",
                                "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                "example": "article"
                              }
                            },
                            "required": [
                              "title",
                              "url",
                              "sourceType"
                            ]
                          },
                          "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "fromVisitor",
                        "senderType",
                        "author",
                        "content",
                        "embeds",
                        "attachments",
                        "createdAt",
                        "editedAt",
                        "fromAssistant",
                        "feedbackCard",
                        "citations"
                      ],
                      "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation, message with a feedback card, or the caller's post not found, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The card is confirmed already",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}/resolution-feedback": {
      "post": {
        "operationId": "submitQuillsWidgetResolutionFeedback",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Confirm whether the assistant resolved a conversation of the widget visitor",
        "description": "Records whether the AI assistant resolved one of the caller's conversations, on the conversation's latest assistant involvement. `resolved: true` marks it `resolved_confirmed`. `resolved: false` marks it `handed_off`, counts it as reopened after a resolution, and puts the conversation back in the team's queue as open and waiting, unless it ended as spam. Records an `assistant.resolution_feedback_recorded` event. Limited to 30 attempts per 10 minutes per client IP address, failed ones included (429). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "resolved": {
                    "type": "boolean",
                    "description": "Whether the assistant's answer solved the caller's problem. False asks for a teammate.",
                    "example": true
                  }
                },
                "required": [
                  "resolved"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated assistant involvement status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "involvementId": {
                      "type": "string",
                      "description": "ID of the assistant involvement that was updated.",
                      "example": "assistant_involvement_01m8rzbs0tfk1asn1evm1ywsf8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "handed_off",
                        "resolved_confirmed",
                        "resolved_assumed",
                        "abandoned"
                      ],
                      "description": "Status of the involvement after the change: `resolved_confirmed` when the caller confirmed, `handed_off` when they didn't. Other values (`active`, `resolved_assumed`, `abandoned`) aren't returned by this route.",
                      "example": "resolved_confirmed"
                    }
                  },
                  "required": [
                    "involvementId",
                    "status"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, the assistant hasn't been involved in it, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}/handoff": {
      "post": {
        "operationId": "handoffQuillsWidgetConversation",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Hand off a conversation to a human teammate",
        "description": "Hands one of the caller's conversations from the AI assistant to the team, for a customer who asks for a person. Makes no AI model call. Ends the assistant's active involvement so it stops replying, adds an internal handoff summary note for teammates, posts the confirmation reply \"I've connected you with our team.\", and sets the conversation open and waiting for the team. Not idempotent: each call adds a note and a reply. Records a `conversation.handed_off` event. Limited to 20 attempts per 15 minutes per client IP address, failed ones included (429). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's messenger tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Confirmation message after deterministic handoff",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "handedOff": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`: the conversation was handed off.",
                      "example": true
                    },
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rzbs0tfk1asn07n6kkzr8g"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "fromVisitor": {
                          "type": "boolean",
                          "description": "Whether the caller wrote the message.",
                          "example": false
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate or the AI assistant; `system`: an automatic notice, such as an away reply or a confirmed solution.",
                          "example": "agent"
                        },
                        "author": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Display name of the author. Null when none is known, for example for an AI assistant reply.",
                              "example": "Dana Whitfield"
                            },
                            "avatarUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "URL of the author's avatar image. Null when there's none.",
                              "example": "https://cdn.example.com/avatars/dana.png"
                            }
                          },
                          "required": [
                            "name",
                            "avatarUrl"
                          ],
                          "description": "Name and avatar of the message's author. Null for `system` notices. Never carries a principal ID or an email address."
                        },
                        "content": {
                          "type": "string",
                          "description": "Message text, as plain text. Empty for a message that only shares a record (see `embeds`). AI assistant replies can carry `[n]` markers that point into `citations`.",
                          "example": "I've reset the password on the account. Please try signing in again."
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Kind of the shared record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the shared record.",
                                "example": "post_01m8rzbs0tfk1asn14jynra3xh"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Records a teammate shared into the thread, such as a feedback post. Empty for most messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the file, for the conversation file route. Null for older attachments and inline images that have no file record; those can't be downloaded through the API.",
                                "example": "file_01m8rzbs0tfk1asn0bv9at97rj"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Only name, type and size; download a file through the conversation file route."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was written, in ISO 8601 UTC. It's the start of the writer's transaction, so a message can commit shortly after one with a later time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the message was last edited, in ISO 8601 UTC. Null when it hasn't been edited.",
                          "example": null
                        },
                        "fromAssistant": {
                          "type": "boolean",
                          "description": "Whether the AI assistant wrote the message.",
                          "example": false
                        },
                        "feedbackCard": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "title": {
                              "type": "string",
                              "description": "Proposed title of the feedback post.",
                              "example": "Export boards to CSV"
                            },
                            "body": {
                              "type": "string",
                              "description": "Proposed text of the feedback post.",
                              "example": "I'd like to export a board with all its posts to a CSV file."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "proposed",
                                "confirmed"
                              ],
                              "description": "State of the card. `proposed`: not posted yet; `confirmed`: the visitor posted it.",
                              "example": "proposed"
                            },
                            "postId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "ID of the visitor's post made from the card. Null until the card is confirmed.",
                              "example": null
                            }
                          },
                          "required": [
                            "title",
                            "body",
                            "status",
                            "postId"
                          ],
                          "description": "Feedback request that the AI assistant proposed in this message, for the visitor to post once. Null for other messages."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "description": "Title of the cited source.",
                                "example": "Reset your password"
                              },
                              "url": {
                                "type": "string",
                                "description": "URL of the cited source.",
                                "example": "https://help.example.com/articles/reset-your-password"
                              },
                              "sourceType": {
                                "type": "string",
                                "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                "example": "article"
                              }
                            },
                            "required": [
                              "title",
                              "url",
                              "sourceType"
                            ]
                          },
                          "description": "Verified sources the AI assistant cited, in the order the `[n]` markers in `content` refer to. Empty for messages written by people."
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "fromVisitor",
                        "senderType",
                        "author",
                        "content",
                        "embeds",
                        "attachments",
                        "createdAt",
                        "editedAt",
                        "fromAssistant",
                        "feedbackCard",
                        "citations"
                      ],
                      "description": "A conversation message as the customer sees it. Internal notes, team-only notices, deleted, scheduled and recalled messages never appear."
                    }
                  },
                  "required": [
                    "handedOff",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/tickets": {
      "get": {
        "operationId": "getQuillsWidgetMyTickets",
        "tags": [
          "Widget (public)"
        ],
        "summary": "List the tickets of the widget visitor",
        "description": "Lists the live customer tickets where the caller is the requester, newest first. Pages with `cursor` and `limit`; `nextCursor` is null on the last page. A caller without a customer profile yet gets an empty list. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's tickets tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the last ticket on the previous page; the page starts after it. Must be one of the caller's tickets (404 otherwise). Accepts the TypeID or its UUID. Omit for the first page.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": false,
            "description": "ID of the last ticket on the previous page; the page starts after it. Must be one of the caller's tickets (404 otherwise). Accepts the TypeID or its UUID. Omit for the first page.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of tickets to return, from 1 to 50. Defaults to 20.",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of tickets to return, from 1 to 50. Defaults to 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the caller's tickets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Ticket ID.",
                            "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                          },
                          "number": {
                            "type": "number",
                            "description": "Sequential ticket number, unique to the ticket.",
                            "example": 1042
                          },
                          "reference": {
                            "type": "string",
                            "description": "Display reference: `#` followed by the number.",
                            "example": "#1042"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title of the ticket.",
                            "example": "Refund for a duplicate charge"
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "received",
                              "in_progress",
                              "awaiting_requester",
                              "resolved",
                              null
                            ],
                            "description": "Requester-facing stage of the ticket's status. `received`: logged, not started; `in_progress`: the team is working on it; `awaiting_requester`: the team waits for the requester's reply; `resolved`: done. Null when the status has no public stage, so internal status names never show.",
                            "example": "in_progress"
                          },
                          "stageLabel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The workspace's label for `stage`, or the default label. Null when `stage` is null.",
                            "example": "In progress"
                          },
                          "ticketType": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Name of the ticket type.",
                                "example": "Billing question"
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "description": "Type of the ticket. Null when it has none."
                          },
                          "conversationId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the paired conversation that carries the ticket's thread; read and reply there. Null when the ticket has none.",
                            "example": "conversation_01m8rzbs0sfk1asmzrwghg3gz9"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the ticket was opened, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:02:11.000Z"
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the ticket last changed, in ISO 8601 UTC. Null when it hasn't changed since it was opened.",
                            "example": "2026-03-14T10:15:42.000Z"
                          },
                          "resolvedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the ticket was resolved, in ISO 8601 UTC. Null while it's unresolved.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "number",
                          "reference",
                          "title",
                          "stage",
                          "stageLabel",
                          "ticketType",
                          "conversationId",
                          "createdAt",
                          "updatedAt",
                          "resolvedAt"
                        ],
                        "description": "A ticket as its requester sees it. Internal status names, priority, assignees and internal fields never appear."
                      },
                      "description": "The caller's tickets on this page."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Value of `cursor` for the next page: the ID of the last ticket here. Null on the last page.",
                      "example": null
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Cursor ticket not found or not the caller's, or the widget's tickets tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createQuillsWidgetMyTicket",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Open a ticket as the widget visitor",
        "description": "Opens a customer ticket with the caller as its requester, in the workspace's default status and with no priority. Without `ticketTypeId` the default intake type applies, if there is one. `fieldValues` answer the type's customer-visible fields, which are checked against the form (400 for a missing required answer or an invalid one); keys that aren't fields of the form are dropped. The ticket gets its own paired conversation, which carries its thread, with the description as the first message. The caller watches the ticket as its requester. An anonymous widget visitor needs a contact email first (409). Records a `ticket.created` event. Limited to 10 attempts per 10 minutes per client IP address, failed ones included (429). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's tickets tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300,
                    "description": "Title of the ticket, 1 to 300 characters after trimming surrounding whitespace.",
                    "example": "Refund for a duplicate charge"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "Details of the request, up to 4,000 characters after trimming. Becomes the first message of the ticket's conversation. Omit or leave empty for no first message.",
                    "example": "I was charged twice for my March invoice. Order A-10442."
                  },
                  "ticketTypeId": {
                    "type": "string",
                    "description": "ID of the ticket type, from the intake form. Must be a live customer type shown on the form (404 otherwise). Accepts the TypeID or its UUID. Omit for the default type.",
                    "example": "ticket_type_01m8rzbs0tfk1asn0xzha8ebsg"
                  },
                  "fieldValues": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Map of attribute key (1 to 64 characters) to value: a string of up to 4000 characters, a number, a boolean, or null. At most 50 keys.",
                    "example": {
                      "order_number": "A-10442",
                      "priority_customer": true
                    }
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new ticket",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Ticket ID.",
                      "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                    },
                    "number": {
                      "type": "number",
                      "description": "Sequential ticket number, unique to the ticket.",
                      "example": 1042
                    },
                    "reference": {
                      "type": "string",
                      "description": "Display reference: `#` followed by the number.",
                      "example": "#1042"
                    },
                    "title": {
                      "type": "string",
                      "description": "Title of the ticket.",
                      "example": "Refund for a duplicate charge"
                    },
                    "stage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "received",
                        "in_progress",
                        "awaiting_requester",
                        "resolved",
                        null
                      ],
                      "description": "Requester-facing stage of the ticket's status. `received`: logged, not started; `in_progress`: the team is working on it; `awaiting_requester`: the team waits for the requester's reply; `resolved`: done. Null when the status has no public stage, so internal status names never show.",
                      "example": "in_progress"
                    },
                    "stageLabel": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The workspace's label for `stage`, or the default label. Null when `stage` is null.",
                      "example": "In progress"
                    },
                    "ticketType": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Name of the ticket type.",
                          "example": "Billing question"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "Type of the ticket. Null when it has none."
                    },
                    "conversationId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the paired conversation that carries the ticket's thread; read and reply there. Null when the ticket has none.",
                      "example": "conversation_01m8rzbs0sfk1asmzrwghg3gz9"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the ticket was opened, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the ticket last changed, in ISO 8601 UTC. Null when it hasn't changed since it was opened.",
                      "example": "2026-03-14T10:15:42.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the ticket was resolved, in ISO 8601 UTC. Null while it's unresolved.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "number",
                    "reference",
                    "title",
                    "stage",
                    "stageLabel",
                    "ticketType",
                    "conversationId",
                    "createdAt",
                    "updatedAt",
                    "resolvedAt"
                  ],
                  "description": "A ticket as its requester sees it. Internal status names, priority, assignees and internal fields never appear."
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket type not found or not on the intake form, or the widget's tickets tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No contact email for an anonymous visitor, or no default ticket status is configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/ticket-form": {
      "get": {
        "operationId": "getQuillsWidgetMyTicketForm",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get the ticket types and fields the widget visitor can file",
        "description": "Returns the ticket types the caller can file: live customer types shown on the intake form, in the workspace's order, each with only its customer-visible fields in form order. Answer the fields in `fieldValues` when opening a ticket. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's tickets tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The intake form",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "types": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Ticket type ID, for `ticketTypeId`.",
                            "example": "ticket_type_01m8rzbs0tfk1asn0xzha8ebsg"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the ticket type.",
                            "example": "Billing question"
                          },
                          "slug": {
                            "type": "string",
                            "description": "URL-safe identifier of the ticket type.",
                            "example": "billing-question"
                          },
                          "isDefault": {
                            "type": "boolean",
                            "description": "Whether this is the default type, used when a ticket names none.",
                            "example": true
                          },
                          "fields": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Key of the field in `fieldValues`.",
                                  "example": "order_number"
                                },
                                "label": {
                                  "type": "string",
                                  "description": "Label to show for the field.",
                                  "example": "Order number"
                                },
                                "type": {
                                  "type": "string",
                                  "description": "Kind of answer. `text` and `long_text`: a string of up to 4,000 characters; `number`: a number; `select`: one of `options`; `date`: an ISO 8601 date; `checkbox`: a boolean.",
                                  "example": "text"
                                },
                                "required": {
                                  "type": "boolean",
                                  "description": "Whether the field must be answered; a required checkbox must be checked.",
                                  "example": true
                                },
                                "options": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "Allowed answers of a `select` field. Empty for other kinds.",
                                  "example": []
                                }
                              },
                              "required": [
                                "key",
                                "label",
                                "type",
                                "required",
                                "options"
                              ]
                            },
                            "description": "Customer-visible fields of the type, in form order."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "isDefault",
                          "fields"
                        ]
                      },
                      "description": "Ticket types the caller can choose from. Empty when none is set up."
                    }
                  },
                  "required": [
                    "types"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The widget's tickets tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/ticket-stage-labels": {
      "get": {
        "operationId": "getQuillsWidgetMyTicketStageLabels",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get the requester-facing ticket stage labels",
        "description": "Returns the label to show for each requester-facing ticket stage, for the stage tracker: the workspace's saved label, else the default (`Received`, `In progress`, `Awaiting your reply`, `Resolved`). Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's tickets tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The stage labels",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "received": {
                      "type": "string",
                      "description": "Label of the `received` stage, up to 60 characters. Defaults to \"Received\".",
                      "example": "Received"
                    },
                    "in_progress": {
                      "type": "string",
                      "description": "Label of the `in_progress` stage, up to 60 characters. Defaults to \"In progress\".",
                      "example": "In progress"
                    },
                    "awaiting_requester": {
                      "type": "string",
                      "description": "Label of the `awaiting_requester` stage, up to 60 characters. Defaults to \"Awaiting your reply\".",
                      "example": "Awaiting your reply"
                    },
                    "resolved": {
                      "type": "string",
                      "description": "Label of the `resolved` stage, up to 60 characters. Defaults to \"Resolved\".",
                      "example": "Resolved"
                    }
                  },
                  "required": [
                    "received",
                    "in_progress",
                    "awaiting_requester",
                    "resolved"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The widget's tickets tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/tickets/{ticketId}/watch": {
      "get": {
        "operationId": "getQuillsWidgetMyTicketWatchStatus",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get whether the widget visitor watches a ticket",
        "description": "Returns whether the caller watches one of their own tickets, and until when the watch is muted. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's tickets tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the caller's watch is muted, in ISO 8601 UTC. Null when not muted or not watching.",
                      "example": null
                    }
                  },
                  "required": [
                    "watching",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or not the caller's, or the widget's tickets tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "watchQuillsWidgetMyTicket",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Watch a ticket of the widget visitor",
        "description": "Subscribes the caller to one of their own tickets. Idempotent: an existing subscription keeps its reason and mute. Records no event, since a watch is the requester's own preference. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's tickets tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the caller's watch is muted, in ISO 8601 UTC. Null when not muted or not watching.",
                      "example": null
                    }
                  },
                  "required": [
                    "watching",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or not the caller's, or the widget's tickets tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unwatchQuillsWidgetMyTicket",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Stop watching a ticket of the widget visitor",
        "description": "Removes the caller's subscription to one of their own tickets, whatever its reason. Idempotent. Records no event, since a watch is the requester's own preference. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's tickets tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow. Writes from a blocked IP address also get 403.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the caller's watch is muted, in ISO 8601 UTC. Null when not muted or not watching.",
                      "example": null
                    }
                  },
                  "required": [
                    "watching",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or not the caller's, or the widget's tickets tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/conversations/{conversationId}/ticket": {
      "get": {
        "operationId": "getQuillsWidgetConversationLinkedTicket",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get the ticket paired with a conversation of the widget visitor",
        "description": "Returns the customer ticket paired with one of the caller's conversations, or null when the conversation has no live ticket of the caller. Called by the embedded widget with its visitor session as a Bearer token (401 without a live session). 404 while the widget's tickets tab is off. 403 for a blocked visitor or a host origin that the widget doesn't allow.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The paired ticket, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ticket": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Ticket ID.",
                          "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                        },
                        "number": {
                          "type": "number",
                          "description": "Sequential ticket number, unique to the ticket.",
                          "example": 1042
                        },
                        "reference": {
                          "type": "string",
                          "description": "Display reference: `#` followed by the number.",
                          "example": "#1042"
                        },
                        "title": {
                          "type": "string",
                          "description": "Title of the ticket.",
                          "example": "Refund for a duplicate charge"
                        },
                        "stage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "received",
                            "in_progress",
                            "awaiting_requester",
                            "resolved",
                            null
                          ],
                          "description": "Requester-facing stage of the ticket's status. `received`: logged, not started; `in_progress`: the team is working on it; `awaiting_requester`: the team waits for the requester's reply; `resolved`: done. Null when the status has no public stage, so internal status names never show.",
                          "example": "in_progress"
                        },
                        "stageLabel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The workspace's label for `stage`, or the default label. Null when `stage` is null.",
                          "example": "In progress"
                        },
                        "ticketType": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "Name of the ticket type.",
                              "example": "Billing question"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "description": "Type of the ticket. Null when it has none."
                        },
                        "conversationId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the paired conversation that carries the ticket's thread; read and reply there. Null when the ticket has none.",
                          "example": "conversation_01m8rzbs0sfk1asmzrwghg3gz9"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the ticket was opened, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the ticket last changed, in ISO 8601 UTC. Null when it hasn't changed since it was opened.",
                          "example": "2026-03-14T10:15:42.000Z"
                        },
                        "resolvedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the ticket was resolved, in ISO 8601 UTC. Null while it's unresolved.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "number",
                        "reference",
                        "title",
                        "stage",
                        "stageLabel",
                        "ticketType",
                        "conversationId",
                        "createdAt",
                        "updatedAt",
                        "resolvedAt"
                      ],
                      "description": "The ticket paired with the conversation. Null when there's none."
                    }
                  },
                  "required": [
                    "ticket"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not the caller's, or the widget's tickets tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/embed-preview": {
      "get": {
        "operationId": "getQuillsWidgetEmbedPreview",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get an embed preview card for the widget",
        "description": "Returns a preview card for a record that rich text or a message embeds: a feedback post, a changelog entry, a help-center article or a ticket. Each kind follows the read rule of its own customer routes, so a card never shows what the caller couldn't open: a post the caller can see on the portal, a published changelog entry the caller may read, an article of the help center while it's open to the caller, or the caller's own customer ticket while the tickets tab is on. A record that is missing or hidden from the caller answers `unavailable: true` and names nothing. The card sits under the key named by `kind`; the other cards are null. Needs a widget session (an anonymous one works). Answers 404 while the widget is off, and 403 for a blocked account or when the portal is private and the visitor isn't identified.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "post",
                "changelog",
                "article",
                "ticket"
              ],
              "description": "Kind of record to preview. `post`: a feedback post. `changelog`: a changelog entry. `article`: a help-center article. `ticket`: one of the caller's own tickets.",
              "example": "post"
            },
            "required": true,
            "description": "Kind of record to preview. `post`: a feedback post. `changelog`: a changelog entry. `article`: a help-center article. `ticket`: one of the caller's own tickets.",
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[\\x21-\\x7e]+$",
              "description": "TypeID of the post, changelog entry or ticket, or the slug of the article. Visible ASCII characters only, 1 to 200.",
              "example": "post_01m8rzgvbkeh787gg7n4dxh1eg"
            },
            "required": true,
            "description": "TypeID of the post, changelog entry or ticket, or the slug of the article. Visible ASCII characters only, 1 to 200.",
            "name": "id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The card, or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unavailable": {
                      "type": "boolean",
                      "description": "Whether the record is unavailable: missing, or not visible to the caller. When true, every card is null.",
                      "example": false
                    },
                    "post": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Title of the post, changelog entry, article or ticket.",
                          "example": "Export conversations to CSV"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Link to the record's portal page. Null for a ticket without a support conversation.",
                          "example": "https://app.example.com/portal/cfklow33tpuxgpxko9nxqllg/posts/post_01m8rzgvbkeh787gg7n4dxh1eg"
                        },
                        "postId": {
                          "type": "string",
                          "description": "ID of the post.",
                          "example": "post_01m8rzgvbkeh787gg7n4dxh1eg"
                        },
                        "excerpt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Start of the post's body, on one line and cut to 140 characters with a trailing `…`. Null when the body is empty.",
                          "example": "Dana needs a monthly CSV export of all conversations."
                        },
                        "voteCount": {
                          "type": "number",
                          "description": "Number of votes on the post.",
                          "example": 24
                        },
                        "statusName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Name of the post's status. Null when it has none or the status was deleted.",
                          "example": "Planned"
                        },
                        "statusColor": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Color of the post's status, as stored (a hex code). Null when the post has no live status.",
                          "example": "#3b82f6"
                        },
                        "boardName": {
                          "type": "string",
                          "description": "Name of the post's board.",
                          "example": "Feature requests"
                        },
                        "boardSlug": {
                          "type": "string",
                          "description": "URL slug of the post's board.",
                          "example": "feature-requests"
                        },
                        "createdAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the post was created, in ISO 8601 UTC.",
                          "example": "2026-02-03T15:20:00.000Z"
                        }
                      },
                      "required": [
                        "title",
                        "url",
                        "postId",
                        "excerpt",
                        "voteCount",
                        "statusName",
                        "statusColor",
                        "boardName",
                        "boardSlug",
                        "createdAt"
                      ],
                      "description": "Post card, when `kind` is `post` and the post is available. Null otherwise."
                    },
                    "changelog": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Title of the post, changelog entry, article or ticket.",
                          "example": "Export conversations to CSV"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Link to the record's portal page. Null for a ticket without a support conversation.",
                          "example": "https://app.example.com/portal/cfklow33tpuxgpxko9nxqllg/posts/post_01m8rzgvbkeh787gg7n4dxh1eg"
                        },
                        "entryId": {
                          "type": "string",
                          "description": "ID of the changelog entry.",
                          "example": "changelog_01m8rzgvbkeh787ggem6sxnwd6"
                        },
                        "publishedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Date shown for the entry, in ISO 8601 UTC: its display date when set, else its publish time.",
                          "example": "2026-03-10T12:00:00.000Z"
                        }
                      },
                      "required": [
                        "title",
                        "url",
                        "entryId",
                        "publishedAt"
                      ],
                      "description": "Changelog entry card, when `kind` is `changelog` and the entry is available. Null otherwise."
                    },
                    "article": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Title of the post, changelog entry, article or ticket.",
                          "example": "Export conversations to CSV"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Link to the record's portal page. Null for a ticket without a support conversation.",
                          "example": "https://app.example.com/portal/cfklow33tpuxgpxko9nxqllg/posts/post_01m8rzgvbkeh787gg7n4dxh1eg"
                        },
                        "articleId": {
                          "type": "string",
                          "description": "ID of the help-center article.",
                          "example": "article_01m8rzgvbkeh787ggqabcer0dp"
                        },
                        "slug": {
                          "type": "string",
                          "description": "URL slug of the article.",
                          "example": "reset-your-password"
                        },
                        "excerpt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The article's description, else the start of its content, on one line and cut to 140 characters with a trailing `…`. Null when both are empty.",
                          "example": "Steps to reset a forgotten password from the sign-in page."
                        },
                        "categorySlug": {
                          "type": "string",
                          "description": "URL slug of the article's category.",
                          "example": "account"
                        }
                      },
                      "required": [
                        "title",
                        "url",
                        "articleId",
                        "slug",
                        "excerpt",
                        "categorySlug"
                      ],
                      "description": "Help-center article card, when `kind` is `article` and the article is available. Null otherwise."
                    },
                    "ticket": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Title of the post, changelog entry, article or ticket.",
                          "example": "Export conversations to CSV"
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Link to the record's portal page. Null for a ticket without a support conversation.",
                          "example": "https://app.example.com/portal/cfklow33tpuxgpxko9nxqllg/posts/post_01m8rzgvbkeh787gg7n4dxh1eg"
                        },
                        "ticketId": {
                          "type": "string",
                          "description": "ID of the ticket.",
                          "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                        },
                        "conversationId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the support conversation paired with the ticket, which `url` opens. Null when there's none.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "reference": {
                          "type": "string",
                          "description": "Ticket number with a leading `#`.",
                          "example": "#1042"
                        },
                        "stageLabel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Label of the ticket's public stage, as the workspace names it (for example `Received`, `In progress`, `Awaiting your reply` or `Resolved`). Null when its status has no public stage.",
                          "example": "In progress"
                        },
                        "createdAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the ticket was created, in ISO 8601 UTC.",
                          "example": "2026-03-12T08:45:00.000Z"
                        }
                      },
                      "required": [
                        "title",
                        "url",
                        "ticketId",
                        "conversationId",
                        "reference",
                        "stageLabel",
                        "createdAt"
                      ],
                      "description": "Ticket card, when `kind` is `ticket` and the ticket is available to the caller. Null otherwise."
                    }
                  },
                  "required": [
                    "unavailable",
                    "post",
                    "changelog",
                    "article",
                    "ticket"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Blocked account, or a private portal that the caller can't access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Widget not found or off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/link-preview": {
      "get": {
        "operationId": "unfurlQuillsWidgetLink",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get a link preview for a web page",
        "description": "Returns a link preview of a web page: its title, description and site name, read from the first 200 KB of the page's HTML head. Answers `preview: null`, with no error detail, for a private, loopback, link-local or metadata address or a redirect to one, more than 3 redirects, no answer within 5 seconds, a status other than 2xx, a body that isn't HTML, a page with neither a title nor a description, more than 2 previews already running in the API process, or any other failure. Nothing is cached. Needs a widget session, and answers 404 while the widget's messenger tab is off. At most 30 requests a minute for each client address. A private address is never previewed here: while the instance allows private destinations, this route answers `preview: null` for every URL.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri",
              "description": "URL of the web page to preview: an absolute `http` or `https` URL, up to 2,048 characters.",
              "example": "https://example.com/blog/spring-release"
            },
            "required": true,
            "description": "URL of the web page to preview: an absolute `http` or `https` URL, up to 2,048 characters.",
            "name": "url",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The preview, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "preview": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Final URL of the page, after redirects.",
                          "example": "https://example.com/blog/spring-release"
                        },
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Page title: the OpenGraph title, else the Twitter title, else the `<title>` tag. HTML entities decoded, on one line, up to 200 characters. Null when the page has none.",
                          "example": "Our spring release is here"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Page description: the OpenGraph description, else the Twitter description, else the `description` meta tag. HTML entities decoded, on one line, up to 500 characters. Null when the page has none.",
                          "example": "Faster search, saved replies and a new mobile inbox."
                        },
                        "siteName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Site name from the OpenGraph `og:site_name` tag, up to 100 characters. Null when the page has none.",
                          "example": "Example Blog"
                        }
                      },
                      "required": [
                        "url",
                        "title",
                        "description",
                        "siteName"
                      ],
                      "description": "The preview. Null when the page couldn't be fetched or read, or has neither a title nor a description."
                    }
                  },
                  "required": [
                    "preview"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The widget's messenger tab is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/uploads/prepare": {
      "post": {
        "operationId": "prepareQuillsPortalUpload",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Prepare the signed-in customer's upload profile",
        "description": "Creates the caller's customer profile in this workspace when it is missing, so that the caller can upload files. The caller authenticates with their session cookie. Answers 404 while the portal is off and 403 when a private portal does not admit the caller. Repeating the call changes nothing. Limited to 20 requests per minute per client IP and workspace. Records no event.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Upload profile ready",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ready": {
                      "type": "boolean",
                      "description": "Always true: the caller has a customer profile and may upload",
                      "example": true
                    }
                  },
                  "required": [
                    "ready"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "A private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/uploads": {
      "post": {
        "operationId": "createQuillsPortalUpload",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Request an upload URL for a portal attachment or avatar",
        "description": "Returns a presigned PUT URL for a key in the caller's own namespace. Upload the file there, then register an attachment with POST /portal/files or set an avatar with PUT /user/avatar; an unregistered upload is not a reference. The caller authenticates with their session cookie. Answers 404 while the portal is off. Limited to 20 requests per minute per client IP and workspace. Records no event.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "customer_file",
                      "customer_image",
                      "customer_avatar"
                    ],
                    "description": "What the file is for. It decides the allowed types and where the file is stored.",
                    "example": "customer_file"
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "The file's name on the caller's device. Its extension is kept on the stored file.",
                    "example": "screenshot.png"
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  }
                },
                "required": [
                  "purpose",
                  "filename",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presigned upload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "Storage key of the new file. Send it back unchanged when you attach or register the upload."
                    },
                    "uploadUrl": {
                      "type": "string",
                      "description": "Short-lived URL. Send the file's bytes to it in a PUT request, with the headers below.",
                      "example": "https://storage.example.com/upload?token=abc123"
                    },
                    "headers": {
                      "type": "object",
                      "properties": {
                        "Content-Type": {
                          "type": "string",
                          "description": "The content type from the request.",
                          "example": "image/png"
                        }
                      },
                      "required": [
                        "Content-Type"
                      ],
                      "description": "Headers to send with the PUT request."
                    },
                    "expiresAt": {
                      "type": "string",
                      "description": "When uploadUrl stops working, as an ISO 8601 date and time in UTC.",
                      "example": "2026-03-14T09:31:53.589Z"
                    }
                  },
                  "required": [
                    "key",
                    "uploadUrl",
                    "headers",
                    "expiresAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The content type or size is not allowed for the purpose",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no customer profile here (call prepareQuillsPortalUpload), or a private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/files": {
      "post": {
        "operationId": "createQuillsPortalFiles",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Register a portal attachment",
        "description": "Verifies an object that the caller uploaded with POST /portal/uploads (purpose customer_file or customer_image) and registers it as a file. Idempotent per key: registering the same key again returns the same file and records no event. The caller authenticates with their session cookie. Answers 404 while the portal is off. Limited to 20 requests per minute per client IP and workspace. Records a `file.created` event when the file is new.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "^[^\\\\/\\p{Cc}]+$/u",
                    "description": "The file's display name, without slashes or control characters",
                    "example": "invoice-1042.pdf"
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Registered file",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The file's ID",
                      "example": "file_01m8rxxee8esga9ve6f0hcvyc0"
                    },
                    "name": {
                      "type": "string",
                      "description": "The file name given at registration",
                      "example": "invoice-1042.pdf"
                    },
                    "contentType": {
                      "type": "string",
                      "description": "The MIME type of the stored object",
                      "example": "application/pdf"
                    },
                    "size": {
                      "type": "number",
                      "description": "The file size in bytes",
                      "example": 48213
                    },
                    "family": {
                      "type": "string",
                      "description": "The file family, from the content type: image, video, audio, pdf, csv, text or other",
                      "example": "pdf"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the file was registered",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "created": {
                      "type": "boolean",
                      "description": "Whether this request registered the file. False when a retry found the file that an earlier request registered.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "contentType",
                    "size",
                    "family",
                    "createdAt",
                    "created"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no customer profile here, or a private portal does not admit the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The key is not an upload of the caller, or the uploaded object is missing or does not match; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The file that registered this upload was removed; The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/uploads": {
      "post": {
        "operationId": "createQuillsWidgetUpload",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Request an upload URL for a widget attachment or avatar",
        "description": "Returns a presigned PUT URL for a key in the visitor's own namespace. Upload the file there, then register an attachment with POST /widget/files and attach it to a feedback post, or set an avatar with PUT /widget/avatar. Needs the widget on with its feedback, messenger or tickets tab. Send the widget session token from identifyQuillsWidgetVisitor as `Authorization: Bearer <token>`; an anonymous session gets 403. Limited to 20 requests per minute per client IP and workspace. Records no event.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "customer_file",
                      "customer_image",
                      "customer_avatar"
                    ],
                    "description": "What the file is for. It decides the allowed types and where the file is stored.",
                    "example": "customer_file"
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "The file's name on the caller's device. Its extension is kept on the stored file.",
                    "example": "screenshot.png"
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  }
                },
                "required": [
                  "purpose",
                  "filename",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presigned upload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "Storage key of the new file. Send it back unchanged when you attach or register the upload."
                    },
                    "uploadUrl": {
                      "type": "string",
                      "description": "Short-lived URL. Send the file's bytes to it in a PUT request, with the headers below.",
                      "example": "https://storage.example.com/upload?token=abc123"
                    },
                    "headers": {
                      "type": "object",
                      "properties": {
                        "Content-Type": {
                          "type": "string",
                          "description": "The content type from the request.",
                          "example": "image/png"
                        }
                      },
                      "required": [
                        "Content-Type"
                      ],
                      "description": "Headers to send with the PUT request."
                    },
                    "expiresAt": {
                      "type": "string",
                      "description": "When uploadUrl stops working, as an ISO 8601 date and time in UTC.",
                      "example": "2026-03-14T09:31:53.589Z"
                    }
                  },
                  "required": [
                    "key",
                    "uploadUrl",
                    "headers",
                    "expiresAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The content type or size is not allowed for the purpose",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The visitor is anonymous: the host app has not identified them",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The widget is off, or its feedback, messenger and tickets tabs are all off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/files": {
      "post": {
        "operationId": "createQuillsWidgetFiles",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Register a widget attachment",
        "description": "Verifies an object that the visitor uploaded with POST /widget/uploads (purpose customer_file or customer_image) and registers it as a file. Idempotent per key: registering the same key again returns the same file and records no event. An unattached file is removed by retention after a day. Send the widget session token from identifyQuillsWidgetVisitor as `Authorization: Bearer <token>`; an anonymous session gets 403. Limited to 20 requests per minute per client IP and workspace. Records a `file.created` event when the file is new.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "^[^\\\\/\\p{Cc}]+$/u",
                    "description": "The file's display name, without slashes or control characters",
                    "example": "invoice-1042.pdf"
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Registered file",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The file's ID",
                      "example": "file_01m8rxxee8esga9ve6f0hcvyc0"
                    },
                    "name": {
                      "type": "string",
                      "description": "The file name given at registration",
                      "example": "invoice-1042.pdf"
                    },
                    "contentType": {
                      "type": "string",
                      "description": "The MIME type of the stored object",
                      "example": "application/pdf"
                    },
                    "size": {
                      "type": "number",
                      "description": "The file size in bytes",
                      "example": 48213
                    },
                    "family": {
                      "type": "string",
                      "description": "The file family, from the content type: image, video, audio, pdf, csv, text or other",
                      "example": "pdf"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the file was registered",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "created": {
                      "type": "boolean",
                      "description": "Whether this request registered the file. False when a retry found the file that an earlier request registered.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "contentType",
                    "size",
                    "family",
                    "createdAt",
                    "created"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The visitor is anonymous: the host app has not identified them",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The key is not an upload of the visitor, the uploaded object is missing or does not match, or widget attachments are off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The file that registered this upload was removed; The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/user/avatar": {
      "put": {
        "operationId": "saveQuillsCustomerAvatar",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Set the caller's avatar to an uploaded image",
        "description": "Verifies an image that the caller uploaded with POST /portal/uploads (purpose customer_avatar) and makes it the caller's avatar, also on the profile that teammates see. The previous uploaded avatar is queued for cleanup. The caller authenticates with their session cookie. Answers 404 while the portal is off. Limited to 10 requests per client IP and workspace per 10 minutes. Records a `customer.profile_updated` event when the avatar changed.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The caller's avatar",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored avatar changed. False when there was nothing to change.",
                      "example": true
                    },
                    "principalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The caller's principal ID, whose avatar is shown to teammates. Null when a removed customer has no principal.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The avatar URL now in effect: the uploaded image after a save, or the sign-in provider's (or host app's) picture after a removal. Null when there is none.",
                      "example": "https://cdn.example.com/avatars/jane.png"
                    }
                  },
                  "required": [
                    "changed",
                    "principalId",
                    "avatarUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller has no customer profile here",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The key is not an avatar upload of the caller, or the uploaded object is missing or does not match; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsCustomerAvatar",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Remove the caller's uploaded avatar",
        "description": "Removes the caller's uploaded avatar and queues the image for cleanup. An avatar from the sign-in provider stays and shows again. Removing when there is no uploaded avatar answers changed false. The caller authenticates with their session cookie. Answers 404 while the portal is off. Limited to 10 requests per client IP and workspace per 10 minutes. Records a `customer.profile_updated` event when the avatar changed.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's avatar",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored avatar changed. False when there was nothing to change.",
                      "example": true
                    },
                    "principalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The caller's principal ID, whose avatar is shown to teammates. Null when a removed customer has no principal.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The avatar URL now in effect: the uploaded image after a save, or the sign-in provider's (or host app's) picture after a removal. Null when there is none.",
                      "example": "https://cdn.example.com/avatars/jane.png"
                    }
                  },
                  "required": [
                    "changed",
                    "principalId",
                    "avatarUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/avatar": {
      "put": {
        "operationId": "saveQuillsWidgetAvatar",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Set the identified visitor's avatar to an uploaded image",
        "description": "Verifies an image that the visitor uploaded with POST /widget/uploads (purpose customer_avatar) and makes it the visitor's avatar, also on the profile that teammates see. The previous uploaded avatar is queued for cleanup. Needs the widget on with its feedback, messenger or tickets tab. Send the widget session token from identifyQuillsWidgetVisitor as `Authorization: Bearer <token>`; an anonymous session gets 403. Limited to 10 requests per client IP and workspace per 10 minutes. Records a `customer.profile_updated` event when the avatar changed.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The visitor's avatar",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored avatar changed. False when there was nothing to change.",
                      "example": true
                    },
                    "principalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The caller's principal ID, whose avatar is shown to teammates. Null when a removed customer has no principal.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The avatar URL now in effect: the uploaded image after a save, or the sign-in provider's (or host app's) picture after a removal. Null when there is none.",
                      "example": "https://cdn.example.com/avatars/jane.png"
                    }
                  },
                  "required": [
                    "changed",
                    "principalId",
                    "avatarUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The visitor is anonymous: the host app has not identified them",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The key is not an avatar upload of the visitor, the uploaded object is missing or does not match, or widget attachments are off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The caller changed during the request; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsWidgetAvatar",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Remove the identified visitor's uploaded avatar",
        "description": "Removes the visitor's uploaded avatar and queues the image for cleanup. A picture that the host app sent stays and shows again. Removing when there is no uploaded avatar answers changed false. Needs the widget on with its feedback, messenger or tickets tab. Send the widget session token from identifyQuillsWidgetVisitor as `Authorization: Bearer <token>`; an anonymous session gets 403. Limited to 10 requests per client IP and workspace per 10 minutes. Records a `customer.profile_updated` event when the avatar changed.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The visitor's avatar",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored avatar changed. False when there was nothing to change.",
                      "example": true
                    },
                    "principalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The caller's principal ID, whose avatar is shown to teammates. Null when a removed customer has no principal.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The avatar URL now in effect: the uploaded image after a save, or the sign-in provider's (or host app's) picture after a removal. Null when there is none.",
                      "example": "https://cdn.example.com/avatars/jane.png"
                    }
                  },
                  "required": [
                    "changed",
                    "principalId",
                    "avatarUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The visitor is anonymous: the host app has not identified them",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The widget is off, or its feedback, messenger and tickets tabs are all off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/avatars/{principalId}": {
      "get": {
        "operationId": "getQuillsAvatarImage",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Open a person's uploaded avatar",
        "description": "Redirects (302) to a short-lived signed URL of a person's uploaded avatar image. Needs no credential: the principal ID is unguessable and the URL carries a version that changes with the picture. The redirect is privately cached until shortly before the signed URL expires. Avatar URLs in other responses point here unless the storage serves objects from a public base URL.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The ID of the person (principal) whose avatar to open",
              "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
            },
            "required": true,
            "description": "The ID of the person (principal) whose avatar to open",
            "name": "principalId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "description": "The avatar version from the avatar URL, derived from the stored picture. It is not checked; it only makes the URL change when the picture changes, so caches never serve an old picture.",
              "example": "3f9a1c2b7d4e"
            },
            "required": false,
            "description": "The avatar version from the avatar URL, derived from the stored picture. It is not checked; it only makes the URL change when the picture changes, so caches never serve an old picture.",
            "name": "v",
            "in": "query"
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to the avatar image",
            "headers": {
              "Location": {
                "description": "The target URL",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "description": "Private, until shortly before the target expires",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "The person has no uploaded avatar, or file storage cannot produce a URL for it; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/media/{token}": {
      "get": {
        "operationId": "getQuillsPublicMedia",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Open a signed inline image from a support email",
        "description": "Redirects (302) to a short-lived signed object-storage URL for a raster inline image attached to a customer-visible, sent message. Needs no credential: the signed token in the path names the file and this workspace. Returns 404 for expired, tampered, non-raster, deleted, recalled, or internal-note images.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 20,
              "maxLength": 512,
              "description": "The signed media token from the image URL in the email. It names one file of this workspace and expires."
            },
            "required": true,
            "description": "The signed media token from the image URL in the email. It names one file of this workspace and expires.",
            "name": "token",
            "in": "path"
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to the image object",
            "headers": {
              "Location": {
                "description": "The target URL",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "description": "Private, until shortly before the target expires",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "The token is invalid, expired or for another workspace, or the image is not a raster image on a sent, customer-visible message; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/track": {
      "post": {
        "operationId": "createQuillsTrack",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Record a portal or widget page view",
        "description": "Records one anonymous page view for visitor analytics. No sign-in is needed. The body may be sent as `text/plain` JSON (at most 8 KiB), so a browser can send it with `navigator.sendBeacon` without a CORS preflight. Answers 404 while the named surface (portal or widget) is turned off.\n\nSome views are accepted but not stored, with the same empty answer: requests with Do Not Track or Global Privacy Control, requests from bots or without a User-Agent, widget views when the widget's visitor analytics are off, URLs that are not http or https, and days outside the maintained page-view window.\n\nOnly the page's origin and path, the traffic source (the `utm_source`, `source` or `ref` query parameter, else the external referrer's host name), the CDN country, the device type, browser and operating system, and a visitor hash are stored. The hash uses a salt that changes every UTC day, so visits on different days cannot be linked. The raw IP address, User-Agent and query string are not stored.\n\nRate limited to 120 requests per minute per client IP and workspace. Records no event.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Full URL of the viewed page. Only its origin and path are stored; the query string is read for campaign parameters and then dropped.",
                    "example": "https://feedback.example.com/roadmap?utm_source=newsletter"
                  },
                  "referrer": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "The page's `document.referrer`. Its host name becomes the traffic source when the URL has no campaign parameter; a referrer on the same host counts as direct traffic.",
                    "example": "https://www.example.com/blog/launch"
                  },
                  "surface": {
                    "type": "string",
                    "enum": [
                      "portal",
                      "widget"
                    ],
                    "description": "Where the view happened. `portal`: the public feedback portal. `widget`: the embedded widget."
                  },
                  "device": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Caller-chosen device identifier, the same value sent to the widget device endpoint. Stored with the view, except for widget views when the widget's device tracking is off. When a widget session already linked this device, its last-seen time and country are updated.",
                    "example": "d7c1e5a2-4b3f-4e8a-9c6d-2f1b0a9e8d7c"
                  }
                },
                "required": [
                  "url",
                  "surface"
                ]
              }
            },
            "text/plain": {
              "schema": {
                "type": "string",
                "maxLength": 8192,
                "description": "The same JSON document as text/plain, as sendBeacon sends it"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {},
                  "description": "Empty object. The answer is the same whether the view was stored or not."
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body is too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/surveys/active": {
      "get": {
        "operationId": "getQuillsPortalActiveSurvey",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Get the survey that waits for the caller",
        "description": "Returns the most recently activated survey that aims at the caller (no target segments, or a segment the caller is in) and that the caller did not answer, or null. Only a signed-in portal customer or an identified widget visitor gets a survey; an anonymous widget visitor gets null. The caller authenticates with their session cookie.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The survey, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "survey": {
                      "$ref": "#/components/schemas/QuillsCustomerSurvey"
                    }
                  },
                  "required": [
                    "survey"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/surveys/{surveyId}/responses": {
      "post": {
        "operationId": "submitQuillsPortalSurveyResponse",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Answer a survey",
        "description": "Records the caller's answer to an active survey that aims at them. One answer per person and survey. NPS takes a score of 0-10, CSAT 1-5 and CES 1-7; PMF and poll take one of the survey's options; open takes a comment. The comment is optional for the other types. Only a signed-in portal customer or an identified widget visitor answers. Records a survey.responded event. Limited to 30 requests per 10 minutes per client IP and workspace. The caller authenticates with their session cookie; the first write creates their customer profile in the workspace.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Survey ID (TypeID or UUID)",
              "example": "survey_01m8rxmftrfzvv1wbzjbvzvrhy"
            },
            "required": true,
            "description": "Survey ID (TypeID or UUID)",
            "name": "surveyId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10,
                    "description": "Score within the survey's scale; required for nps, csat and ces, not allowed for other types",
                    "example": 9
                  },
                  "choice": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "One of the survey's options; required for pmf and poll, not allowed for other types",
                    "example": "Very disappointed"
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Written answer; required for an open survey, optional for the others",
                    "example": "Fast and easy to use."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answered survey",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "surveyId": {
                      "type": "string",
                      "description": "ID of the answered survey",
                      "example": "survey_01m8rxmftrfzvv1wbzjbvzvrhy"
                    }
                  },
                  "required": [
                    "surveyId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The answer does not fit the survey type: a score outside its scale, a choice that is not an option, or a missing open answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No active survey with this ID aims at the caller, the caller is not signed in or identified, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The caller already answered this survey",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/surveys/active": {
      "get": {
        "operationId": "getQuillsWidgetActiveSurvey",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Get the survey that waits for the caller",
        "description": "Returns the most recently activated survey that aims at the caller (no target segments, or a segment the caller is in) and that the caller did not answer, or null. Only a signed-in portal customer or an identified widget visitor gets a survey; an anonymous widget visitor gets null. Send the widget session token as `Authorization: Bearer <token>`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The survey, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "survey": {
                      "$ref": "#/components/schemas/QuillsCustomerSurvey"
                    }
                  },
                  "required": [
                    "survey"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/widget/surveys/{surveyId}/responses": {
      "post": {
        "operationId": "submitQuillsWidgetSurveyResponse",
        "tags": [
          "Widget (public)"
        ],
        "summary": "Answer a survey",
        "description": "Records the caller's answer to an active survey that aims at them. One answer per person and survey. NPS takes a score of 0-10, CSAT 1-5 and CES 1-7; PMF and poll take one of the survey's options; open takes a comment. The comment is optional for the other types. Only a signed-in portal customer or an identified widget visitor answers. Records a survey.responded event. Limited to 30 requests per 10 minutes per client IP and workspace. Send the widget session token as `Authorization: Bearer <token>`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Survey ID (TypeID or UUID)",
              "example": "survey_01m8rxmftrfzvv1wbzjbvzvrhy"
            },
            "required": true,
            "description": "Survey ID (TypeID or UUID)",
            "name": "surveyId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10,
                    "description": "Score within the survey's scale; required for nps, csat and ces, not allowed for other types",
                    "example": 9
                  },
                  "choice": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "One of the survey's options; required for pmf and poll, not allowed for other types",
                    "example": "Very disappointed"
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Written answer; required for an open survey, optional for the others",
                    "example": "Fast and easy to use."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answered survey",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "surveyId": {
                      "type": "string",
                      "description": "ID of the answered survey",
                      "example": "survey_01m8rxmftrfzvv1wbzjbvzvrhy"
                    }
                  },
                  "required": [
                    "surveyId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The answer does not fit the survey type: a score outside its scale, a choice that is not an option, or a missing open answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Valid widget session required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No active survey with this ID aims at the caller, the caller is not signed in or identified, or the portal or widget is off; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The caller already answered this survey",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/privacy/export": {
      "post": {
        "operationId": "requestQuillsPortalPrivacyExport",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Request a portable export of your own data",
        "description": "Authenticated portal customers can request a ZIP archive containing their profile, feedback, conversations, attachments, tickets, and subscriptions (rate-limited to 5 requests per hour). The caller authenticates with their portal session; a customer profile is created for a signed-in account that has none yet. Internal notes are never included. Records a `privacy.access_requested` event; a background job builds the archive after commit. Poll `getQuillsPortalPrivacyExport` for the download URL. Requires configured file storage.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The queued self-service export request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The export request ID. Pass it to `getQuillsPortalPrivacyExport`.",
                      "example": "privacy_request_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "`pending`: queued. `running`: the archive is being built. `completed`: ready; `downloadUrl` is set until the export expires. `failed`: the export could not be built.",
                      "example": "completed"
                    },
                    "fileName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The ZIP file name.",
                      "example": "my-data-acme-2026-11-30.zip"
                    },
                    "downloadUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "A short-lived presigned URL for the archive. Null until the export completes, after it expires, and always in the response that creates the request.",
                      "example": "https://storage.example.com/privacy/my-data.zip?X-Amz-Signature=abc123"
                    },
                    "expiresAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the archive stops being available: 7 days after it completed. Null until it completes.",
                      "example": "2026-12-07T14:05:00.000Z"
                    },
                    "completedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the export completed. Null until then.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the export was requested.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "fileName",
                    "downloadUrl",
                    "expiresAt",
                    "completedAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills-public/{workspace}/portal/privacy/exports/{requestId}": {
      "get": {
        "operationId": "getQuillsPortalPrivacyExport",
        "tags": [
          "Customer portal (public)"
        ],
        "summary": "Check status and get download URL for your own privacy export",
        "description": "Returns the status of one of the caller's own data exports and, once it has completed and until it expires, a fresh short-lived download URL. The caller authenticates with their portal session. Another customer's export is not found.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The workspace's ID or its slug.",
              "example": "acme"
            },
            "required": true,
            "description": "The workspace's ID or its slug.",
            "name": "workspace",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The export request ID returned by `requestQuillsPortalPrivacyExport`.",
              "example": "privacy_request_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The export request ID returned by `requestQuillsPortalPrivacyExport`.",
            "name": "requestId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Status and download link for the caller's own export",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The export request ID. Pass it to `getQuillsPortalPrivacyExport`.",
                      "example": "privacy_request_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "`pending`: queued. `running`: the archive is being built. `completed`: ready; `downloadUrl` is set until the export expires. `failed`: the export could not be built.",
                      "example": "completed"
                    },
                    "fileName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The ZIP file name.",
                      "example": "my-data-acme-2026-11-30.zip"
                    },
                    "downloadUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "A short-lived presigned URL for the archive. Null until the export completes, after it expires, and always in the response that creates the request.",
                      "example": "https://storage.example.com/privacy/my-data.zip?X-Amz-Signature=abc123"
                    },
                    "expiresAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the archive stops being available: 7 days after it completed. Null until it completes.",
                      "example": "2026-12-07T14:05:00.000Z"
                    },
                    "completedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the export completed. Null until then.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the export was requested.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "fileName",
                    "downloadUrl",
                    "expiresAt",
                    "completedAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Sign-in required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "This account is blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No data export with this ID belongs to the caller; Workspace not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/tangled-integration/webhook/{integrationId}": {
      "post": {
        "operationId": "receiveTangledWebhook",
        "tags": [
          "Tangled"
        ],
        "summary": "Receive a signed Tangled repository webhook",
        "description": "Send the raw JSON payload with X-Tangled-Event and X-Tangled-Signature-256. The HMAC-SHA256 signature covers the exact request bytes. Branch pushes reconcile the current head; PR events are recorded as unsupported without changing tasks. Authenticated by the signature, made with the connection's webhook secret as `sha256=<hex digest>`; no session or API key is needed. An optional X-Tangled-Repo header must match the signed payload. A branch push links the branch to the task whose number its name carries, can move the task to the column set by the project's Tangled branch-push workflow rule, and publishes `task.updated` and, on a status change, `task.status_changed` events. Tag pushes are recorded as skipped. The latest outcome is available from the outcome route. Bodies over 1 MiB are rejected.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "ID of the Tangled integration, as shown at the end of its `webhookUrl`.",
              "example": "rmj63dhunda6v4ufepcb35cq"
            },
            "required": true,
            "description": "ID of the Tangled integration, as shown at the end of its `webhookUrl`.",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delivery processed durably",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "processed",
                        "skipped"
                      ],
                      "description": "`processed`: the branch push was reconciled; the outcome route shows whether a task changed. `skipped`: the event was recorded without changing tasks, such as a pull request, a tag push or a branch that no longer exists.",
                      "example": "processed"
                    }
                  },
                  "required": [
                    "status"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON, an unsupported or invalid event, an X-Tangled-Repo header that conflicts with the signed payload, or an invalid branch reference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid X-Tangled-Signature-256 signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Payload repository does not match the connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Active Tangled connection not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "408": {
            "description": "Request body timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Connection changed during processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds one MiB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Invalid stored connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Processing failed; delivery can be retried",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/get-session": {
      "get": {
        "operationId": "getSession",
        "tags": [
          "Authentication"
        ],
        "summary": "Get session",
        "description": "Get the current authenticated session, or null when the caller is not signed in. Served by Better Auth.",
        "security": [],
        "responses": {
          "200": {
            "description": "Current session details, or null when unauthenticated"
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/asset/{id}": {
      "get": {
        "operationId": "getAsset",
        "tags": [
          "Assets"
        ],
        "summary": "Download asset",
        "description": "Downloads an uploaded asset. An asset uploaded to a description in a public project can be read without signing in, unless its workspace is archived. Any other asset needs a session cookie, bearer token or API key of a workspace member who can access the asset's project and holds the `task:read` workspace permission. A staged upload, made while a task is being created and not yet attached to it, can only be read by the user who uploaded it, who needs `task:create` instead. PNG, JPEG, GIF, WebP, AVIF, APNG, HEIC and HEIF images are served inline with their type; everything else is served as an `application/octet-stream` attachment. Public assets may be cached for 5 minutes, others privately for 2 minutes.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the asset.",
              "example": "yodwh0iimi26g59fib7eqzer"
            },
            "required": true,
            "description": "ID of the asset.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The asset's bytes, with `Content-Disposition` carrying its original file name",
            "content": {
              "*/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "Not modified"
          },
          "401": {
            "description": "The asset is not public and the request is not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Staged upload owned by another user, no access to the asset's project, missing the `task:read` permission (`task:create` for a staged upload), an API key that is not valid for the workspace, or the workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Asset not found, the caller is not a member of its workspace, the public asset's workspace is archived, or the stored file is missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/user/avatar/{id}": {
      "get": {
        "operationId": "getUserAvatar",
        "tags": [
          "User"
        ],
        "summary": "Download avatar",
        "description": "Downloads a user avatar by its avatar ID. Public, immutable, and cache-friendly: the ID changes whenever the avatar is replaced, so responses may be cached for a year. Send the returned `ETag` in `If-None-Match` to get a 304.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the avatar, the last part of the URL returned by `uploadUserAvatar`. Not the user ID.",
              "example": "yodwh0iimi26g59fib7eqzer"
            },
            "required": true,
            "description": "ID of the avatar, the last part of the URL returned by `uploadUserAvatar`. Not the user ID.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The avatar image, as PNG, JPEG or WebP, in the type it was uploaded with",
            "content": {
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: `If-None-Match` matches the avatar's ETag"
          },
          "404": {
            "description": "Avatar not found, for example because it was replaced or removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/config": {
      "get": {
        "operationId": "getConfig",
        "tags": [
          "Config"
        ],
        "summary": "Get config",
        "description": "Returns the public settings of the server: its name and which sign-in methods, registration paths, integrations, and features are enabled. Needs no authentication; the sign-in page reads it to decide which sign-in methods to show.",
        "security": [],
        "responses": {
          "200": {
            "description": "Application settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Config"
                }
              }
            }
          }
        }
      }
    },
    "/desktop/session": {
      "post": {
        "operationId": "createDesktopSession",
        "tags": [
          "Desktop"
        ],
        "summary": "Create the desktop session cookie",
        "description": "Sets the session cookie for the session behind a device-flow access token, so the desktop app's web view is signed in. Send the token as `Authorization: Bearer <token>`. Cookies and API keys on the request are ignored. When the user has a live single sign-on session, the desktop session takes over its identity provider session ID, so a back-channel logout from the provider also ends the desktop session. The response has no body.",
        "security": [],
        "responses": {
          "204": {
            "description": "The session cookie is set with `Set-Cookie` headers; there is no body"
          },
          "401": {
            "description": "The `Authorization` header is missing or is not a bearer token, or the bearer token is not a valid session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/auth/organization/accept-invitation": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "acceptOrganizationInvitation",
        "summary": "Accept Organization Invitation",
        "description": "Accept an invitation to an organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invitationId": {
                    "type": "string",
                    "description": "The ID of the invitation to accept"
                  }
                },
                "required": [
                  "invitationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "member": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/add-team-member": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "addOrganizationTeamMember",
        "summary": "Add Organization Team Member",
        "description": "The newly created member",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "teamId": {
                    "type": "string",
                    "description": "The team the user should be a member of."
                  },
                  "userId": {
                    "type": "string",
                    "description": "The user Id which represents the user to be added as a member."
                  },
                  "organizationId": {
                    "type": "string",
                    "description": "The organization ID which the team falls under. If not provided, it will default to the user's active organization."
                  }
                },
                "required": [
                  "teamId",
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique identifier of the team member"
                    },
                    "userId": {
                      "type": "string",
                      "description": "The user ID of the team member"
                    },
                    "teamId": {
                      "type": "string",
                      "description": "The team ID of the team the team member is in"
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "Timestamp when the team member was created"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "teamId",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/cancel-invitation": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "cancelOrganizationInvitation",
        "summary": "Cancel Organization Invitation",
        "description": "Cancel Organization Invitation",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invitationId": {
                    "type": "string",
                    "description": "The ID of the invitation to cancel"
                  }
                },
                "required": [
                  "invitationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/check-slug": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "checkOrganizationSlug",
        "summary": "Check Organization Slug",
        "description": "Check Organization Slug",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "description": "The organization slug to check. Eg: \"my-org\""
                  }
                },
                "required": [
                  "slug"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/create": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "createOrganization",
        "summary": "Create Organization",
        "description": "Create an organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the organization"
                  },
                  "slug": {
                    "type": "string",
                    "description": "The slug of the organization"
                  },
                  "userId": {
                    "type": "string",
                    "description": "The user id of the organization creator. If not provided, the current user will be used. Should only be used by admins or when called by the server. server-only. Eg: \"user-id\""
                  },
                  "logo": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The logo of the organization"
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {},
                    "description": "The metadata of the organization"
                  },
                  "keepCurrentActiveOrganization": {
                    "type": "boolean",
                    "description": "Whether to keep the current active organization active after creating a new one. Eg: true"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "slug"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/create-role": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "createOrganizationRole",
        "summary": "Create Organization Role",
        "description": "Create Organization Role",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organizationId": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "description": "The name of the role to create"
                  },
                  "permission": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "description": "The permission to assign to the role"
                  },
                  "additionalFields": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "role",
                  "permission"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/create-team": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "createOrganizationTeam",
        "summary": "Create Organization Team",
        "description": "Create a new team within an organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the team. Eg: \"my-team\""
                  },
                  "organizationId": {
                    "type": "string",
                    "description": "The organization ID which the team will be created in. Defaults to the active organization. Eg: \"organization-id\""
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique identifier of the created team"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the team"
                    },
                    "organizationId": {
                      "type": "string",
                      "description": "ID of the organization the team belongs to"
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "Timestamp when the team was created"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "Timestamp when the team was last updated"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "organizationId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/delete": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "deleteOrganization",
        "summary": "Delete Organization",
        "description": "Delete an organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organizationId": {
                    "type": "string",
                    "description": "The organization id to delete"
                  }
                },
                "required": [
                  "organizationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/delete-role": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "deleteOrganizationRole",
        "summary": "Delete Organization Role",
        "description": "Delete Organization Role",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "roleName": {
                            "type": "string",
                            "description": "The name of the role to delete"
                          }
                        },
                        "required": [
                          "roleName"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "roleId": {
                            "type": "string",
                            "description": "The id of the role to delete"
                          }
                        },
                        "required": [
                          "roleId"
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/get-active-member": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "getOrganizationActiveMember",
        "summary": "Get Organization Active Member",
        "description": "Get the member details of the active organization",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "organizationId",
                    "role"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/get-active-member-role": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "getOrganizationActiveMemberRole",
        "summary": "Get Organization Active Member Role",
        "description": "Get Organization Active Member Role",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/get-full-organization": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "getOrganizationFullOrganization",
        "summary": "Get Organization Full Organization",
        "description": "Get the full organization",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/get-invitation": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "getOrganizationInvitation",
        "summary": "Get Organization Invitation",
        "description": "Get an invitation by ID",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": true,
            "name": "id",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "inviterId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": "string"
                    },
                    "organizationName": {
                      "type": "string"
                    },
                    "organizationSlug": {
                      "type": "string"
                    },
                    "inviterEmail": {
                      "type": "string"
                    },
                    "projectAccess": {
                      "type": "string",
                      "enum": [
                        "all",
                        "selected"
                      ],
                      "description": "\"all\" gives access to every project once accepted; \"selected\" limits the member to projectIds."
                    },
                    "projectIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Projects the invitation grants when projectAccess is \"selected\". Only projects the viewer can access are listed."
                    }
                  },
                  "required": [
                    "id",
                    "email",
                    "role",
                    "organizationId",
                    "inviterId",
                    "status",
                    "expiresAt",
                    "organizationName",
                    "organizationSlug",
                    "inviterEmail",
                    "projectAccess",
                    "projectIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/get-role": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "getOrganizationRole",
        "summary": "Get Organization Role",
        "description": "Get Organization Role",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/has-permission": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "hasOrganizationPermission",
        "summary": "Check Organization Permission",
        "description": "Check if the user has permission",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "permission": {
                    "type": "object",
                    "additionalProperties": {},
                    "description": "The permission to check"
                  },
                  "permissions": {
                    "type": "object",
                    "additionalProperties": {},
                    "description": "The permission to check"
                  }
                },
                "required": [
                  "permissions"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/invite-member": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "inviteOrganizationMember",
        "summary": "Invite Organization Member",
        "description": "Create or resend an invitation. Email delivery failures return 502; the invitation remains pending and can be resent after correcting SMTP settings.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "The email address of the user to invite"
                  },
                  "role": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: \"member\""
                  },
                  "organizationId": {
                    "type": "string",
                    "description": "The organization ID to invite the user to"
                  },
                  "resend": {
                    "type": "boolean",
                    "description": "Resend the invitation email, if the user is already invited. Eg: true"
                  },
                  "teamId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "projectAccess": {
                    "type": "string",
                    "enum": [
                      "all",
                      "selected"
                    ],
                    "description": "\"all\" (the default) gives access to every project. \"selected\" limits the new member to projectIds once they accept."
                  },
                  "projectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Projects the new member can access when projectAccess is \"selected\". They must belong to the workspace, and an inviter whose own access is limited can only choose projects they can access."
                  }
                },
                "required": [
                  "email",
                  "role"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "inviterId": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "projectAccess": {
                      "type": "string",
                      "enum": [
                        "all",
                        "selected"
                      ],
                      "description": "\"all\" gives access to every project once accepted; \"selected\" limits the member to projectIds."
                    },
                    "projectIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Projects the invitation grants when projectAccess is \"selected\". Only projects the viewer can access are listed."
                    }
                  },
                  "required": [
                    "id",
                    "email",
                    "role",
                    "organizationId",
                    "inviterId",
                    "status",
                    "expiresAt",
                    "createdAt",
                    "projectAccess",
                    "projectIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "Invitation saved, but email delivery failed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "INVITATION_EMAIL_FAILED"
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/auth/organization/leave": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "leaveOrganization",
        "summary": "Leave Organization",
        "description": "Leave Organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organizationId": {
                    "type": "string",
                    "description": "The organization Id for the member to leave. Eg: \"organization-id\""
                  }
                },
                "required": [
                  "organizationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/list": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "listOrganization",
        "summary": "List Organization",
        "description": "List all organizations",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/list-invitations": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "listOrganizationInvitations",
        "summary": "List Organization Invitations",
        "description": "List Organization Invitations",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "organizationId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "inviterId": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "expiresAt": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "projectAccess": {
                        "type": "string",
                        "enum": [
                          "all",
                          "selected"
                        ],
                        "description": "\"all\" gives access to every project once accepted; \"selected\" limits the member to projectIds."
                      },
                      "projectIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Projects the invitation grants when projectAccess is \"selected\". Only projects the viewer can access are listed."
                      }
                    },
                    "required": [
                      "id",
                      "email",
                      "role",
                      "organizationId",
                      "inviterId",
                      "status",
                      "expiresAt",
                      "createdAt",
                      "projectAccess",
                      "projectIds"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/list-members": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "listOrganizationMembers",
        "summary": "List Organization Members",
        "description": "List Organization Members",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/list-roles": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "listOrganizationRoles",
        "summary": "List Organization Roles",
        "description": "List Organization Roles",
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/list-team-members": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "listOrganizationTeamMembers",
        "summary": "List Organization Team Members",
        "description": "List the members of the given team.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the team member"
                      },
                      "userId": {
                        "type": "string",
                        "description": "The user ID of the team member"
                      },
                      "teamId": {
                        "type": "string",
                        "description": "The team ID of the team the team member is in"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "Timestamp when the team member was created"
                      }
                    },
                    "required": [
                      "id",
                      "userId",
                      "teamId",
                      "createdAt"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/list-teams": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "listOrganizationTeams",
        "summary": "List Organization Teams",
        "description": "List all teams in an organization",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the team"
                      },
                      "name": {
                        "type": "string",
                        "description": "Name of the team"
                      },
                      "organizationId": {
                        "type": "string",
                        "description": "ID of the organization the team belongs to"
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "Timestamp when the team was created"
                      },
                      "updatedAt": {
                        "type": "string",
                        "description": "Timestamp when the team was last updated"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "organizationId",
                      "createdAt",
                      "updatedAt"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/list-user-invitations": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "listOrganizationUserInvitations",
        "summary": "List Organization User Invitations",
        "description": "List all invitations a user has received",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "organizationName": {
                        "type": "string"
                      },
                      "inviterId": {
                        "type": "string",
                        "description": "The ID of the user who created the invitation"
                      },
                      "teamId": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The ID of the team associated with the invitation"
                      },
                      "status": {
                        "type": "string"
                      },
                      "expiresAt": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "email",
                      "role",
                      "organizationId",
                      "organizationName",
                      "inviterId",
                      "status",
                      "expiresAt",
                      "createdAt"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/list-user-teams": {
      "get": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "listOrganizationUserTeams",
        "summary": "List Organization User Teams",
        "description": "List all teams that the current user is a part of.",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {}
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/reject-invitation": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "rejectOrganizationInvitation",
        "summary": "Reject Organization Invitation",
        "description": "Reject an invitation to an organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "invitationId": {
                    "type": "string",
                    "description": "The ID of the invitation to reject"
                  }
                },
                "required": [
                  "invitationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "member": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "additionalProperties": {}
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/remove-member": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "removeOrganizationMember",
        "summary": "Remove Organization Member",
        "description": "Remove a member from an organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "memberIdOrEmail": {
                    "type": "string",
                    "description": "The ID or email of the member to remove"
                  },
                  "organizationId": {
                    "type": "string",
                    "description": "The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: \"org-id\""
                  }
                },
                "required": [
                  "memberIdOrEmail"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "member": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "userId": {
                          "type": "string"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "userId",
                        "organizationId",
                        "role"
                      ]
                    }
                  },
                  "required": [
                    "member"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/remove-team": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "removeOrganizationTeam",
        "summary": "Remove Organization Team",
        "description": "Remove a team from an organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "teamId": {
                    "type": "string",
                    "description": "The team ID of the team to remove. Eg: \"team-id\""
                  },
                  "organizationId": {
                    "type": "string",
                    "description": "The organization ID which the team falls under. If not provided, it will default to the user's active organization. Eg: \"organization-id\""
                  }
                },
                "required": [
                  "teamId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "enum": [
                        "Team removed successfully."
                      ],
                      "description": "Confirmation message indicating successful removal"
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/remove-team-member": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "removeOrganizationTeamMember",
        "summary": "Remove Organization Team Member",
        "description": "Remove a member from a team",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "teamId": {
                    "type": "string",
                    "description": "The team the user should be removed from."
                  },
                  "userId": {
                    "type": "string",
                    "description": "The user which should be removed from the team."
                  },
                  "organizationId": {
                    "type": "string",
                    "description": "The organization ID which the team falls under. If not provided, it will default to the user's active organization."
                  }
                },
                "required": [
                  "teamId",
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "enum": [
                        "Team member removed successfully."
                      ],
                      "description": "Confirmation message indicating successful removal"
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/set-active": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "setOrganizationActive",
        "summary": "Set Organization Active",
        "description": "Set the active organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "organizationId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The organization id to set as active. It can be null to unset the active organization. Eg: \"org-id\""
                  },
                  "organizationSlug": {
                    "type": "string",
                    "description": "The organization slug to set as active. It can be null to unset the active organization if organizationId is not provided. Eg: \"org-slug\""
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/set-active-team": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "setOrganizationActiveTeam",
        "summary": "Set Organization Active Team",
        "description": "Set the active team for the current active organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "teamId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The team id to set as active. It can be null to unset the active team"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/update": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "updateOrganization",
        "summary": "Update Organization",
        "description": "Update an organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "description": "The name of the organization"
                      },
                      "slug": {
                        "type": "string",
                        "description": "The slug of the organization"
                      },
                      "logo": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The logo of the organization"
                      },
                      "metadata": {
                        "type": "object",
                        "additionalProperties": {},
                        "description": "The metadata of the organization"
                      }
                    }
                  },
                  "organizationId": {
                    "type": "string",
                    "description": "The organization ID. Eg: \"org-id\""
                  }
                },
                "required": [
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/update-member-role": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "updateOrganizationMemberRole",
        "summary": "Update Organization Member Role",
        "description": "Update the role of a member in an organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "description": "The new role to be applied. This can be a string or array of strings representing the roles. Eg: [\"admin\", \"sale\"]"
                  },
                  "memberId": {
                    "type": "string",
                    "description": "The member id to apply the role update to. Eg: \"member-id\""
                  },
                  "organizationId": {
                    "type": "string",
                    "description": "An optional organization ID which the member is a part of to apply the role update. If not provided, you must provide session headers to get the active organization. Eg: \"organization-id\""
                  }
                },
                "required": [
                  "role",
                  "memberId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "member": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "userId": {
                          "type": "string"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "role": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "userId",
                        "organizationId",
                        "role"
                      ]
                    }
                  },
                  "required": [
                    "member"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/update-role": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "updateOrganizationRole",
        "summary": "Update Organization Role",
        "description": "Update Organization Role",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "organizationId": {
                        "type": "string"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "permission": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "roleName": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "required": [
                      "data"
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "roleName": {
                            "type": "string",
                            "description": "The name of the role to update"
                          }
                        },
                        "required": [
                          "roleName"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "roleId": {
                            "type": "string",
                            "description": "The id of the role to update"
                          }
                        },
                        "required": [
                          "roleId"
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/organization/update-team": {
      "post": {
        "tags": [
          "Organization Management"
        ],
        "operationId": "updateOrganizationTeam",
        "summary": "Update Organization Team",
        "description": "Update an existing team in an organization",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "teamId": {
                    "type": "string",
                    "description": "The ID of the team to be updated. Eg: \"team-id\""
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "organizationId": {
                        "type": "string"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      }
                    }
                  }
                },
                "required": [
                  "teamId",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique identifier of the updated team"
                    },
                    "name": {
                      "type": "string",
                      "description": "Updated name of the team"
                    },
                    "organizationId": {
                      "type": "string",
                      "description": "ID of the organization the team belongs to"
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "Timestamp when the team was created"
                    },
                    "updatedAt": {
                      "type": "string",
                      "description": "Timestamp when the team was last updated"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "organizationId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/auth/device": {
      "get": {
        "operationId": "getDeviceAuthorizationPage",
        "tags": [
          "Authentication"
        ],
        "summary": "Device authorization page",
        "description": "Better Auth serves this as JSON. A top-level browser navigation is redirected to the web app's device screen instead, so opening the URL by hand shows a page rather than a JSON blob.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "The device authorization user code."
            },
            "required": false,
            "description": "The device authorization user code.",
            "name": "user_code",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ],
              "description": "Force a redirect to the web UI, for clients that do not send Sec-Fetch-* headers."
            },
            "required": false,
            "description": "Force a redirect to the web UI, for clients that do not send Sec-Fetch-* headers.",
            "name": "ui",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Device authorization payload from Better Auth"
          },
          "302": {
            "description": "Redirects the browser to the web app device screen"
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/mcp/register": {
      "post": {
        "operationId": "registerMcpOAuthClient",
        "tags": [
          "MCP"
        ],
        "summary": "Register MCP OAuth client",
        "description": "Registers a public OAuth client for the MCP endpoint (RFC 7591 dynamic client registration). No authentication is needed. Public clients hold no secret, so authorization is protected by PKCE and an explicit consent step. Each call creates a new client. Registrations are rate limited: when the limit is reached the server answers 429 with `temporarily_unavailable` and a `Retry-After` header. Bodies over 32 KiB are rejected.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "redirect_uris": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "minItems": 1,
                    "maxItems": 10,
                    "description": "Redirect URIs the client may use, from 1 to 10. Up to 2048 characters. Must use https, http on a loopback host (`localhost`, `127.0.0.1` or `[::1]`), or a custom app scheme; URIs with a fragment or embedded credentials, and the `javascript:`, `data:`, `file:` and `vbscript:` schemes, are rejected.",
                    "example": [
                      "http://127.0.0.1:33418/callback"
                    ]
                  },
                  "client_name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Name shown on the consent page, up to 100 characters. When omitted, the consent page shows `MCP client`.",
                    "example": "Example MCP Client"
                  },
                  "token_endpoint_auth_method": {
                    "type": "string",
                    "enum": [
                      "none"
                    ],
                    "description": "Token endpoint authentication method. Only `none` is supported: clients are public and hold no secret.",
                    "example": "none"
                  },
                  "grant_types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "authorization_code",
                        "refresh_token"
                      ]
                    },
                    "maxItems": 2,
                    "description": "Grant types the client wants. Must include `authorization_code`. `refresh_token` is accepted, but no refresh tokens are issued, so it is left out of the response.",
                    "example": [
                      "authorization_code"
                    ]
                  },
                  "response_types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "code"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 1,
                    "description": "Response types the client wants. Must be `[\"code\"]` when sent.",
                    "example": [
                      "code"
                    ]
                  }
                },
                "required": [
                  "redirect_uris"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The registered OAuth client",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpClientRegistration"
                }
              }
            }
          },
          "400": {
            "description": "Invalid client metadata: `invalid_redirect_uri` for a rejected redirect URI, `invalid_client_metadata` for any other field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/authorize": {
      "get": {
        "operationId": "authorizeMcpOAuthClient",
        "tags": [
          "MCP"
        ],
        "summary": "Start MCP authorization",
        "description": "Starts an MCP OAuth authorization using the authorization code flow with PKCE. No authentication is needed. Checks the client and redirect URI, stores a pending consent request for 10 minutes, and redirects the browser to the albus consent page with the request's `request_id`, where the signed-in user approves or denies it. Errors are returned as JSON rather than redirected to the client. The authorization URL is limited to 8 KiB, and requests are rate limited with 429 `temporarily_unavailable`.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "code"
              ],
              "description": "OAuth response type. Must be `code`.",
              "example": "code"
            },
            "required": true,
            "description": "OAuth response type. Must be `code`.",
            "name": "response_type",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "Client ID returned by client registration.",
              "example": "3f6c2a9e-8b1d-4c7a-9e2f-5d4b6a1c0e93"
            },
            "required": true,
            "description": "Client ID returned by client registration.",
            "name": "client_id",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 2048,
              "description": "Redirect URI to send the code or error to. Must exactly match one of the client's registered redirect URIs. Up to 2048 characters. Must use https, http on a loopback host (`localhost`, `127.0.0.1` or `[::1]`), or a custom app scheme; URIs with a fragment or embedded credentials, and the `javascript:`, `data:`, `file:` and `vbscript:` schemes, are rejected.",
              "example": "http://127.0.0.1:33418/callback"
            },
            "required": true,
            "description": "Redirect URI to send the code or error to. Must exactly match one of the client's registered redirect URIs. Up to 2048 characters. Must use https, http on a loopback host (`localhost`, `127.0.0.1` or `[::1]`), or a custom app scheme; URIs with a fragment or embedded credentials, and the `javascript:`, `data:`, `file:` and `vbscript:` schemes, are rejected.",
            "name": "redirect_uri",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{43}$",
              "description": "PKCE code challenge: the unpadded base64url SHA-256 hash of the client's code verifier, exactly 43 characters.",
              "example": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"
            },
            "required": true,
            "description": "PKCE code challenge: the unpadded base64url SHA-256 hash of the client's code verifier, exactly 43 characters.",
            "name": "code_challenge",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "S256"
              ],
              "description": "PKCE challenge method. Only `S256` is accepted.",
              "example": "S256"
            },
            "required": true,
            "description": "PKCE challenge method. Only `S256` is accepted.",
            "name": "code_challenge_method",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Opaque client state, returned unchanged. The complete authorization URL is limited to 8 KiB.",
              "example": "af0ifjsldkj"
            },
            "required": false,
            "description": "Opaque client state, returned unchanged. The complete authorization URL is limited to 8 KiB.",
            "name": "state",
            "in": "query"
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to the albus consent page for the new request"
          },
          "400": {
            "description": "`invalid_client` for an unknown client, `invalid_redirect_uri` for a redirect URI the client did not register, or `invalid_request` for another invalid parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/authorize/request/{requestId}": {
      "get": {
        "operationId": "getMcpAuthorizationRequest",
        "tags": [
          "MCP"
        ],
        "summary": "Get consent request",
        "description": "Returns the client name and redirect URI of a pending consent request, so the consent page can show who is asking. No authentication is needed. Reading the request does not consume it.",
        "security": [],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "ID of the pending consent request, passed to the consent page as its `request_id` query parameter. Requests expire 10 minutes after authorization starts.",
              "example": "7d2e4b1a-5c3f-4e8d-9a6b-0f1c2d3e4a5b"
            },
            "required": true,
            "description": "ID of the pending consent request, passed to the consent page as its `request_id` query parameter. Requests expire 10 minutes after authorization starts.",
            "name": "requestId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The pending authorization request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpAuthorizationRequest"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_client`: the client that started the request is no longer registered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          },
          "404": {
            "description": "`invalid_or_expired_request`: no pending request with this ID, or it expired or was already decided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "decideMcpAuthorizationRequest",
        "tags": [
          "MCP"
        ],
        "summary": "Decide consent request",
        "description": "Approves or denies a pending consent request and returns the URL to send the browser back to. Requires a signed-in user session, and the `Origin` header must be the albus web app. Approving issues a single-use authorization code, valid for 5 minutes, that the client exchanges at `POST /api/mcp/token` with its PKCE code verifier for a bearer access token valid for 30 days; it also publishes an `mcp.authorization_code_issued` event. Denying ends the request and sends `error=access_denied` to the client. The client's `state` is passed back in both cases. A request can be decided only once.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "ID of the pending consent request, passed to the consent page as its `request_id` query parameter. Requests expire 10 minutes after authorization starts.",
              "example": "7d2e4b1a-5c3f-4e8d-9a6b-0f1c2d3e4a5b"
            },
            "required": true,
            "description": "ID of the pending consent request, passed to the consent page as its `request_id` query parameter. Requests expire 10 minutes after authorization starts.",
            "name": "requestId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "approved": {
                    "type": "boolean",
                    "description": "`true` approves the request and issues an authorization code; `false` denies it.",
                    "example": true
                  }
                },
                "required": [
                  "approved"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The client redirect URL with the code or error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpAuthorizationDecision"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request` for an invalid body, or `invalid_client` when the client is gone or no longer lists the redirect URI",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          },
          "401": {
            "description": "`unauthorized`: no signed-in user session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          },
          "403": {
            "description": "`invalid_origin`: the request did not come from the albus web app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          },
          "404": {
            "description": "`invalid_or_expired_request`: no pending request with this ID, or it expired or was already decided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/oauth/id-token": {
      "get": {
        "operationId": "getOAuthIdToken",
        "tags": [
          "Authentication"
        ],
        "summary": "Get OAuth id token",
        "description": "Returns the stored id_token of the current user's linked custom OAuth/OIDC account, for example to pass as `id_token_hint` to the provider's logout URL when signing out. Returns null when the user has no linked custom OAuth account. Requires a user session; API keys are rejected.",
        "responses": {
          "200": {
            "description": "The id_token if available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthIdToken"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated with an API key instead of a user session (code `SESSION_REQUIRED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/project/{id}/move": {
      "put": {
        "operationId": "moveProject",
        "tags": [
          "Projects"
        ],
        "summary": "Move a project to another workspace",
        "description": "Moves a project, with its tasks, columns and other content, to another workspace the caller belongs to, and places it at the end of the destination's sidebar order. Assignees who are not members of the destination or cannot access the project there are unassigned, and an `unassigned` activity is recorded on each affected task. Restricted-member grants and per-user notification settings for the project are removed; a caller who is a restricted member of the destination is granted access. Task labels and assets move with the project, links to integrations of other projects are removed, and open real-time connections to the project are closed. Publishes `integration.sync_labels_changed`, `project.updated` and `project.moved` events, plus `task.bulk_unassigned` when tasks were unassigned. Requires the `project:update` and `project:delete` workspace permissions in the source, and the `project:create` and `workspace:manage_settings` permissions in the destination, whose plan must be active when billing is enabled. Remove task relationships to other projects before moving.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of the destination workspace. Must differ from the project's current workspace, and the caller must be a member of it.",
                    "example": "nqyu3k7a8yhe2cbw0xj9v5fd"
                  }
                },
                "required": [
                  "workspaceId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project moved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MovedProject"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or the destination is the project's current workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "402": {
            "description": "The destination workspace's plan has expired (only when billing is enabled)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing permission in the source or destination workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found in the source workspace, or destination workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The destination already has a project with this key, tasks are related to tasks in other projects, a matching label deletion is still in progress, or the project was moved concurrently",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/project": {
      "get": {
        "operationId": "listProjects",
        "tags": [
          "Projects"
        ],
        "summary": "List projects",
        "description": "Lists the projects in a workspace that the caller can access, in sidebar order (by `position`, then creation time, then ID), each with task statistics. Archived projects are left out unless `includeArchived` is `true`. The list is not paginated. Requires the `project:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace to list projects from.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace to list projects from.",
            "name": "workspaceId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Pass `true` to include archived projects in the list. Any other value, or omitting it, leaves them out.",
              "example": "true"
            },
            "required": false,
            "description": "Pass `true` to include archived projects in the list. Any other value, or omitting it, leaves them out.",
            "name": "includeArchived",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List of projects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProjectListItem"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Workspace ID could not be determined",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createProject",
        "tags": [
          "Projects"
        ],
        "summary": "Create project",
        "description": "Creates a project at the end of the workspace's sidebar order, with the default columns To Do, In Progress, In Review and Done (final). The key in `slug` becomes the prefix of its task identifiers. A caller who is a restricted member of the workspace is granted access to the new project. Requires the `project:create` workspace permission and, when billing is enabled, an active plan.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Display name of the project.",
                    "example": "Website"
                  },
                  "workspaceId": {
                    "type": "string",
                    "description": "ID of the workspace to create the project in.",
                    "example": "cfklow33tpuxgpxko9nxqllg"
                  },
                  "icon": {
                    "type": "string",
                    "description": "Icon name of the project, stored as given. The web app uses Lucide icon names such as `Layout` or `Rocket`.",
                    "example": "Rocket"
                  },
                  "slug": {
                    "type": "string",
                    "description": "Project key, used as the prefix of the project's task identifiers such as `WEB-12`. Stored as given. No other project in the workspace, archived ones included, may use the same key; keys are compared case-insensitively after Unicode NFKC normalization.",
                    "example": "WEB"
                  }
                },
                "required": [
                  "name",
                  "workspaceId",
                  "icon",
                  "slug"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or workspace ID could not be determined",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "402": {
            "description": "The workspace's plan has expired (only when billing is enabled)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing `project:create` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another project in the workspace, possibly archived, already uses this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/project/{id}": {
      "get": {
        "operationId": "getProject",
        "tags": [
          "Projects"
        ],
        "summary": "Get project",
        "description": "Returns a project by ID, archived or not. Requires access to the project and the `project:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Project details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateProject",
        "tags": [
          "Projects"
        ],
        "summary": "Update project",
        "description": "Replaces a project's name, icon, key, description and visibility, and optionally its `includeSubtasks` setting. Publishes a `project.updated` event. Requires access to the project and the `project:update` workspace permission, plus `project:share` when `isPublic` changes.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Display name of the project.",
                    "example": "Website"
                  },
                  "icon": {
                    "type": "string",
                    "description": "Icon name of the project, stored as given. The web app uses Lucide icon names such as `Layout` or `Rocket`.",
                    "example": "Rocket"
                  },
                  "slug": {
                    "type": "string",
                    "description": "Project key, used as the prefix of the project's task identifiers such as `WEB-12`. Stored as given. A changed key must not match the key of another project in the workspace, archived ones included; keys are compared case-insensitively after Unicode NFKC normalization.",
                    "example": "WEB"
                  },
                  "description": {
                    "type": "string",
                    "description": "Description of the project. Replaces the current description; an empty string clears it.",
                    "example": "Marketing site and docs."
                  },
                  "isPublic": {
                    "type": "boolean",
                    "description": "Whether the project's board can be read without signing in through the public project endpoints. Changing it requires the `project:share` workspace permission.",
                    "example": false
                  },
                  "includeSubtasks": {
                    "type": "boolean",
                    "description": "Whether task views show subtasks by default. When omitted, the current setting is kept.",
                    "example": true
                  }
                },
                "required": [
                  "name",
                  "icon",
                  "slug",
                  "description",
                  "isPublic"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing `project:update`, or missing `project:share` when visibility changes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another project in the workspace, possibly archived, already uses the new key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteProject",
        "tags": [
          "Projects"
        ],
        "summary": "Delete project",
        "description": "Permanently deletes a project with its tasks, columns and other content, and queues its stored files (task images and the background image) for removal. Returns the project as it was before deletion. Publishes a `subtask-parents.refresh` event so parent tasks in other projects update their subtask progress. Archive the project instead to keep its data. Requires access to the project and the `project:delete` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:delete permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/project/{id}/background": {
      "get": {
        "operationId": "getProjectBackground",
        "tags": [
          "Projects"
        ],
        "summary": "Download project background",
        "description": "Downloads the project's board background image. The response carries an `ETag` and `Cache-Control: private, max-age=300, must-revalidate`; send the ETag in `If-None-Match` to get 304 while the image is unchanged. Requires access to the project and the `project:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The project background image",
            "content": {
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "Not modified: the `If-None-Match` header matches the current ETag"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no background image",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteProjectBackground",
        "tags": [
          "Projects"
        ],
        "summary": "Delete project background",
        "description": "Removes the project's board background and deletes the image from storage. Succeeds even when no background is set. Publishes a `project.updated` event. Requires access to the project and the `project:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Project background removed"
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/project/reorder": {
      "put": {
        "operationId": "reorderProjects",
        "tags": [
          "Projects"
        ],
        "summary": "Reorder projects",
        "description": "Sets the sidebar order of a workspace's projects. Positions in the body express relative order only: the listed projects fill the slots they held, in the requested order, projects left out (such as archived ones) keep their rank, and the whole workspace is renumbered from 0. Returns every project in the workspace that the caller can access, archived ones included, in the new order and without statistics. Requires the `project:update` workspace permission and access to every listed project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace whose projects are reordered.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace whose projects are reordered.",
            "name": "workspaceId",
            "in": "query"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projects": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of a project in the workspace.",
                          "example": "cef5d6uaajgxwpe38vkp4khl"
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Requested position of the project, a non-negative integer. Only the order relative to the other listed projects matters; stored positions are renumbered by the server.",
                          "example": 0
                        }
                      },
                      "required": [
                        "id",
                        "position"
                      ]
                    },
                    "minItems": 1,
                    "description": "Projects to reorder, at least one, each listed once. Projects left out, such as archived ones, keep their current rank, and the listed projects fill the remaining slots in the requested order."
                  }
                },
                "required": [
                  "projects"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reordered projects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Project"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, duplicate project IDs, a project from another workspace, or workspace ID could not be determined",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing `project:update` permission, or no access to a listed project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/project/{id}/archive": {
      "put": {
        "operationId": "archiveProject",
        "tags": [
          "Projects"
        ],
        "summary": "Archive project",
        "description": "Archives a project by setting `archivedAt` to the current time. Archived projects are left out of the default project list but keep all their data, and their key stays reserved in the workspace. Archiving an archived project resets `archivedAt`. Reverse it with the unarchive endpoint. Requires access to the project and the `project:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The archived project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/project/{id}/unarchive": {
      "put": {
        "operationId": "unarchiveProject",
        "tags": [
          "Projects"
        ],
        "summary": "Unarchive project",
        "description": "Unarchives a project by clearing `archivedAt`, which returns it to the default project list. Fails when another project in the workspace now uses the same key. Requires access to the project and the `project:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another project in the workspace uses this project's key; change one of the keys first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/project/{id}/background-upload": {
      "put": {
        "operationId": "uploadProjectBackground",
        "tags": [
          "Projects"
        ],
        "summary": "Prepare project background upload",
        "description": "Starts a background image upload. Returns a presigned URL for uploading the image straight to storage with PUT, plus the key and version to pass to the finalize endpoint. The URL expires after 300 seconds by default. The project does not change until the upload is finalized. Requires access to the project, the `project:update` workspace permission and, when billing is enabled, an active plan.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contentType": {
                    "type": "string",
                    "description": "MIME type of the image, matched case-insensitively: `image/apng`, `image/avif`, `image/gif`, `image/heic`, `image/heif`, `image/jpeg`, `image/jpg`, `image/png` or `image/webp`.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "number",
                    "description": "Size of the image in bytes. Must be greater than zero and no larger than the server's image upload limit, 10 MiB by default.",
                    "example": 482133
                  }
                },
                "required": [
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Background image upload URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectBackgroundUpload"
                }
              }
            }
          },
          "400": {
            "description": "Missing or unsupported image content type, or a size that is not positive or exceeds the upload limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "402": {
            "description": "The workspace's plan has expired (only when billing is enabled)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing `project:update` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "503": {
            "description": "Image storage is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/project/{id}/background-upload/finalize": {
      "post": {
        "operationId": "finalizeProjectBackgroundUpload",
        "tags": [
          "Projects"
        ],
        "summary": "Finalize project background upload",
        "description": "Sets an uploaded image as the project's board background and returns its API URL. The key must be the one issued for this project and version. The previous background image, if any, is deleted from storage. Publishes a `project.updated` event. Requires access to the project, the `project:update` workspace permission and, when billing is enabled, an active plan.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Storage key returned by the upload request. It must belong to this project and end with the given `version`.",
                    "example": "workspace/cfklow33tpuxgpxko9nxqllg/project/cef5d6uaajgxwpe38vkp4khl/backgrounds/background-tz4a98xxat96iws9zmbrgj3a"
                  },
                  "contentType": {
                    "type": "string",
                    "description": "MIME type of the uploaded image, as sent to the upload request. Stored with the background and used when the image is served.",
                    "example": "image/png"
                  },
                  "version": {
                    "type": "string",
                    "description": "Version returned by the upload request. Becomes the project's `backgroundVersion`.",
                    "example": "tz4a98xxat96iws9zmbrgj3a"
                  },
                  "size": {
                    "type": "number",
                    "description": "Size of the uploaded image in bytes, as sent to the upload request.",
                    "example": 482133
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "version",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Finalized project background",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectBackgroundFinalize"
                }
              }
            }
          },
          "400": {
            "description": "Unsupported content type, invalid size, or a key that does not match the project and version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "402": {
            "description": "The workspace's plan has expired (only when billing is enabled)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing `project:update` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "500": {
            "description": "Failed to save the project background",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/calendar-feed/project/{projectId}": {
      "get": {
        "operationId": "listCalendarFeeds",
        "tags": [
          "Calendar feeds"
        ],
        "summary": "List project calendar feeds",
        "description": "Lists a project's calendar feeds, oldest first, including their secret tokens. The response must not be cached. Requires access to the project and the `project:share` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Calendar feeds",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CalendarFeed"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing `project:share` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createCalendarFeed",
        "tags": [
          "Calendar feeds"
        ],
        "summary": "Create a calendar feed",
        "description": "Creates a secret calendar feed for a project and returns it with its token. The feed includes the project's tasks that have a start or due date and, when labels are selected, a label with the same name as any selected label. All-day dates use the supplied time zone. A selected task label without a matching workspace label gets one created, which also requires the `label:create` workspace permission. Requires access to the project and the `project:share` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "labelIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "maxItems": 100,
                    "default": [],
                    "description": "IDs of up to 100 labels in the project's workspace, either workspace labels or labels on tasks. The feed includes tasks that have a label with the same name as any selected label. Labels on tasks are resolved to the workspace label with that name, which is created when missing if the caller has the `label:create` workspace permission. Labels being deleted are rejected. Omit or leave empty to include every scheduled task in the project.",
                    "example": [
                      "xmsumno675r2a71rrcz68pin"
                    ]
                  },
                  "timeZone": {
                    "type": "string",
                    "default": "UTC",
                    "description": "IANA time zone, such as `Europe/Berlin`, used to turn task dates into the calendar days of all-day events.",
                    "example": "America/New_York"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Calendar feed created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarFeed"
                }
              }
            }
          },
          "400": {
            "description": "Invalid time zone, more than 100 labels, or labels that are not in the workspace or are being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing `project:share` permission, or missing `label:create` permission for a new workspace label",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/calendar-feed/project/{projectId}/{id}": {
      "delete": {
        "operationId": "revokeCalendarFeed",
        "tags": [
          "Calendar feeds"
        ],
        "summary": "Revoke a calendar feed",
        "description": "Revokes a calendar feed by deleting it, so its link stops working immediately. Requires access to the project and the `project:share` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the calendar feed.",
              "example": "a1r8s4knxim5waz846getzip"
            },
            "required": true,
            "description": "ID of the calendar feed.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Calendar feed revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Always true when the feed was revoked.",
                      "example": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing `project:share` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project or calendar feed not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/{id}/description": {
      "get": {
        "operationId": "getTaskDescriptionPage",
        "tags": [
          "Tasks"
        ],
        "summary": "Read a description page",
        "description": "Returns one page of a task's description: up to 32,768 Unicode characters starting at `offset`. Use it to read descriptions that task lists omit. Start at offset 0, then request each `nextOffset` with the `version` from the first page; if the task changes in between, the request fails with 409 and reading must restart from offset 0. Requires access to the task's project and the `task:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2000000000,
              "default": 0,
              "description": "Character offset to start reading from, counted in Unicode characters. Start at 0, then pass the previous page's `nextOffset`.",
              "example": 0
            },
            "required": false,
            "description": "Character offset to start reading from, counted in Unicode characters. Start at 0, then pass the previous page's `nextOffset`.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,10}$",
              "description": "Version returned by the first page. Pass it on later pages; if the task was changed since, the request fails with 409.",
              "example": "48213"
            },
            "required": false,
            "description": "Version returned by the first page. Pass it on later pages; if the task was changed since, the request fails with 409.",
            "name": "version",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Description page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDescriptionPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid offset or version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Description changed; reload from offset zero",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "503": {
            "description": "Description request took too long; retry later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/task/description-matches/{projectId}": {
      "get": {
        "operationId": "findDeferredTaskDescriptions",
        "tags": [
          "Tasks"
        ],
        "summary": "Search descriptions omitted from task lists",
        "description": "Lists the IDs of a project's tasks whose description is above 64 KiB, and so omitted from task lists, and contains `query`, ignoring case. Use it to include those tasks in a text search over a loaded board. Results are sorted by task ID, 100 per page; pass `nextCursor` as `after` for the next page. Requires access to the project and the `task:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Text to find in the omitted descriptions, matched as a case-insensitive substring after trimming.",
              "example": "redirect"
            },
            "required": true,
            "description": "Text to find in the omitted descriptions, matched as a case-insensitive substring after trimming.",
            "name": "query",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "Cursor from the previous page's `nextCursor`. Omit for the first page.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": false,
            "description": "Cursor from the previous page's `nextCursor`. Omit for the first page.",
            "name": "after",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching task IDs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDescriptionMatches"
                }
              }
            }
          },
          "400": {
            "description": "Invalid search query or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "503": {
            "description": "Description search took too long; retry later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/task/assigned": {
      "get": {
        "operationId": "listAssignedTasks",
        "tags": [
          "Tasks"
        ],
        "summary": "List my assigned tasks",
        "description": "Lists the open tasks assigned to the caller across a workspace's active projects. Tasks in a final column and archived tasks are excluded. Ordered by due date (undated last), then priority (highest first). At most 100 tasks are returned; `total` counts all of them. Set `countOnly=true` to return just that total without loading task rows or labels. Requires the `project:read` and `task:read` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the workspace to list the caller's tasks from.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace to list the caller's tasks from.",
            "name": "workspaceId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "Return only the total, with an empty tasks array, without loading task rows or labels. Defaults to `false`.",
              "example": "false"
            },
            "required": false,
            "description": "Return only the total, with an empty tasks array, without loading task rows or labels. Defaults to `false`.",
            "name": "countOnly",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Open tasks assigned to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssignedTasks"
                }
              }
            }
          },
          "400": {
            "description": "Invalid workspace ID or query parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing project:read or task:read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/tasks/{projectId}": {
      "get": {
        "operationId": "listTasks",
        "tags": [
          "Tasks"
        ],
        "summary": "List tasks",
        "description": "Returns a project's board: its columns, each with the tasks in it, plus the archived and planned buckets. Responses always contain at most 100 tasks (50 by default). Continue through pagination.totalPages for the whole board, and for each task page follow relatedPage through pagination.relatedTotalPages for all labels, links and column metadata. Filters and sorting apply before pagination. Descriptions larger than 64 KiB are omitted with descriptionDeferred=true; read the task detail or description pages for full text. Requires access to the project and the `project:read` and `task:read` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tasks whose status equals this column slug, or `planned` or `archived`.",
              "example": "in-progress"
            },
            "required": false,
            "description": "Only tasks whose status equals this column slug, or `planned` or `archived`.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tasks with this priority: `no-priority`, `low`, `medium`, `high` or `urgent`.",
              "example": "high"
            },
            "required": false,
            "description": "Only tasks with this priority: `no-priority`, `low`, `medium`, `high` or `urgent`.",
            "name": "priority",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tasks assigned to the user with this ID.",
              "example": "vpptt8t3d7ft91y45poatb3p"
            },
            "required": false,
            "description": "Only tasks assigned to the user with this ID.",
            "name": "assigneeId",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "description": "Page of tasks to return, starting at 1. Defaults to 1.",
              "example": 1
            },
            "required": false,
            "description": "Page of tasks to return, starting at 1. Defaults to 1.",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "description": "Page of related rows (labels, external links and columns) to return for the selected task page, starting at 1. Each related page holds up to 100 rows of each kind. Defaults to 1.",
              "example": 1
            },
            "required": false,
            "description": "Page of related rows (labels, external links and columns) to return for the selected task page, starting at 1. Each related page holds up to 100 rows of each kind. Defaults to 1.",
            "name": "relatedPage",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Number of tasks per page, from 1 to 100. Defaults to 50.",
              "example": 50
            },
            "required": false,
            "description": "Number of tasks per page, from 1 to 100. Defaults to 50.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "priority",
                "dueDate",
                "position",
                "title",
                "number"
              ],
              "description": "Field to sort tasks by. `priority` sorts by rank (`no-priority` lowest, `urgent` highest); `position` is the order within a column. Ties are broken by task ID. Defaults to `position`.",
              "example": "position"
            },
            "required": false,
            "description": "Field to sort tasks by. `priority` sorts by rank (`no-priority` lowest, `urgent` highest); `position` is the order within a column. Ties are broken by task ID. Defaults to `position`.",
            "name": "sortBy",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Sort direction. Defaults to `asc`.",
              "example": "asc"
            },
            "required": false,
            "description": "Sort direction. Defaults to `asc`.",
            "name": "sortOrder",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tasks due at or before this date, as an ISO 8601 date or date-time. Tasks without a due date are excluded.",
              "example": "2026-12-31T23:59:59Z"
            },
            "required": false,
            "description": "Only tasks due at or before this date, as an ISO 8601 date or date-time. Tasks without a due date are excluded.",
            "name": "dueBefore",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tasks due at or after this date, as an ISO 8601 date or date-time. Tasks without a due date are excluded.",
              "example": "2026-12-01T00:00:00Z"
            },
            "required": false,
            "description": "Only tasks due at or after this date, as an ISO 8601 date or date-time. Tasks without a due date are excluded.",
            "name": "dueAfter",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The project board",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BoardResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "503": {
            "description": "Task list request took too long; retry later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/task/bulk": {
      "patch": {
        "operationId": "bulkUpdateTasks",
        "tags": [
          "Tasks"
        ],
        "summary": "Bulk update tasks",
        "description": "Applies one operation to many tasks at once. Every task must be in the same workspace, and the caller must be a member of it and able to access the tasks' projects. The permission depends on `operation`: `task:update` for status, priority and due date, `task:assign` for `updateAssignee`, `task:delete` for `delete`, and `label:update` for `addLabel` and `removeLabel`. Changes are applied together or not at all. Publishes the matching event for each changed task, such as `task.status_changed`, `task.priority_changed`, `task.deleted` or `task.label_assigned`. Returns 402 when the workspace's plan has expired, except for `delete`, `addLabel` and `removeLabel`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "description": "IDs of the tasks to change. All must be in one workspace.",
                    "example": [
                      "bkh59p9dpz3efjy7e59v55jd",
                      "p15q5mwm4dm31qgfyrygj35y"
                    ]
                  },
                  "operation": {
                    "type": "string",
                    "enum": [
                      "updateStatus",
                      "updatePriority",
                      "updateAssignee",
                      "delete",
                      "addLabel",
                      "removeLabel",
                      "updateDueDate"
                    ],
                    "description": "Change to apply to every task. `updateStatus` moves the tasks to the column slug in `value` (task:update). `updatePriority` sets the priority in `value` (task:update). `updateAssignee` assigns the user ID in `value`, or unassigns when it is null or empty (task:assign). `delete` permanently deletes the tasks (task:delete). `addLabel` puts a copy of the label whose ID is in `value` on each task (label:update). `removeLabel` removes labels with that label's name from the tasks (label:update). `updateDueDate` sets the date in `value`, or clears it when null or omitted (task:update).",
                    "example": "updatePriority"
                  },
                  "value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The new value for the chosen operation. Required except for `delete` and `updateDueDate`. Unused by `delete`; null clears an assignee or due date.",
                    "example": "high"
                  }
                },
                "required": [
                  "taskIds",
                  "operation"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk operation result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkTaskResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, missing `value` for an operation that needs one, invalid status or priority, or the tasks span more than one workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, not a workspace member, missing the permission the operation needs, or the assignee cannot be assigned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "None of the tasks exist, or the label was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Tasks changed projects or labels changed concurrently; retry the operation. If a label is being deleted, finish its deletion before assigning it again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/draft-upload/{projectId}": {
      "post": {
        "operationId": "stageTaskAssetUpload",
        "tags": [
          "Tasks"
        ],
        "summary": "Stage a task attachment",
        "description": "Returns a presigned URL for uploading a file for a task that does not exist yet, such as an image pasted into a new task's description. PUT the bytes to `uploadUrl`, call the finalize route, then pass the asset ID in `draftAssetIds` when creating the task. Staged assets are private to the uploader and expire after 24 hours if no task claims them. Requires the `task:create` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "description": "Original file name. Its extension is kept in the stored object key.",
                    "example": "screenshot.png"
                  },
                  "contentType": {
                    "type": "string",
                    "description": "MIME type of the file. Must not be empty and must match the uploaded object. `image/apng`, `image/avif`, `image/gif`, `image/heic`, `image/heif`, `image/jpeg`, `image/jpg`, `image/png` and `image/webp` are stored as images; any other type is stored as an attachment.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "number",
                    "description": "Size of the file in bytes: a positive integer no larger than the server's upload limit (10 MiB by default). Must match the uploaded object.",
                    "example": 482133
                  },
                  "surface": {
                    "type": "string",
                    "enum": [
                      "description"
                    ],
                    "description": "Always `description`: staged images are for a task description."
                  }
                },
                "required": [
                  "filename",
                  "contentType",
                  "size",
                  "surface"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presigned upload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskImageUpload"
                }
              }
            }
          },
          "400": {
            "description": "Missing content type, or a size that is not a positive integer or is above the upload limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing task:create permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "503": {
            "description": "Image uploads are not configured on this instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/task/draft-upload/{projectId}/finalize": {
      "post": {
        "operationId": "finalizeStagedTaskAsset",
        "tags": [
          "Tasks"
        ],
        "summary": "Finalize a staged task attachment",
        "description": "Confirms a staged upload after its bytes were PUT to the presigned URL, checks the stored object's type and size, and returns the asset ID to pass in `draftAssetIds` when creating the task. Only the user who staged the upload can finalize it. Requires the `task:create` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "The key returned when the URL was issued.",
                    "example": "workspace/cfklow33tpuxgpxko9nxqllg/project/cef5d6uaajgxwpe38vkp4khl/task/bkh59p9dpz3efjy7e59v55jd/descriptions/screenshot-1764583200000-yodwh0iimi26g59fib7eqzer.png"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Original file name. Its extension is kept in the stored object key.",
                    "example": "screenshot.png"
                  },
                  "contentType": {
                    "type": "string",
                    "description": "MIME type of the file. Must not be empty and must match the uploaded object. `image/apng`, `image/avif`, `image/gif`, `image/heic`, `image/heif`, `image/jpeg`, `image/jpg`, `image/png` and `image/webp` are stored as images; any other type is stored as an attachment.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "number",
                    "description": "Size of the file in bytes: a positive integer no larger than the server's upload limit (10 MiB by default). Must match the uploaded object.",
                    "example": 482133
                  },
                  "surface": {
                    "type": "string",
                    "enum": [
                      "description"
                    ],
                    "description": "Always `description`: staged images are for a task description."
                  }
                },
                "required": [
                  "key",
                  "filename",
                  "contentType",
                  "size",
                  "surface"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Staged attachment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskImageAsset"
                }
              }
            }
          },
          "400": {
            "description": "Invalid upload, or the stored object does not match the declared type or size",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing task:create permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The upload was not staged by the caller in this project, or is already attached to a task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "503": {
            "description": "The stored object could not be verified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/task/reorder": {
      "post": {
        "operationId": "reorderTasks",
        "tags": [
          "Tasks"
        ],
        "summary": "Reorder or move cards",
        "description": "Atomically updates positions, and optionally columns, for cards in one project. Other task fields are preserved. Send `expectedTasks` with the complete previous contents of the affected columns to get 409 instead of overwriting a concurrent change. Publishes `tasks.reordered`, plus `task.status_changed` for each card that changed column. Requires the `task:update` workspace permission. Returns 402 when the workspace's plan has expired.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "description": "ID of the project whose cards are reordered.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  },
                  "expectedTasks": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of a task in an affected column.",
                          "example": "bkh59p9dpz3efjy7e59v55jd"
                        },
                        "position": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": -2147483648,
                          "maximum": 2147483647,
                          "description": "Position the caller last saw for this task.",
                          "example": 2
                        },
                        "status": {
                          "type": "string",
                          "description": "Column slug the caller last saw for this task.",
                          "example": "to-do"
                        }
                      },
                      "required": [
                        "id",
                        "position",
                        "status"
                      ]
                    },
                    "description": "Previous complete contents of the affected columns; stale snapshots return 409"
                  },
                  "tasks": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of a task in the project.",
                          "example": "bkh59p9dpz3efjy7e59v55jd"
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483646,
                          "description": "New position within the column, ascending.",
                          "example": 1
                        },
                        "status": {
                          "type": "string",
                          "description": "Column slug to move the task to, or `planned` or `archived`. Omit to keep its column.",
                          "example": "in-progress"
                        }
                      },
                      "required": [
                        "id",
                        "position"
                      ]
                    },
                    "minItems": 1,
                    "description": "New position, and optionally column, for each card. Task IDs must be unique."
                  }
                },
                "required": [
                  "projectId",
                  "tasks"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated card positions and statuses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "ID of the task.",
                        "example": "bkh59p9dpz3efjy7e59v55jd"
                      },
                      "position": {
                        "type": "number",
                        "description": "Saved position within the column.",
                        "example": 1
                      },
                      "status": {
                        "type": "string",
                        "description": "Saved column slug of the task.",
                        "example": "in-progress"
                      }
                    },
                    "required": [
                      "id",
                      "position",
                      "status"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Duplicate task IDs, a position out of range, or a status that is not a column of the project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or tasks do not belong to the project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Board changed or task moved; refresh before reordering",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/{projectId}": {
      "post": {
        "operationId": "createTask",
        "tags": [
          "Tasks"
        ],
        "summary": "Create task",
        "description": "Creates a task in a project. It gets the project's next ticket number and is placed at the end of the column named by `status`. Required custom fields must have a value or a default, and an assignee must be able to access the project. Staged images listed in `draftAssetIds` and referenced in the description are attached to the task. Publishes `task.created`. Requires access to the project and the `task:create` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title of the task.",
                    "example": "Fix login redirect loop"
                  },
                  "description": {
                    "type": "string",
                    "description": "Description in Markdown. Mentions are `<kaneo-mention>` tags and images link to `/api/asset/{id}`. Send an empty string for no description.",
                    "example": "Users are sent back to the login page after signing in."
                  },
                  "startDate": {
                    "type": "string",
                    "description": "Start date as an ISO 8601 date or date-time. Omit for no start date. Must not be after `dueDate`.",
                    "example": "2026-12-01T09:00:00Z"
                  },
                  "dueDate": {
                    "type": "string",
                    "description": "Due date as an ISO 8601 date or date-time. Omit for no due date.",
                    "example": "2026-12-15T17:00:00Z"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "no-priority",
                      "low",
                      "medium",
                      "high",
                      "urgent"
                    ],
                    "description": "Priority of the task: `no-priority`, `low`, `medium`, `high` or `urgent`.",
                    "example": "high"
                  },
                  "status": {
                    "type": "string",
                    "description": "The target column's slug, or `planned` or `archived`. An empty string falls back to `to-do`. The task is added at the end of that column.",
                    "example": "to-do"
                  },
                  "userId": {
                    "type": "string",
                    "description": "ID of the assignee, if any. The user must be a workspace member with access to the project.",
                    "example": "vpptt8t3d7ft91y45poatb3p"
                  },
                  "recurrence": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/TaskRecurrence"
                      },
                      {
                        "description": "Omit to create a task that does not repeat."
                      }
                    ]
                  },
                  "draftAssetIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 100,
                    "description": "IDs of attachments staged by the caller in this project with the draft upload routes. Only assets referenced in `description` are attached to the new task.",
                    "example": [
                      "yodwh0iimi26g59fib7eqzer"
                    ]
                  },
                  "customFields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "fieldId": {
                          "type": "string",
                          "description": "ID of a custom field defined on the task's project.",
                          "example": "ga74wz2otc2lghrx19chi8ni"
                        },
                        "value": {
                          "type": "string",
                          "description": "Value as a string, in the field type's format: a number such as `42`, `true` or `false`, a date as `YYYY-MM-DD` or ISO 8601, one dropdown option, or a JSON array of multiselect options. An empty string leaves the field unset.",
                          "example": "42"
                        }
                      },
                      "required": [
                        "fieldId",
                        "value"
                      ]
                    },
                    "description": "Custom field values for the new task. If a field appears more than once, the last value wins. Required fields without a value use their default value, or the request fails."
                  }
                },
                "required": [
                  "title",
                  "description",
                  "priority",
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body or date, start date after due date, unknown status, a custom field value that is missing, hidden or invalid, unavailable staged uploads, or a repeating task in a final column",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing task:create permission, or the assignee is not a workspace member or cannot access the project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/duplicate/{id}": {
      "post": {
        "operationId": "duplicateTask",
        "tags": [
          "Tasks"
        ],
        "summary": "Duplicate a task",
        "description": "Creates a copy of a task in the same project and column, placed at the end of the column with the project's next ticket number. The copy keeps the description (with its attachments copied in storage), priority, dates, assignee, custom field values and labels, and stays a subtask of the same parent tasks in projects the caller can access. Comments, time entries, subtasks and the repeat rule are not copied. An assignee who can no longer access the project is dropped, and required custom fields without a value take their current default. Publishes `task.created`, plus `task-relation.created` for each copied parent link. Requires access to the task's project and the `task:create` workspace permission, plus `task:update` when there are parent links to copy. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title for the copy. Omitted or blank keeps the original task's title.",
                    "example": "Fix login redirect loop (copy)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The duplicated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, the task's status is no longer valid in the project, or a required custom field has no value or default",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing task:create, missing task:update when copying parent links, or the assignee is no longer a workspace member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task or project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Task column has reached its capacity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "503": {
            "description": "The task's attachments could not be copied in storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/task/by-ticket-id/{ticketId}": {
      "get": {
        "operationId": "getTaskByTicketId",
        "tags": [
          "Tasks"
        ],
        "summary": "Get task by ticket ID",
        "description": "Returns a task by its ticket ID, such as KAN-12: the project key, matched case-insensitively, and the task number. Only tasks in active workspaces where the caller holds the `task:read` permission (within the API key's scope, when one is used) and in projects the caller can access are considered. A match in an active project takes precedence, then the most recently archived project. If the ticket ID still matches more than one accessible task, narrow the lookup to a workspace with `workspaceId` or `workspaceSlug`, or to a single project with `projectId`. The response is the task's detail view plus the workspace that owns it.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "maxLength": 128,
              "description": "Ticket ID: the project's key (its slug), a hyphen and the task number, e.g. KAN-12. The key is matched case-insensitively.",
              "example": "KAN-12"
            },
            "required": true,
            "description": "Ticket ID: the project's key (its slug), a hyphen and the task number, e.g. KAN-12. The key is matched case-insensitively.",
            "name": "ticketId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Select a workspace if the ticket ID exists in more than one.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": false,
            "description": "Select a workspace if the ticket ID exists in more than one.",
            "name": "workspaceId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "description": "Select a workspace by its slug instead of its ID. Matched case-insensitively, with an exact-case match preferred.",
              "example": "acme"
            },
            "required": false,
            "description": "Select a workspace by its slug instead of its ID. Matched case-insensitively, with an exact-case match preferred.",
            "name": "workspaceSlug",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Select a project if the ticket ID exists more than once.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": false,
            "description": "Select a project if the ticket ID exists more than once.",
            "name": "projectId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Task details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskByTicketId"
                }
              }
            }
          },
          "400": {
            "description": "Invalid ticket ID, or a task number outside 1 to 2147483647",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No accessible task has this ticket ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Ticket ID matches multiple accessible tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/{id}": {
      "get": {
        "operationId": "getTask",
        "tags": [
          "Tasks"
        ],
        "summary": "Get task",
        "description": "Returns a task by ID with its assignee's name, column and workspace. With `view=board` it returns the compact card instead: a description above 64 KiB is omitted with `descriptionDeferred` set, `workspaceId` is left out, and the task's subtask progress and that of its parents in the same project are added. Requires access to the task's project and the `task:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "detail",
                "board"
              ],
              "description": "Response shape. `detail` (the default) returns the full description and `workspaceId`; `board` omits descriptions above 64 KiB and adds `subtaskCounts` and `parentSubtaskCounts`.",
              "example": "detail"
            },
            "required": false,
            "description": "Response shape. `detail` (the default) returns the full description and `workspaceId`; `board` omits descriptions above 64 KiB and adds `subtaskCounts` and `parentSubtaskCounts`.",
            "name": "view",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Task details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskWithAssignee"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateTask",
        "tags": [
          "Tasks"
        ],
        "summary": "Update task",
        "description": "Replaces a task's title, status, dates, priority, position and assignee, and its description when one is sent. Omitted dates are cleared and an omitted `userId` unassigns the task. `projectId` must be the task's current project; use the move route to change projects. Records a title change in the task's activity, resets due-date reminders when the due date changes, notifies users newly mentioned in the description, and publishes `task.updated` plus an event for each changed field, such as `task.status_changed`, `task.title_changed`, `task.priority_changed`, `task.assignee_changed`, `task.unassigned`, `task.due_date_changed` or `task.description_changed`. Moving a repeating task into a final column creates its next occurrence. A returned description above 64 KiB is null with `descriptionDeferred` set. Use the single-field routes or PATCH for narrower edits. Requires access to the task's project and the `task:update` workspace permission, plus `task:assign` when the assignee changes. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title of the task.",
                    "example": "Fix login redirect loop"
                  },
                  "description": {
                    "type": "string",
                    "description": "Omit to preserve the existing description when updating a list summary.",
                    "example": "Users are sent back to the login page after signing in."
                  },
                  "startDate": {
                    "type": "string",
                    "description": "Start date as an ISO 8601 date or date-time. Omit to clear the start date.",
                    "example": "2026-12-01T09:00:00Z"
                  },
                  "dueDate": {
                    "type": "string",
                    "description": "Due date as an ISO 8601 date or date-time. Omit to clear the due date.",
                    "example": "2026-12-15T17:00:00Z"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "no-priority",
                      "low",
                      "medium",
                      "high",
                      "urgent"
                    ],
                    "description": "Priority of the task: `no-priority`, `low`, `medium`, `high` or `urgent`.",
                    "example": "high"
                  },
                  "status": {
                    "type": "string",
                    "description": "Column slug for the task, or `planned` or `archived`. Must belong to the task's project.",
                    "example": "in-progress"
                  },
                  "projectId": {
                    "type": "string",
                    "description": "ID of the task's current project. Use the move route to change projects.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483646,
                    "description": "Order of the task within its column, ascending.",
                    "example": 3
                  },
                  "userId": {
                    "type": "string",
                    "description": "ID of the assignee. Omit to unassign the task. Changing the assignee requires task:assign.",
                    "example": "vpptt8t3d7ft91y45poatb3p"
                  }
                },
                "required": [
                  "title",
                  "priority",
                  "status",
                  "projectId",
                  "position"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body or date, start date after due date, unknown status, a position out of range, or `projectId` is not the task's project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing task:update or task:assign permission, or the assignee is not a workspace member or cannot access the project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "patchTask",
        "tags": [
          "Tasks"
        ],
        "summary": "Update selected task fields",
        "description": "Updates only the fields sent, applying them together; omitted fields keep their values. Send null to clear the description, a date or the assignee. At least one field is required, and the start date must not end up after the due date. Records a title change in the task's activity, resets due-date reminders when the due date changes, notifies users newly mentioned in the description, and publishes `task.updated` plus an event for each changed field, such as `task.status_changed` or `task.assignee_changed`. Moving a repeating task into a final column creates its next occurrence. Requires access to the task's project and the `task:update` workspace permission, plus `task:assign` whenever `userId` is sent. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title of the task.",
                    "example": "Fix login redirect loop"
                  },
                  "status": {
                    "type": "string",
                    "description": "Column slug for the task, or `planned` or `archived`. Must belong to the task's project.",
                    "example": "in-progress"
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "no-priority",
                      "low",
                      "medium",
                      "high",
                      "urgent"
                    ],
                    "description": "Priority of the task: `no-priority`, `low`, `medium`, `high` or `urgent`.",
                    "example": "high"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Description in Markdown. Null clears it.",
                    "example": "Users are sent back to the login page after signing in."
                  },
                  "startDate": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Start date as an ISO 8601 date or date-time. Null clears it. Must not be after the due date.",
                    "example": "2026-12-01T09:00:00Z"
                  },
                  "dueDate": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Due date as an ISO 8601 date or date-time. Null clears it.",
                    "example": "2026-12-15T17:00:00Z"
                  },
                  "userId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ID of the assignee. Null or an empty string unassigns. Requires task:assign.",
                    "example": "vpptt8t3d7ft91y45poatb3p"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, no fields sent, an invalid date, start date after due date, or unknown status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No project access, missing task:update or task:assign permission, or the assignee is not a workspace member or cannot access the project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Task changed projects; retry the update",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteTask",
        "tags": [
          "Tasks"
        ],
        "summary": "Delete task",
        "description": "Permanently deletes a task with its comments, activity, labels, time entries, external links, custom field values and relations, and queues its stored attachments for removal. Its subtasks are kept; only the links to them are removed. Returns the task as it was before deletion. Publishes `task.deleted`, plus `task-relation.deleted` for each relation the task had. Requires access to the task's project and the `task:delete` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:delete permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Task changed projects; retry the operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/move/{id}": {
      "put": {
        "operationId": "moveTask",
        "tags": [
          "Tasks"
        ],
        "summary": "Move task",
        "description": "Moves a task to another project in the same workspace. The task gets the destination project's next ticket number and goes to the end of the column named by `destinationStatus`, else the column with the slug of its current status, else the first column. An assignee who cannot access the destination project is unassigned, links from integrations not connected to the destination project are removed, and the task's attachments move with it. Moving a repeating task into a final column creates its next occurrence. Publishes `task.moved`. Requires access to both projects and the `task:update` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "destinationProjectId": {
                    "type": "string",
                    "description": "ID of the project to move the task to, in the same workspace as its current project.",
                    "example": "p2c7m1q8r4t6w9y3z5a0b2d4"
                  },
                  "destinationStatus": {
                    "type": "string",
                    "description": "Column slug in the destination project. Defaults to the column with the task's current slug, or else the destination project's first column.",
                    "example": "to-do"
                  }
                },
                "required": [
                  "destinationProjectId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The moved task, with both project ids",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MoveTaskResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, the task is already in that project, the destination project has no columns, or `destinationStatus` is not one of its columns",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the source or destination project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found, or the destination project is not in the task's workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Task or project moved concurrently; retry the move",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/export/{projectId}": {
      "get": {
        "operationId": "exportTasks",
        "tags": [
          "Tasks"
        ],
        "summary": "Export tasks",
        "description": "Returns a project's tasks as a JSON document: the project's name, key and description, and every task, ordered by position, with its title, description, status, priority, dates, assignee ID and label names and colors. The `tasks` array can be sent to the import route. Requires access to the project and the `project:read` and `task:read` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The exported project and tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskExport"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/import/{projectId}": {
      "post": {
        "operationId": "importTasks",
        "tags": [
          "Tasks"
        ],
        "summary": "Import tasks",
        "description": "Creates tasks in a project from a list, such as the `tasks` of an export. Each task is created on its own at the end of its column with the project's next ticket number, so a partial import still returns 200 with a per-task outcome. A status is matched by column slug, then by column name; an unknown status becomes `planned` and an unknown priority `no-priority`, each with a warning. An assignee can be given by user ID or email and must be a workspace member with access to the project, otherwise that task fails. Labels are ignored. Publishes `task.created` for each created task. Requires access to the project and the `task:create` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tasks": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "Title of the task.",
                          "example": "Write release notes"
                        },
                        "description": {
                          "type": "string",
                          "description": "Description in Markdown. Defaults to empty.",
                          "example": "Cover the new board filters."
                        },
                        "status": {
                          "type": "string",
                          "description": "Column slug, current column name, or slugified current name. Unknown values map to planned with a warning; ambiguous names fail the task import.",
                          "example": "to-do"
                        },
                        "priority": {
                          "type": "string",
                          "description": "Priority: `no-priority`, `low`, `medium`, `high` or `urgent`. Defaults to `low`; unknown values map to `no-priority` with a warning.",
                          "example": "medium"
                        },
                        "startDate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Start date as an ISO 8601 date or date-time. Null or omitted means none.",
                          "example": "2026-12-01"
                        },
                        "dueDate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Due date as an ISO 8601 date or date-time. Null or omitted means none.",
                          "example": "2026-12-15"
                        },
                        "userId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Assignable user's ID or email address. Emails match case-insensitively. Null, empty, or omitted leaves the task unassigned.",
                          "example": "ana@example.com"
                        }
                      },
                      "required": [
                        "title",
                        "status"
                      ]
                    },
                    "description": "Tasks to create, in order. Each is created on its own, so one failure does not undo the others."
                  }
                },
                "required": [
                  "tasks"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-task import outcome",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskImportResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:create permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/status/{id}": {
      "put": {
        "operationId": "updateTaskStatus",
        "tags": [
          "Tasks"
        ],
        "summary": "Update task status",
        "description": "Moves a task to another column of its project, or to `planned` or `archived`, keeping its position value. Publishes `task.status_changed` when the status changes. Moving a repeating task into a final column creates its next occurrence. Requires access to the task's project and the `task:update` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "Column slug to move the task to, or `planned` or `archived`. Must belong to the task's project.",
                    "example": "done"
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or a status that is not a column of the project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/priority/{id}": {
      "put": {
        "operationId": "updateTaskPriority",
        "tags": [
          "Tasks"
        ],
        "summary": "Update task priority",
        "description": "Sets a task's priority. Publishes `task.priority_changed` when it changes. Requires access to the task's project and the `task:update` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "priority": {
                    "type": "string",
                    "enum": [
                      "no-priority",
                      "low",
                      "medium",
                      "high",
                      "urgent"
                    ],
                    "description": "Priority of the task: `no-priority`, `low`, `medium`, `high` or `urgent`.",
                    "example": "high"
                  }
                },
                "required": [
                  "priority"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid priority",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/assignee/{id}": {
      "put": {
        "operationId": "updateTaskAssignee",
        "tags": [
          "Tasks"
        ],
        "summary": "Update task assignee",
        "description": "Assigns a task to a workspace member with access to the project, or unassigns it when `userId` is null or empty. Sending the current assignee changes nothing. Publishes `task.assignee_changed` or `task.unassigned` when the assignee changes. Requires access to the task's project and the `task:assign` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ID of the new assignee, who must be a workspace member with access to the project. Null or an empty string unassigns.",
                    "example": "vpptt8t3d7ft91y45poatb3p"
                  }
                },
                "required": [
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing task:assign permission, or the assignee is not a workspace member or cannot access the project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/due-date/{id}": {
      "put": {
        "operationId": "updateTaskDueDate",
        "tags": [
          "Tasks"
        ],
        "summary": "Update task due date",
        "description": "Sets or clears a task's due date. The due date must not be before the start date. When the date changes, the task's due-date reminders are reset and `task.due_date_changed` is published. Requires access to the task's project and the `task:update` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dueDate": {
                    "type": "string",
                    "description": "Due date as an ISO 8601 date or date-time. Omit or send an empty string to clear it.",
                    "example": "2026-12-15T17:00:00Z"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid date, or a due date before the start date",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/recurrence/{id}": {
      "put": {
        "operationId": "updateTaskRecurrence",
        "tags": [
          "Tasks"
        ],
        "summary": "Update task recurrence",
        "description": "Sets a task's repeat rule, or clears it with null. When a repeating task moves into a final column, the next task is created in the project's first open column with its dates moved forward one interval from the completed task's due date, and the rule moves to that new task. A completed task cannot start repeating: reopen it, or set the rule on its next task. Publishes `task.updated`. Requires access to the task's project and the `task:update` workspace permission, plus `task:create` when setting a rule. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "recurrence": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/TaskRecurrence"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Null stops the task from repeating."
                  }
                },
                "required": [
                  "recurrence"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid recurrence rule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing task:update, or missing task:create when setting a rule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The task is completed and no longer holds a rule; reopen it first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/title/{id}": {
      "put": {
        "operationId": "updateTaskTitle",
        "tags": [
          "Tasks"
        ],
        "summary": "Update task title",
        "description": "Renames a task. Records the change in the task's activity and publishes `task.title_changed`; sending the current title changes nothing. Requires access to the task's project and the `task:update` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "New title of the task.",
                    "example": "Fix login redirect loop"
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/image-upload/{id}": {
      "put": {
        "operationId": "createTaskImageUpload",
        "tags": [
          "Tasks"
        ],
        "summary": "Create image upload URL",
        "description": "Returns a presigned URL for uploading a file, such as an image, used in a task's description or in a comment on it. PUT the bytes to `uploadUrl` with the returned headers before it expires, then call the finalize route with the returned `key`. Requires access to the task's project and the `task:update` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "description": "Original file name. Its extension is kept in the stored object key.",
                    "example": "screenshot.png"
                  },
                  "contentType": {
                    "type": "string",
                    "description": "MIME type of the file. Must not be empty and must match the uploaded object. `image/apng`, `image/avif`, `image/gif`, `image/heic`, `image/heif`, `image/jpeg`, `image/jpg`, `image/png` and `image/webp` are stored as images; any other type is stored as an attachment.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "number",
                    "description": "Size of the file in bytes: a positive integer no larger than the server's upload limit (10 MiB by default). Must match the uploaded object.",
                    "example": 482133
                  },
                  "surface": {
                    "type": "string",
                    "enum": [
                      "description",
                      "comment"
                    ],
                    "description": "Where the file is used, which decides the folder it is stored in: `description` for the task description, `comment` for a comment on the task.",
                    "example": "description"
                  }
                },
                "required": [
                  "filename",
                  "contentType",
                  "size",
                  "surface"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The presigned upload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskImageUpload"
                }
              }
            }
          },
          "400": {
            "description": "Missing content type, or a size that is not a positive integer or is above the upload limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "503": {
            "description": "Image uploads are not configured on this instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/task/image-upload/{id}/finalize": {
      "post": {
        "operationId": "finalizeTaskImageUpload",
        "tags": [
          "Tasks"
        ],
        "summary": "Finalize image upload",
        "description": "Confirms an upload after its bytes were PUT to the presigned URL: checks that the stored object exists and matches the declared size and content type, records it as an asset of the task, and returns its ID and the URL to reference it by. Finalizing the same key again updates the existing asset. Requires access to the task's project and the `task:update` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "The key returned when the URL was issued.",
                    "example": "workspace/cfklow33tpuxgpxko9nxqllg/project/cef5d6uaajgxwpe38vkp4khl/task/bkh59p9dpz3efjy7e59v55jd/descriptions/screenshot-1764583200000-yodwh0iimi26g59fib7eqzer.png"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Original file name. Its extension is kept in the stored object key.",
                    "example": "screenshot.png"
                  },
                  "contentType": {
                    "type": "string",
                    "description": "MIME type of the file. Must not be empty and must match the uploaded object. `image/apng`, `image/avif`, `image/gif`, `image/heic`, `image/heif`, `image/jpeg`, `image/jpg`, `image/png` and `image/webp` are stored as images; any other type is stored as an attachment.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "number",
                    "description": "Size of the file in bytes: a positive integer no larger than the server's upload limit (10 MiB by default). Must match the uploaded object.",
                    "example": 482133
                  },
                  "surface": {
                    "type": "string",
                    "enum": [
                      "description",
                      "comment"
                    ],
                    "description": "Where the file is used, which decides the folder it is stored in: `description` for the task description, `comment` for a comment on the task.",
                    "example": "description"
                  }
                },
                "required": [
                  "key",
                  "filename",
                  "contentType",
                  "size",
                  "surface"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored asset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskImageAsset"
                }
              }
            }
          },
          "400": {
            "description": "Invalid upload, a key issued for another task or surface, or the stored object is missing or does not match the declared size and content type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task/description/{id}": {
      "put": {
        "operationId": "updateTaskDescription",
        "tags": [
          "Tasks"
        ],
        "summary": "Update task description",
        "description": "Replaces a task's description. When it changes, publishes `task.description_changed`, notifies users newly mentioned in it, and removes stored attachments that only the old text referenced. Requires access to the task's project and the `task:update` workspace permission. Returns 402 when the workspace's plan has expired.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "description": "New description in Markdown. Replaces the whole description; an empty string clears it.",
                    "example": "Users are sent back to the login page after signing in."
                  }
                },
                "required": [
                  "description"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/column/{projectId}": {
      "get": {
        "operationId": "getColumns",
        "tags": [
          "Columns"
        ],
        "summary": "List columns",
        "description": "Lists a project's board columns, ordered by position ascending. Requires access to the project and the `project:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List of columns ordered by position",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Column"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createColumn",
        "tags": [
          "Columns"
        ],
        "summary": "Create column",
        "description": "Adds a column at the end of a project's board. The slug is derived from the name, with a numeric suffix such as `-2` when another column in the project already uses it; the reserved slugs `planned` and `archived` are refused. Publishes a `project.updated` event. Requires access to the project and the `project:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Display name of the column. The column's slug is derived from it: Unicode NFKC normalized, lowercased, with each run of characters other than letters, marks and digits replaced by `-`, and a numeric suffix such as `-2` when another column in the project has the same slug. The name must contain at least one letter or digit, and must not produce `planned` or `archived`, which are reserved for virtual task statuses.",
                    "example": "QA Review"
                  },
                  "icon": {
                    "type": "string",
                    "description": "Icon name of the column, stored as given. The web app uses Lucide icon names such as `Circle`, `CircleDot`, `Search` or `CheckCircle2`. When omitted or empty, the column has no icon.",
                    "example": "Search"
                  },
                  "color": {
                    "type": "string",
                    "description": "Color of the column, stored as given. When omitted or empty, the column has no color."
                  },
                  "isFinal": {
                    "type": "boolean",
                    "description": "Whether tasks in this column count as completed. Defaults to false.",
                    "example": false
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created column",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Column"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or a name without any letter or digit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing `project:update` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The name produces the slug `planned` or `archived`, which are reserved for virtual task statuses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/column/reorder/{projectId}": {
      "put": {
        "operationId": "reorderColumns",
        "tags": [
          "Columns"
        ],
        "summary": "Reorder columns",
        "description": "Sets the positions of a project's columns in one transaction and returns all of the project's columns in their new order. Positions are stored as given. Publishes a `project.updated` event. Requires access to the project and the `project:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of a column in the project.",
                          "example": "m4e9zz9dn4huwwyxp542ewhm"
                        },
                        "position": {
                          "type": "number",
                          "description": "New position of the column on the board, ascending. Stored as given.",
                          "example": 0
                        }
                      },
                      "required": [
                        "id",
                        "position"
                      ]
                    },
                    "description": "Columns with their new positions. Each listed column gets the given position; columns left out keep theirs. A column from another project fails the whole request and nothing is changed."
                  }
                },
                "required": [
                  "columns"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reordered columns",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Column"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or a listed column does not belong to this project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/column/{id}": {
      "put": {
        "operationId": "updateColumn",
        "tags": [
          "Columns"
        ],
        "summary": "Update column",
        "description": "Updates a column's name, icon, color or final flag. Omitted fields are left unchanged; `icon` and `color` accept null to clear them. Renaming keeps the slug, so tasks keep their status. Changing `isFinal` publishes a `column.finality_changed` event and refreshes subtask progress on parent tasks; every update publishes `project.updated`. Requires access to the column's project and the `project:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the column.",
              "example": "m4e9zz9dn4huwwyxp542ewhm"
            },
            "required": true,
            "description": "ID of the column.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New display name of the column. The slug does not change, because tasks store it as their status. Omit to keep the current name.",
                    "example": "QA Review"
                  },
                  "icon": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Icon name of the column, stored as given, or null to remove the icon. Omit to keep the current icon.",
                    "example": "Search"
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Color of the column, stored as given, or null to remove the color. Omit to keep the current color."
                  },
                  "isFinal": {
                    "type": "boolean",
                    "description": "Whether tasks in this column count as completed. Omit to keep the current value. A change publishes a `column.finality_changed` event, and marking a column final makes repeating tasks in it create their next occurrence.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated column",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Column"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Column not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteColumn",
        "tags": [
          "Columns"
        ],
        "summary": "Delete column",
        "description": "Deletes a column that holds no tasks and returns it. Workflow rules that target the column are deleted with it. Publishes a `project.updated` event. Requires access to the column's project and the `project:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the column.",
              "example": "m4e9zz9dn4huwwyxp542ewhm"
            },
            "required": true,
            "description": "ID of the column.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted column",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Column"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Column not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The column still contains tasks; move or delete them first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/activity/workspace/{workspaceId}": {
      "get": {
        "operationId": "getWorkspaceActivities",
        "tags": [
          "Activity"
        ],
        "summary": "List recent workspace activity",
        "description": "Get the 20 most recent task events across a workspace's active projects from the last 30 days, newest first. Each event carries a short plain-text excerpt instead of its full content.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Recent activity in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkspaceActivity"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing project:read or task:read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/activity/{taskId}": {
      "get": {
        "operationId": "getActivities",
        "tags": [
          "Activity"
        ],
        "summary": "List task activity",
        "description": "Get a task's activity feed, newest first: comments alongside system events such as status and assignee changes. Set limit to request a bounded preview; omit it for the full feed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "taskId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "description": "Maximum number of recent activities to return, from 1 to 100. Omit it for the full feed.",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of recent activities to return, from 1 to 100. Omit it for the full feed.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "List of activities for the task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Activity"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/activity/create": {
      "post": {
        "operationId": "createActivity",
        "tags": [
          "Activity"
        ],
        "summary": "Create activity",
        "description": "Record a system-generated event on a task. Most events are written by the server itself; this exists for importers and integrations.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "description": "ID of the task the activity belongs to.",
                    "example": "bkh59p9dpz3efjy7e59v55jd"
                  },
                  "message": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Free-text body stored as the activity content. Null for events whose meaning is in eventData.",
                    "example": null
                  },
                  "type": {
                    "type": "string",
                    "description": "Event kind, such as `status_changed` or `assignee_changed`. `comment` is rejected; use the comment endpoints instead.",
                    "example": "status_changed"
                  },
                  "eventData": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": {},
                    "description": "Type-specific payload stored alongside the event. Omit it or send null for no payload.",
                    "example": {
                      "oldStatus": "to-do",
                      "newStatus": "in-progress"
                    }
                  }
                },
                "required": [
                  "taskId",
                  "message",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created activity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Activity"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or comment activity submitted through the generic endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/activity/comment": {
      "post": {
        "operationId": "createComment",
        "tags": [
          "Activity"
        ],
        "summary": "Create comment",
        "description": "Add a comment to a task. Equivalent to POST /comment/{taskId}, kept for the activity-feed client.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "description": "ID of the task to comment on.",
                    "example": "bkh59p9dpz3efjy7e59v55jd"
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "Comment body as produced by the editor, up to 10,000 characters. An @mention is a `<kaneo-mention id=\"…\">` tag holding the mentioned user's ID.",
                    "example": "Deployed to staging, ready for review."
                  }
                },
                "required": [
                  "taskId",
                  "comment"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Activity"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateComment",
        "tags": [
          "Activity"
        ],
        "summary": "Update comment",
        "description": "Replaces the body of a comment. Only the comment's author can edit it. Publishes a `comment.updated` event. Same behavior as PUT /comment/{id}. Requires the `task:update` workspace permission and access to the task's project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "activityId": {
                    "type": "string",
                    "description": "ID of the comment, which is the ID of its activity row.",
                    "example": "si3jh727m8v762jwwzngo8cn"
                  },
                  "comment": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "Comment body as produced by the editor, up to 10,000 characters. An @mention is a `<kaneo-mention id=\"…\">` tag holding the mentioned user's ID.",
                    "example": "Deployed to staging, ready for review."
                  }
                },
                "required": [
                  "activityId",
                  "comment"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Activity"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found, or the caller is not its author",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteComment",
        "tags": [
          "Activity"
        ],
        "summary": "Delete comment",
        "description": "Deletes a comment and returns it. Only the comment's author can delete it. Publishes a `comment.deleted` event. Same behavior as DELETE /comment/{id}. Requires the `task:update` workspace permission and access to the task's project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "activityId": {
                    "type": "string",
                    "description": "ID of the comment, which is the ID of its activity row.",
                    "example": "si3jh727m8v762jwwzngo8cn"
                  }
                },
                "required": [
                  "activityId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The deleted comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Activity"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found, or the caller is not its author",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/comment/{taskId}": {
      "get": {
        "operationId": "getTaskComments",
        "tags": [
          "Comments"
        ],
        "summary": "List task comments",
        "description": "Get every comment on a task, oldest first, each with its author's name and avatar.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "taskId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List of comments for the task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Comment"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createTaskComment",
        "tags": [
          "Comments"
        ],
        "summary": "Create task comment",
        "description": "Add a comment to a task. Mentions in the content notify the mentioned users, and the assignee is notified too. Returns the stored activity row, which carries no author object -- read the list route for that.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "taskId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Comment body as produced by the editor, 1 to 10,000 characters. An @mention is a `<kaneo-mention id=\"…\">` tag holding the mentioned user's ID.",
                    "example": "Deployed to staging, ready for review."
                  },
                  "externalUserName": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Display name of the original author of an imported comment, up to 120 characters. Used only together with externalSource and ignored on its own. Sending both requires the `workspace:manage_settings` permission.",
                    "example": "Grace Hopper"
                  },
                  "externalSource": {
                    "type": "string",
                    "enum": [
                      "planka",
                      "trello",
                      "jira",
                      "plane",
                      "linear",
                      "kaneo"
                    ],
                    "description": "Tool the comment was imported from. Used only together with externalUserName. Sending both requires the `workspace:manage_settings` permission.",
                    "example": "trello"
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Activity"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing task:update permission, or external attribution without workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/comment/{id}": {
      "put": {
        "operationId": "updateTaskComment",
        "tags": [
          "Comments"
        ],
        "summary": "Update task comment",
        "description": "Replaces the body of a comment and returns the stored activity row. Only the comment's author can edit it. Publishes a `comment.updated` event. Requires the `task:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the comment, which is the ID of its activity row.",
              "example": "si3jh727m8v762jwwzngo8cn"
            },
            "required": true,
            "description": "ID of the comment, which is the ID of its activity row.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Comment body as produced by the editor, 1 to 10,000 characters. An @mention is a `<kaneo-mention id=\"…\">` tag holding the mentioned user's ID.",
                    "example": "Deployed to staging, ready for review."
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Activity"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found, or the caller is not its author",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteTaskComment",
        "tags": [
          "Comments"
        ],
        "summary": "Delete task comment",
        "description": "Deletes a comment and returns the deleted activity row. Only the comment's author can delete it. Publishes a `comment.deleted` event. Requires the `task:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the comment, which is the ID of its activity row.",
              "example": "si3jh727m8v762jwwzngo8cn"
            },
            "required": true,
            "description": "ID of the comment, which is the ID of its activity row.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Activity"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found, or the caller is not its author",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/time-entry/task/{taskId}": {
      "get": {
        "operationId": "getTaskTimeEntries",
        "tags": [
          "Time Entries"
        ],
        "summary": "List task time entries",
        "description": "Lists every time entry logged against a task, oldest start time first, with the name of the user who logged each one. Requires the `task:read` workspace permission and access to the task's project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "taskId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List of time entries for the task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TimeEntryWithUser"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/time-entry/{id}": {
      "get": {
        "operationId": "getTimeEntry",
        "tags": [
          "Time Entries"
        ],
        "summary": "Get time entry",
        "description": "Returns one time entry. Requires the `task:read` workspace permission and access to the task's project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the time entry.",
              "example": "qbbyakioi5zkmz7yj3ldy0g0"
            },
            "required": true,
            "description": "ID of the time entry.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Time entry details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntry"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Time entry not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateTimeEntry",
        "tags": [
          "Time Entries"
        ],
        "summary": "Update time entry",
        "description": "Updates a time entry's start time, and its end time and description when they are sent; omitted fields keep their values. Setting endTime closes a running entry, and the duration is recomputed. Any member with the permission can edit any entry on the task. Requires the `task:update` workspace permission and access to the task's project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the time entry.",
              "example": "qbbyakioi5zkmz7yj3ldy0g0"
            },
            "required": true,
            "description": "ID of the time entry.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startTime": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2026-11-18T09:00:00Z",
                    "description": "Start of the logged time, as an ISO 8601 timestamp with a `Z` or `±hh:mm` offset. Seconds and fractions are optional."
                  },
                  "endTime": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2026-11-18T10:30:00Z",
                    "description": "End of the logged time, not before startTime. Omit to keep the current end time, so a running entry stays running."
                  },
                  "description": {
                    "type": "string",
                    "description": "Note about the work done. Omit to leave it unset or unchanged.",
                    "example": "Reviewed the login redirect fix"
                  }
                },
                "required": [
                  "startTime"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated time entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntry"
                }
              }
            }
          },
          "400": {
            "description": "Invalid timestamp, start time after end time, or a range too long to record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Time entry not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/time-entry": {
      "post": {
        "operationId": "createTimeEntry",
        "tags": [
          "Time Entries"
        ],
        "summary": "Create time entry",
        "description": "Logs time against a task for the caller. Omit endTime to start a running entry that can be closed later with an update. Publishes a `time-entry.created` event. Requires the `task:update` workspace permission and access to the task's project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "description": "ID of the task to log time against.",
                    "example": "bkh59p9dpz3efjy7e59v55jd"
                  },
                  "startTime": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2026-11-18T09:00:00Z",
                    "description": "Start of the logged time, as an ISO 8601 timestamp with a `Z` or `±hh:mm` offset. Seconds and fractions are optional."
                  },
                  "endTime": {
                    "type": "string",
                    "format": "date-time",
                    "example": "2026-11-18T10:30:00Z",
                    "description": "End of the logged time, in the same format as startTime and not before it. Omit to start a running entry."
                  },
                  "description": {
                    "type": "string",
                    "description": "Note about the work done. Omit to leave it unset or unchanged.",
                    "example": "Reviewed the login redirect fix"
                  }
                },
                "required": [
                  "taskId",
                  "startTime"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created time entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntry"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body or timestamp, start time after end time, or a range too long to record",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/label/task/{taskId}": {
      "get": {
        "operationId": "getTaskLabels",
        "tags": [
          "Labels"
        ],
        "summary": "List task labels",
        "description": "Lists the labels on a task, in no particular order. Requires access to the task's project and the `label:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "taskId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List of labels for the task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Label"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/label/workspace/{workspaceId}": {
      "get": {
        "operationId": "getWorkspaceLabels",
        "tags": [
          "Labels"
        ],
        "summary": "List workspace labels",
        "description": "Lists the workspace's labels together with the task copies on tasks in projects the caller can access, in no particular order. Requires the `label:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List of labels in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Label"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/label": {
      "post": {
        "operationId": "createLabel",
        "tags": [
          "Labels"
        ],
        "summary": "Create label",
        "description": "Creates a workspace label, or a label on a task when `taskId` is set. The request is idempotent by name: if a label with the same name already exists in the same scope, that label is returned unchanged. A new label on a task publishes a `task.label_created` event and is synced to linked GitHub, Gitea and GitLab issues. Requires the `label:create` workspace permission and, for a task label, access to the task's project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Display name of the label. Names are unique among a workspace's labels and among the labels on one task.",
                    "example": "Bug"
                  },
                  "color": {
                    "type": "string",
                    "description": "Color of the label, stored as given. The web app uses the color names `gray`, `dark-gray`, `purple`, `teal`, `green`, `yellow`, `orange`, `pink`, `red`, `blue`, `sky`, `cyan` and `fuchsia`.",
                    "example": "purple"
                  },
                  "workspaceId": {
                    "type": "string",
                    "description": "ID of the workspace that owns the label.",
                    "example": "cfklow33tpuxgpxko9nxqllg"
                  },
                  "taskId": {
                    "type": "string",
                    "description": "ID of a task in the same workspace to put the label on. When omitted, the label is created as a workspace label that is not on any task.",
                    "example": "bkh59p9dpz3efjy7e59v55jd"
                  }
                },
                "required": [
                  "name",
                  "color",
                  "workspaceId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Label created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or workspace ID could not be determined",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing label:create permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The label or its task assignment is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/label/{id}": {
      "get": {
        "operationId": "getLabel",
        "tags": [
          "Labels"
        ],
        "summary": "Get label",
        "description": "Returns one label. Requires the `label:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the label.",
              "example": "xmsumno675r2a71rrcz68pin"
            },
            "required": true,
            "description": "ID of the label.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Label details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Label not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateLabel",
        "tags": [
          "Labels"
        ],
        "summary": "Update label",
        "description": "Renames or recolors a label. Changing a workspace label also updates every task copy with the same name, so tasks keep showing the new name and color. Publishes `project.updated` for each affected project. Requires the `label:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the label.",
              "example": "xmsumno675r2a71rrcz68pin"
            },
            "required": true,
            "description": "ID of the label.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Display name of the label. Names are unique among a workspace's labels and among the labels on one task.",
                    "example": "Bug"
                  },
                  "color": {
                    "type": "string",
                    "description": "Color of the label, stored as given. The web app uses the color names `gray`, `dark-gray`, `purple`, `teal`, `green`, `yellow`, `orange`, `pink`, `red`, `blue`, `sky`, `cyan` and `fuchsia`.",
                    "example": "purple"
                  }
                },
                "required": [
                  "name",
                  "color"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Label updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing label:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Label not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The label is being deleted or changed concurrently; retry the update",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteLabel",
        "tags": [
          "Labels"
        ],
        "summary": "Delete label",
        "description": "Delete a label by ID. Large workspace cascades remove at most 25 task copies per request. Repeat DELETE with the same ID after HTTP 202 until HTTP 200 completes the operation. The persisted start boundary allows safe resumption after a disconnect. HTTP 429 asks the caller to retry later.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the label.",
              "example": "xmsumno675r2a71rrcz68pin"
            },
            "required": true,
            "description": "ID of the label.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Label deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "202": {
            "description": "Deletion has more batches; repeat the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingLabelDeletion"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing label:delete permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Label not found, or the label's task no longer exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Deletion is busy; retry after Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/label/{id}/task": {
      "put": {
        "operationId": "attachLabelToTask",
        "tags": [
          "Labels"
        ],
        "summary": "Attach label to task",
        "description": "Attaches a label to a task by creating a task copy with the label's name and color, and returns that copy, which has its own ID. If the label is already on another task, it moves: the copy on the old task is removed. If the task already has a label with the same name, that label is returned and nothing changes. Publishes `task.label_assigned` and syncs the change to linked GitHub, Gitea and GitLab issues. Requires the `label:update` workspace permission and access to the task's project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the label.",
              "example": "xmsumno675r2a71rrcz68pin"
            },
            "required": true,
            "description": "ID of the label.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "description": "ID of the task to attach the label to.",
                    "example": "bkh59p9dpz3efjy7e59v55jd"
                  }
                },
                "required": [
                  "taskId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Label attached to task successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "400": {
            "description": "Label and task belong to different workspaces",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing label:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Label or task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The label or its task assignment is being deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "detachLabelFromTask",
        "tags": [
          "Labels"
        ],
        "summary": "Detach label from task",
        "description": "Removes a task label by deleting the task copy, and returns the deleted label. The workspace label it was copied from is not affected. Publishes `task.label_unassigned` and removes the label from linked GitHub, Gitea and GitLab issues. Requires the `label:update` workspace permission and access to the task's project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the label.",
              "example": "xmsumno675r2a71rrcz68pin"
            },
            "required": true,
            "description": "ID of the label.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Label detached from task successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          },
          "400": {
            "description": "Label is not assigned to a task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing label:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Label or task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/notification": {
      "get": {
        "operationId": "listNotifications",
        "tags": [
          "Notifications"
        ],
        "summary": "List notifications",
        "description": "Lists the current user's 50 most recent notifications, read and unread, newest first. There is no pagination. When `workspaceId` is set, the workspace filter is applied before the limit. Notifications about a task count only while the user is a member of the task's workspace, can access its project and has the `task:read` workspace permission; notifications about a workspace need membership and `workspace:read`. Archived workspaces hide their notifications. With an API key, the key must also grant those permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of a workspace to limit the request to. Matches notifications about that workspace or about a task currently in it, plus user-wide notifications that point at no resource. Omit to include all workspaces.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": false,
            "description": "ID of a workspace to limit the request to. Matches notifications about that workspace or about a task currently in it, plus user-wide notifications that point at no resource. Omit to include all workspaces.",
            "name": "workspaceId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Up to 50 notifications, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Notification"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createNotification",
        "tags": [
          "Notifications"
        ],
        "summary": "Create notification",
        "description": "Creates a notification for the current user. Most notifications are raised by the server from task, comment, time tracking and workspace events; this endpoint lets integrations add their own. Returns null without creating anything when the type belongs to a category the user turned off in notification preferences, or when the linked task or workspace is not readable by the user. A created notification publishes a `notification.created` event. A notification linked to a task or workspace is also sent to the user's email, ntfy, Gotify and webhook channels when their notification preferences have an active rule for that workspace that covers it; user-wide notifications stay in the app.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Title of the notification, stored as given. Null or omitted stores no title.",
                    "example": "Deploy finished"
                  },
                  "message": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Free-text body, stored as the notification's `content`. Null or omitted stores no body.",
                    "example": "acme/website was deployed to production."
                  },
                  "type": {
                    "type": "string",
                    "description": "Notification type, stored as given; an empty string is stored as `info`. The server raises `task_created`, `workspace_created`, `task_status_changed`, `task_assignee_changed`, `time_entry_created`, `due_date_reminder`, `task_overdue`, `task_mention` and `task_comment`. When the type belongs to a category the user turned off in notification preferences, nothing is created: `task_created` and `task_assignee_changed` follow `taskAssignmentEnabled`, `task_comment` and `task_mention` follow `taskCommentEnabled`, `task_status_changed` follows `taskStatusChangeEnabled`, and `due_date_reminder` and `task_overdue` follow `dueDateReminderEnabled`.",
                    "example": "info"
                  },
                  "eventData": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": {},
                    "description": "Type-specific data stored with the notification and returned as `eventData`. Null or omitted stores none.",
                    "example": {
                      "taskTitle": "Fix login redirect"
                    }
                  },
                  "relatedEntityId": {
                    "type": "string",
                    "description": "ID of the task or workspace the notification points at, stored as `resourceId`. Set it together with `relatedEntityType`. Omit both for a user-wide notification.",
                    "example": "bkh59p9dpz3efjy7e59v55jd"
                  },
                  "relatedEntityType": {
                    "type": "string",
                    "description": "Kind of resource `relatedEntityId` points at, stored as `resourceType`: `task` or `workspace`. Any other value, or setting only one of the two fields, makes the request return null without creating a notification.",
                    "example": "task"
                  }
                },
                "required": [
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created notification, or null when the user has muted this notification type",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Notification"
                    },
                    {
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The body failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/notification/{id}/read": {
      "patch": {
        "operationId": "markNotificationAsRead",
        "tags": [
          "Notifications"
        ],
        "summary": "Mark notification read",
        "description": "Marks one of the current user's notifications as read and returns it. Marking a read notification again changes nothing. Notifications about a task count only while the user is a member of the task's workspace, can access its project and has the `task:read` workspace permission; notifications about a workspace need membership and `workspace:read`. Archived workspaces hide their notifications. With an API key, the key must also grant those permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the notification.",
              "example": "pgqlv147s375jkb40jpobpnk"
            },
            "required": true,
            "description": "ID of the notification.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The notification, now read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notification"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No notification with this ID belongs to the current user and is readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/notification/{id}/unread": {
      "patch": {
        "operationId": "markNotificationAsUnread",
        "tags": [
          "Notifications"
        ],
        "summary": "Mark notification unread",
        "description": "Marks one of the current user's notifications as unread and returns it. Notifications about a task count only while the user is a member of the task's workspace, can access its project and has the `task:read` workspace permission; notifications about a workspace need membership and `workspace:read`. Archived workspaces hide their notifications. With an API key, the key must also grant those permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the notification.",
              "example": "pgqlv147s375jkb40jpobpnk"
            },
            "required": true,
            "description": "ID of the notification.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The notification, now unread",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Notification"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No notification with this ID belongs to the current user and is readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/notification/read-all": {
      "patch": {
        "operationId": "markAllNotificationsAsRead",
        "tags": [
          "Notifications"
        ],
        "summary": "Mark all notifications read",
        "description": "Marks all of the current user's notifications as read, or only those in one workspace when `workspaceId` is set. Succeeds even when nothing was unread. Notifications about a task count only while the user is a member of the task's workspace, can access its project and has the `task:read` workspace permission; notifications about a workspace need membership and `workspace:read`. Archived workspaces hide their notifications. With an API key, the key must also grant those permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of a workspace to limit the request to. Matches notifications about that workspace or about a task currently in it, plus user-wide notifications that point at no resource. Omit to include all workspaces.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": false,
            "description": "ID of a workspace to limit the request to. Matches notifications about that workspace or about a task currently in it, plus user-wide notifications that point at no resource. Omit to include all workspaces.",
            "name": "workspaceId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The notifications were marked as read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationBulkResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/notification/clear-all": {
      "delete": {
        "operationId": "clearAllNotifications",
        "tags": [
          "Notifications"
        ],
        "summary": "Clear all notifications",
        "description": "Permanently deletes all of the current user's notifications, read and unread, or only those in one workspace when `workspaceId` is set. Notifications the user cannot currently read are kept. This cannot be undone. Notifications about a task count only while the user is a member of the task's workspace, can access its project and has the `task:read` workspace permission; notifications about a workspace need membership and `workspace:read`. Archived workspaces hide their notifications. With an API key, the key must also grant those permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of a workspace to limit the request to. Matches notifications about that workspace or about a task currently in it, plus user-wide notifications that point at no resource. Omit to include all workspaces.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": false,
            "description": "ID of a workspace to limit the request to. Matches notifications about that workspace or about a task currently in it, plus user-wide notifications that point at no resource. Omit to include all workspaces.",
            "name": "workspaceId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The notifications were deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationBulkResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/notification/clear-read": {
      "delete": {
        "operationId": "clearReadNotifications",
        "tags": [
          "Notifications"
        ],
        "summary": "Clear read notifications",
        "description": "Permanently deletes the current user's read notifications, or only those in one workspace when `workspaceId` is set. Unread notifications and notifications the user cannot currently read are kept. This cannot be undone. Notifications about a task count only while the user is a member of the task's workspace, can access its project and has the `task:read` workspace permission; notifications about a workspace need membership and `workspace:read`. Archived workspaces hide their notifications. With an API key, the key must also grant those permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of a workspace to limit the request to. Matches notifications about that workspace or about a task currently in it, plus user-wide notifications that point at no resource. Omit to include all workspaces.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": false,
            "description": "ID of a workspace to limit the request to. Matches notifications about that workspace or about a task currently in it, plus user-wide notifications that point at no resource. Omit to include all workspaces.",
            "name": "workspaceId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The read notifications were deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationBulkResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/notification/{id}": {
      "delete": {
        "operationId": "deleteNotification",
        "tags": [
          "Notifications"
        ],
        "summary": "Delete notification",
        "description": "Permanently deletes one of the current user's notifications. This cannot be undone. Notifications about a task count only while the user is a member of the task's workspace, can access its project and has the `task:read` workspace permission; notifications about a workspace need membership and `workspace:read`. Archived workspaces hide their notifications. With an API key, the key must also grant those permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the notification.",
              "example": "pgqlv147s375jkb40jpobpnk"
            },
            "required": true,
            "description": "ID of the notification.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The notification was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationBulkResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No notification with this ID belongs to the current user and is readable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/notification-preferences": {
      "get": {
        "operationId": "getNotificationPreferences",
        "tags": [
          "Notification Preferences"
        ],
        "summary": "Get notification preferences",
        "description": "Returns how the current user is notified: global channel settings, notification categories and per-workspace delivery rules. A user who never saved preferences gets the defaults. Configured secrets are reported as booleans plus a masked preview, never in full.",
        "responses": {
          "200": {
            "description": "The current user's notification preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferences"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateNotificationPreferences",
        "tags": [
          "Notification Preferences"
        ],
        "summary": "Update notification preferences",
        "description": "Updates the current user's global channel settings and notification categories, and returns the full preferences. Omitted fields keep their stored value. Secrets (`ntfyToken`, `gotifyToken`, `webhookSecret`) are write-only: a value replaces the stored one and null clears it. When a channel is on, or any of its fields is sent, its settings are validated: email needs an account email address, ntfy a server URL and topic, Gotify a server URL and app token, and the webhook a URL; server and webhook URLs must use http or https on a public address. Side effect on the user's active workspace rules that have a channel on: channels that are off or incomplete globally are turned off there, and a channel this request turns on globally is turned on there.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emailEnabled": {
                    "type": "boolean",
                    "description": "Whether to send notifications by email to the account's email address. Turning it on fails when the account has no email address.",
                    "example": true
                  },
                  "ntfyEnabled": {
                    "type": "boolean",
                    "description": "Whether to send notifications to an ntfy topic. Turning it on requires a server URL and topic, stored or sent in this request.",
                    "example": false
                  },
                  "ntfyServerUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Base URL of the ntfy server, such as `https://ntfy.example.com`. Must be an http or https URL on a public address; it is trimmed before it is saved. Omitted or null keeps the stored value.",
                    "example": "https://ntfy.example.com"
                  },
                  "ntfyTopic": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ntfy topic to publish to. Trimmed before it is saved. Omitted or null keeps the stored value.",
                    "example": "team-alerts"
                  },
                  "ntfyToken": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Access token sent to ntfy as a Bearer token, for protected topics. Write-only: stored encrypted and never returned. Null or an empty string clears it; omitted keeps it.",
                    "example": "tk_example_not_a_real_token"
                  },
                  "gotifyEnabled": {
                    "type": "boolean",
                    "description": "Whether to send notifications to a Gotify server. Turning it on requires a server URL and app token, stored or sent in this request.",
                    "example": false
                  },
                  "gotifyServerUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Base URL of the Gotify server. Must be an http or https URL on a public address; it is trimmed before it is saved. Omitted or null keeps the stored value.",
                    "example": "https://gotify.example.com"
                  },
                  "gotifyToken": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Gotify application token used to post messages. Write-only: stored encrypted and never returned. Null or an empty string clears it; omitted keeps it.",
                    "example": "AexampleGotifyToken"
                  },
                  "webhookEnabled": {
                    "type": "boolean",
                    "description": "Whether to POST notifications as JSON to a webhook URL. Turning it on requires a webhook URL, stored or sent in this request.",
                    "example": false
                  },
                  "webhookUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Endpoint that receives a JSON POST for each delivered notification, with `notification`, `workspace`, `project`, `task` and `user` objects (`project` and `task` are null for workspace notifications). Must be an http or https URL on a public address; it is trimmed before it is saved. Omitted or null keeps the stored value.",
                    "example": "https://hooks.example.com/notifications"
                  },
                  "webhookSecret": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Secret used to sign webhook bodies. When set, each webhook request carries a signature header holding the hex-encoded HMAC-SHA256 of the raw request body, keyed with this secret. Write-only: stored encrypted and never returned. Null or an empty string clears it; omitted keeps it.",
                    "example": "whsec_example_not_a_real_secret"
                  },
                  "taskAssignmentEnabled": {
                    "type": "boolean",
                    "description": "Whether to create notifications when you are assigned a task or a task assigned to you is created (`task_assignee_changed`, `task_created`). Defaults to `true`.",
                    "example": true
                  },
                  "taskCommentEnabled": {
                    "type": "boolean",
                    "description": "Whether to create notifications for comments on tasks assigned to you and for mentions (`task_comment`, `task_mention`). Defaults to `true`.",
                    "example": true
                  },
                  "taskStatusChangeEnabled": {
                    "type": "boolean",
                    "description": "Whether to create notifications when a task assigned to you changes status (`task_status_changed`). Defaults to `true`.",
                    "example": true
                  },
                  "dueDateReminderEnabled": {
                    "type": "boolean",
                    "description": "Whether to create due date reminders and overdue notifications (`due_date_reminder`, `task_overdue`). Defaults to `true`.",
                    "example": true
                  },
                  "dueDateReminderLeadTimeMinutes": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 43200,
                    "description": "How long before a task's due date the reminder is sent, in minutes, from 5 minutes to 30 days (43200). Defaults to 1440 (one day).",
                    "example": 1440
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferences"
                }
              }
            }
          },
          "400": {
            "description": "The body failed validation, a turned-on channel is missing required settings, or a URL is invalid or not public",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/notification-preferences/workspaces/{workspaceId}": {
      "put": {
        "operationId": "upsertNotificationPreferenceWorkspaceRule",
        "tags": [
          "Notification Preferences"
        ],
        "summary": "Create or replace workspace rule",
        "description": "Creates or replaces the current user's delivery rule for one workspace and returns the full preferences. Notifications about the workspace and its tasks are sent to email, ntfy, Gotify or the webhook only through an active rule. Each channel turned on in the rule must already be turned on and configured in the global settings. With `projectMode` set to `selected`, the rule covers only tasks in the listed projects; projects already in the rule that the user can no longer access are kept. Requires membership in the workspace.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of a workspace the current user is a member of.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of a workspace the current user is a member of.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether the rule delivers anything. `false` stops all channel delivery for this workspace while keeping the rule.",
                    "example": true
                  },
                  "emailEnabled": {
                    "type": "boolean",
                    "description": "Whether to email notifications from this workspace. Requires email to be turned on in the global settings.",
                    "example": true
                  },
                  "ntfyEnabled": {
                    "type": "boolean",
                    "description": "Whether to send notifications from this workspace to ntfy. Requires ntfy to be turned on and configured in the global settings.",
                    "example": false
                  },
                  "gotifyEnabled": {
                    "type": "boolean",
                    "description": "Whether to send notifications from this workspace to Gotify. Requires Gotify to be turned on and configured in the global settings.",
                    "example": false
                  },
                  "webhookEnabled": {
                    "type": "boolean",
                    "description": "Whether to send notifications from this workspace to the webhook. Requires the webhook to be turned on and configured in the global settings.",
                    "example": false
                  },
                  "projectMode": {
                    "type": "string",
                    "enum": [
                      "all",
                      "selected"
                    ],
                    "description": "Which projects the rule covers. `all` covers every project in the workspace, and workspace-level notifications. `selected` covers only tasks in `selectedProjectIds`.",
                    "example": "selected"
                  },
                  "selectedProjectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "IDs of the projects to cover when `projectMode` is `selected`. Each must be a project in this workspace that the user can access, and at least one is required unless the rule already holds projects the user can no longer access, which are kept. Ignored when `projectMode` is `all`.",
                    "example": [
                      "cef5d6uaajgxwpe38vkp4khl"
                    ]
                  }
                },
                "required": [
                  "isActive",
                  "emailEnabled",
                  "ntfyEnabled",
                  "gotifyEnabled",
                  "webhookEnabled",
                  "projectMode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferences"
                }
              }
            }
          },
          "400": {
            "description": "The body failed validation, no project was selected, a selected project is not in the workspace or not accessible, or a channel is not turned on globally",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The current user is not a member of the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteNotificationPreferenceWorkspaceRule",
        "tags": [
          "Notification Preferences"
        ],
        "summary": "Delete workspace rule",
        "description": "Deletes the current user's delivery rule for a workspace and returns the full preferences. Without a rule, notifications from that workspace are no longer sent to email, ntfy, Gotify or the webhook; in-app notifications continue. Requires membership in the workspace.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of a workspace the current user is a member of.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of a workspace the current user is a member of.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The updated preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferences"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The current user is not a member of the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The current user has no rule for this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/search": {
      "get": {
        "operationId": "globalSearch",
        "tags": [
          "Search"
        ],
        "summary": "Global search",
        "description": "Searches tasks, projects, workspaces, comments, and activities in one workspace with a case-insensitive substring match. Tasks, comments and activities only come from projects the caller can access. Results are ranked by relevance, then newest first, and returned as a single flat list cut to `limit`, each entry tagged with its `type`. There is no pagination. The permission needed depends on `type`: `project:read` for `projects`, `workspace:read` for `workspaces`, `project:read` and `task:read` for `tasks`, `comments` and `activities`, and all three for `all`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512,
              "description": "Text to search for, 1 to 512 characters. Matched case-insensitively anywhere in task titles and descriptions, project and workspace names and descriptions, comment and activity text, and the titles of the tasks comments and activities belong to. A task short ID such as `WEB-42` (project key, hyphen, task number) also finds that task directly and ranks it first.",
              "example": "login bug"
            },
            "required": true,
            "description": "Text to search for, 1 to 512 characters. Matched case-insensitively anywhere in task titles and descriptions, project and workspace names and descriptions, comment and activity text, and the titles of the tasks comments and activities belong to. A task short ID such as `WEB-42` (project key, hyphen, task number) also finds that task directly and ranks it first.",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "tasks",
                "projects",
                "workspaces",
                "comments",
                "activities"
              ],
              "default": "all",
              "description": "Kind of results to search. `all` searches everything, `tasks`, `projects` and `workspaces` search only that kind, `comments` searches only comments, and `activities` searches comments and other task activity. Defaults to `all`. Also sets the permission needed: `project:read` for `projects`, `workspace:read` for `workspaces`, `project:read` and `task:read` for `tasks`, `comments` and `activities`, and all three for `all`.",
              "example": "tasks"
            },
            "required": false,
            "description": "Kind of results to search. `all` searches everything, `tasks`, `projects` and `workspaces` search only that kind, `comments` searches only comments, and `activities` searches comments and other task activity. Defaults to `all`. Also sets the permission needed: `project:read` for `projects`, `workspace:read` for `workspaces`, `project:read` and `task:read` for `tasks`, `comments` and `activities`, and all three for `all`.",
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the workspace to search in. Results only come from this workspace and, for tasks, comments and activities, from projects the caller can access.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace to search in. Results only come from this workspace and, for tasks, comments and activities, from projects the caller can access.",
            "name": "workspaceId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of a project to limit task, comment and activity results to. Project and workspace results are not filtered by it. When the caller cannot access the project, the response has no results.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": false,
            "description": "ID of a project to limit task, comment and activity results to. Project and workspace results are not filtered by it. When the caller cannot access the project, the response has no results.",
            "name": "projectId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "default": "20",
              "description": "Maximum number of results to return, a whole number from 1 to 50. Defaults to 20. Each kind of result is also fetched up to this many before the lists are merged and cut.",
              "example": "20"
            },
            "required": false,
            "description": "Maximum number of results to return, a whole number from 1 to 50. Defaults to 20. Each kind of result is also fetched up to this many before the lists are merged and cut.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "email",
              "description": "Not used for authenticated requests: results are always scoped to the caller.",
              "example": "jane@example.com"
            },
            "required": false,
            "description": "Not used for authenticated requests: results are always scoped to the caller.",
            "name": "userEmail",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters, or `workspaceId` is missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing a read permission the requested `type` needs, or the workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or the caller is not a member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/integration-sync/project/{projectId}/{provider}": {
      "get": {
        "operationId": "getIntegrationSyncRules",
        "tags": [
          "Integration sync"
        ],
        "summary": "Get sync rules and current task scope",
        "description": "Returns the integration's saved label rules and the tasks they currently affect, with a `previewToken` for saving the same rules. `pausedTasks` is paged 25 at a time with the `after` cursor. Rules remain active when advanced mode is hidden. Paused issue links are preserved; eligible paused tasks require review before resuming. Requires access to the project and the `project:read` and `task:read` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitea",
                "gitlab"
              ],
              "description": "Issue tracker integration whose sync rules to use: `github`, `gitea` or `gitlab`.",
              "example": "github"
            },
            "required": true,
            "description": "Issue tracker integration whose sync rules to use: `github`, `gitea` or `gitlab`.",
            "name": "provider",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor for the next page of `pausedTasks`: the `pausedNextCursor` from the previous response. Only tasks with a greater ID are returned. Omit it for the first page.",
              "example": "p15q5mwm4dm31qgfyrygj35y"
            },
            "required": false,
            "description": "Cursor for the next page of `pausedTasks`: the `pausedNextCursor` from the previous response. Only tasks with a greater ID are returned. Omit it for the first page.",
            "name": "after",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Saved rules and scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationSyncPreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid rule, or the rule selects labels that are not workspace labels (`Select existing labels from this workspace`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing a required permission, or the project moved to another workspace during the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, no integration for this provider (`Integration not found`), or the issue link was not found (`Linked task not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored sync rules are invalid, or the configuration, impact or comparison changed; preview or review again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "saveIntegrationSyncRules",
        "tags": [
          "Integration sync"
        ],
        "summary": "Apply a previewed sync rule",
        "description": "Saves label rules only if `previewToken` still matches the current integration and impact. Excluded links are paused, never deleted. Newly matching unlinked tasks are exported through the integration event path. Paused links require explicit review to resume. Publishes `integration.sync_rules_changed` and `project.updated` events and returns the saved rules with their current scope. Requires access to the project and the `project:read`, `task:read` and `workspace:manage_settings` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitea",
                "gitlab"
              ],
              "description": "Issue tracker integration whose sync rules to use: `github`, `gitea` or `gitlab`.",
              "example": "github"
            },
            "required": true,
            "description": "Issue tracker integration whose sync rules to use: `github`, `gitea` or `gitlab`.",
            "name": "provider",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rules": {
                    "type": "object",
                    "properties": {
                      "outgoing": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "all"
                                ],
                                "description": "`all`: every item matches, with no label filter."
                              }
                            },
                            "required": [
                              "mode"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "labels"
                                ],
                                "description": "`labels`: only items carrying the listed labels match."
                              },
                              "match": {
                                "type": "string",
                                "enum": [
                                  "any",
                                  "all"
                                ],
                                "description": "`any`: at least one listed label must be present. `all`: every listed label must be present."
                              },
                              "labels": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "minItems": 1,
                                "maxItems": 50,
                                "description": "Labels to match: 1 to 50 unique values of up to 128 characters each, trimmed. An outgoing rule lists workspace label IDs; an incoming rule lists exact repository label names."
                              }
                            },
                            "required": [
                              "mode",
                              "match",
                              "labels"
                            ]
                          }
                        ],
                        "description": "albus workspace label IDs controlling task sync. Missing labels pause sync. A task that stops matching has its issue sync paused; the issue link is kept."
                      },
                      "incoming": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "all"
                                ],
                                "description": "`all`: every item matches, with no label filter."
                              }
                            },
                            "required": [
                              "mode"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "labels"
                                ],
                                "description": "`labels`: only items carrying the listed labels match."
                              },
                              "match": {
                                "type": "string",
                                "enum": [
                                  "any",
                                  "all"
                                ],
                                "description": "`any`: at least one listed label must be present. `all`: every listed label must be present."
                              },
                              "labels": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "minItems": 1,
                                "maxItems": 50,
                                "description": "Labels to match: 1 to 50 unique values of up to 128 characters each, trimmed. An outgoing rule lists workspace label IDs; an incoming rule lists exact repository label names."
                              }
                            },
                            "required": [
                              "mode",
                              "match",
                              "labels"
                            ]
                          }
                        ],
                        "description": "Exact repository label names controlling which issues can be imported."
                      }
                    },
                    "required": [
                      "outgoing",
                      "incoming"
                    ],
                    "description": "Label rules of the integration. Both default to `{ \"mode\": \"all\" }`."
                  },
                  "previewToken": {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64,
                    "description": "The `previewToken` returned by the preview of these exact rules, a 64-character hex string. The save fails with 409 when the integration, the selected labels or the affected tasks changed since that preview.",
                    "example": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
                  }
                },
                "required": [
                  "rules",
                  "previewToken"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved rules and current scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationSyncPreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid rule, or the rule selects labels that are not workspace labels (`Select existing labels from this workspace`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing a required permission, or the project moved to another workspace during the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, no integration for this provider (`Integration not found`), or the issue link was not found (`Linked task not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored sync rules are invalid, or the configuration, impact or comparison changed; preview or review again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/integration-sync/project/{projectId}/{provider}/preview": {
      "post": {
        "operationId": "previewIntegrationSyncRules",
        "tags": [
          "Integration sync"
        ],
        "summary": "Preview a sync rule change",
        "description": "Returns the impact of new label rules without saving them: matching tasks, new exports, paused links (first page only) and a token bound to the current integration and impact. Outgoing labels are workspace label IDs; incoming labels are exact repository label names. Requires access to the project and the `project:read`, `task:read` and `workspace:manage_settings` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitea",
                "gitlab"
              ],
              "description": "Issue tracker integration whose sync rules to use: `github`, `gitea` or `gitlab`.",
              "example": "github"
            },
            "required": true,
            "description": "Issue tracker integration whose sync rules to use: `github`, `gitea` or `gitlab`.",
            "name": "provider",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rules": {
                    "type": "object",
                    "properties": {
                      "outgoing": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "all"
                                ],
                                "description": "`all`: every item matches, with no label filter."
                              }
                            },
                            "required": [
                              "mode"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "labels"
                                ],
                                "description": "`labels`: only items carrying the listed labels match."
                              },
                              "match": {
                                "type": "string",
                                "enum": [
                                  "any",
                                  "all"
                                ],
                                "description": "`any`: at least one listed label must be present. `all`: every listed label must be present."
                              },
                              "labels": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "minItems": 1,
                                "maxItems": 50,
                                "description": "Labels to match: 1 to 50 unique values of up to 128 characters each, trimmed. An outgoing rule lists workspace label IDs; an incoming rule lists exact repository label names."
                              }
                            },
                            "required": [
                              "mode",
                              "match",
                              "labels"
                            ]
                          }
                        ],
                        "description": "albus workspace label IDs controlling task sync. Missing labels pause sync. A task that stops matching has its issue sync paused; the issue link is kept."
                      },
                      "incoming": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "all"
                                ],
                                "description": "`all`: every item matches, with no label filter."
                              }
                            },
                            "required": [
                              "mode"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "labels"
                                ],
                                "description": "`labels`: only items carrying the listed labels match."
                              },
                              "match": {
                                "type": "string",
                                "enum": [
                                  "any",
                                  "all"
                                ],
                                "description": "`any`: at least one listed label must be present. `all`: every listed label must be present."
                              },
                              "labels": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "minItems": 1,
                                "maxItems": 50,
                                "description": "Labels to match: 1 to 50 unique values of up to 128 characters each, trimmed. An outgoing rule lists workspace label IDs; an incoming rule lists exact repository label names."
                              }
                            },
                            "required": [
                              "mode",
                              "match",
                              "labels"
                            ]
                          }
                        ],
                        "description": "Exact repository label names controlling which issues can be imported."
                      }
                    },
                    "required": [
                      "outgoing",
                      "incoming"
                    ],
                    "description": "Label rules of the integration. Both default to `{ \"mode\": \"all\" }`."
                  }
                },
                "required": [
                  "rules"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Proposed rule impact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationSyncPreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid rule, or the rule selects labels that are not workspace labels (`Select existing labels from this workspace`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing a required permission, or the project moved to another workspace during the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, no integration for this provider (`Integration not found`), or the issue link was not found (`Linked task not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored sync rules are invalid, or the configuration, impact or comparison changed; preview or review again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/integration-sync/project/{projectId}/{provider}/links/{linkId}/review": {
      "get": {
        "operationId": "reviewIntegrationSyncResume",
        "tags": [
          "Integration sync"
        ],
        "summary": "Compare a paused task with its external issue",
        "description": "Reads the external issue from the provider and returns its title, description and open or closed state next to the task's, with a comparison `token` for resuming. Nothing is changed. The integration must be on, the link paused and the task matching the current outgoing rule. Requires access to the project and the `project:read`, `task:read` and `workspace:manage_settings` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitea",
                "gitlab"
              ],
              "description": "Issue tracker integration whose sync rules to use: `github`, `gitea` or `gitlab`.",
              "example": "github"
            },
            "required": true,
            "description": "Issue tracker integration whose sync rules to use: `github`, `gitea` or `gitlab`.",
            "name": "provider",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the paused issue link, from `pausedTasks[].linkId` in the sync rules response.",
              "example": "ghlz1fqn1h9zzgwvcyi4w4xd"
            },
            "required": true,
            "description": "ID of the paused issue link, from `pausedTasks[].linkId` in the sync rules response.",
            "name": "linkId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Current values and comparison token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationSyncResumePreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid rule, or the rule selects labels that are not workspace labels (`Select existing labels from this workspace`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing a required permission, or the project moved to another workspace during the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, no integration for this provider (`Integration not found`), or the issue link was not found (`Linked task not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The integration is off, the link is not paused, or the task does not match the current rule; or the stored sync rules are invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "External issue could not be read from the provider; sync remains paused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/integration-sync/project/{projectId}/{provider}/links/{linkId}/resume": {
      "post": {
        "operationId": "resumeIntegrationSync",
        "tags": [
          "Integration sync"
        ],
        "summary": "Resume a reviewed issue link",
        "description": "Resumes sync for a reviewed issue link. Explicitly choose the current albus or repository title, description and open/closed state with `source`. Existing links are reused; historical comments are not replayed. The task must still match its outgoing rule. A changed comparison requires another review. Afterwards the issue is read again to confirm the values; if that fails, the link is paused again and an error is returned. Publishes `task.updated` and `project.updated` events. Requires access to the project and the `project:read`, `task:read`, `task:update` and `workspace:manage_settings` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitea",
                "gitlab"
              ],
              "description": "Issue tracker integration whose sync rules to use: `github`, `gitea` or `gitlab`.",
              "example": "github"
            },
            "required": true,
            "description": "Issue tracker integration whose sync rules to use: `github`, `gitea` or `gitlab`.",
            "name": "provider",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the paused issue link, from `pausedTasks[].linkId` in the sync rules response.",
              "example": "ghlz1fqn1h9zzgwvcyi4w4xd"
            },
            "required": true,
            "description": "ID of the paused issue link, from `pausedTasks[].linkId` in the sync rules response.",
            "name": "linkId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64,
                    "description": "The `token` returned by the review of this link, a 64-character hex string. The resume fails with 409 when the task, the issue or the integration changed since that review.",
                    "example": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "kaneo",
                      "provider"
                    ],
                    "description": "Side whose values win. `kaneo` writes the task's title, description and open or closed state to the external issue. `provider` copies the issue's title, description and state onto the task, moving it to a matching open or final column when the state differs.",
                    "example": "kaneo"
                  }
                },
                "required": [
                  "token",
                  "source"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sync resumed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Always `true` when sync was resumed.",
                      "example": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid rule, or the rule selects labels that are not workspace labels (`Select existing labels from this workspace`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing a required permission, or the project moved to another workspace during the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, no integration for this provider (`Integration not found`), or the issue link was not found (`Linked task not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Comparison changed, the issue changed while resuming, no matching open or final column exists, or synchronization is busy; review or retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "External issue could not be read, updated or verified; sync remains paused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/github-integration/app-info": {
      "get": {
        "operationId": "getGitHubAppInfo",
        "tags": [
          "GitHub"
        ],
        "summary": "Get GitHub app info",
        "description": "Returns the GitHub App this server is configured with, so the client can build an install link, and whether the caller has linked a GitHub account and can link one. Available to any authenticated caller; no workspace permission is needed.",
        "responses": {
          "200": {
            "description": "The configured GitHub App and the caller's GitHub account status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubAppInfo"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/github-integration/repositories/{projectId}": {
      "get": {
        "operationId": "listGitHubRepositories",
        "tags": [
          "GitHub"
        ],
        "summary": "List GitHub repositories",
        "description": "Lists the repositories reachable through the installed GitHub App that the caller administers, for picking one to link. Only repositories where the caller's linked GitHub account has admin permission are returned. Without `search`, each request reads one page of up to 20 repositories from one installation. With `search`, the server filters by name and description before checking access and keeps scanning later pages and installations until it has at least 20 matches or has read 10 pages of 100. Follow `nextPage` until it is null to see every repository. Requires a user session (API keys are refused), a linked GitHub account, and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,5}$",
              "default": "1",
              "description": "1-based index of the GitHub App installation to read, one installation per page. Use the value from `nextPage` to continue. Defaults to 1.",
              "example": "1"
            },
            "required": false,
            "description": "1-based index of the GitHub App installation to read, one installation per page. Use the value from `nextPage` to continue. Defaults to 1.",
            "name": "installationPage",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,5}$",
              "default": "1",
              "description": "1-based page of repositories within the installation. Without `search`, a page holds up to 20 repositories; with `search`, up to 100. Use the value from `nextPage` to continue. Defaults to 1.",
              "example": "1"
            },
            "required": false,
            "description": "1-based page of repositories within the installation. Without `search`, a page holds up to 20 repositories; with `search`, up to 100. Use the value from `nextPage` to continue. Defaults to 1.",
            "name": "repositoryPage",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Case-insensitive match on the repository full name or description. When set, one request scans up to 10 pages of 100 repositories across installations and returns every match it finds, with `nextPage` set to resume the scan."
            },
            "required": false,
            "description": "Case-insensitive match on the repository full name or description. When set, one request scans up to 10 pages of 100 repositories across installations and returns every match it finds, with `nextPage` set to resume the scan.",
            "name": "search",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Repositories reachable through the installed App",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubRepositoryList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing `workspace:manage_settings`, called with an API key instead of a user session, no linked GitHub account, or the GitHub identity could not be verified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/github-integration/verify": {
      "post": {
        "operationId": "verifyGitHubInstallation",
        "tags": [
          "GitHub"
        ],
        "summary": "Verify GitHub installation",
        "description": "Checks that the GitHub App is installed on a repository and holds the permissions albus needs (`issues` with write access). Installation and permission problems are reported in a 200 body with links to fix them, so the client can guide the user. The caller's linked GitHub account must have admin permission on the repository first; otherwise the request fails with 403 without revealing whether the repository exists. Makes no changes. Requires a user session (API keys are refused) and the `workspace:manage_settings` workspace permission on the project's workspace.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of the project the repository is being linked to. Used to check workspace access.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  },
                  "repositoryOwner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Login of the GitHub user or organization that owns the repository, 1 to 100 characters.",
                    "example": "acme"
                  },
                  "repositoryName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Name of the GitHub repository without the owner, 1 to 100 characters.",
                    "example": "website"
                  }
                },
                "required": [
                  "projectId",
                  "repositoryOwner",
                  "repositoryName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubVerificationResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or `projectId` is missing (`projectId is required`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing `workspace:manage_settings`, called with an API key instead of a user session, no linked GitHub account, or the caller is not an admin of the repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/github-integration/project/{projectId}": {
      "get": {
        "operationId": "getGitHubIntegration",
        "tags": [
          "GitHub"
        ],
        "summary": "Get GitHub integration",
        "description": "Returns the GitHub integration for a project, or null when none is configured. Includes the progress of the latest issue import for the linked repository when one exists. Requires the `project:read` workspace permission and access to the project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "GitHub integration details, or null",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createGitHubIntegration",
        "tags": [
          "GitHub"
        ],
        "summary": "Create GitHub integration",
        "description": "Links a project to a GitHub repository and activates the integration. The caller's linked GitHub account must have admin permission on the repository, and the GitHub App must be installed on it. Linking the same repository again re-verifies it and keeps the existing settings. Disconnect first to switch repositories; existing issue and pull request links cannot be reused for another repository. Publishes an `integration.sync_rules_changed` event. Requires a user session (API keys are refused) and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "repositoryOwner": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Login of the GitHub user or organization that owns the repository, 1 to 100 characters.",
                    "example": "acme"
                  },
                  "repositoryName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Name of the GitHub repository without the owner, 1 to 100 characters.",
                    "example": "website"
                  }
                },
                "required": [
                  "repositoryOwner",
                  "repositoryName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedGitHubIntegration"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, missing `workspace:manage_settings`, called with an API key instead of a user session, no linked GitHub account, or repository admin permission and an installed App could not be verified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A different repository is already linked (disconnect it first), or the integration changed during the request (refresh and retry)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateGitHubIntegration",
        "tags": [
          "GitHub"
        ],
        "summary": "Update GitHub integration",
        "description": "Updates the GitHub integration's settings. Omitted fields keep their current value. The update only applies if the stored settings did not change during the request. Publishes a `project.updated` event, and an `integration.sync_rules_changed` event when the integration is reactivated. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether the integration syncs. `false` pauses syncing without removing the link. Omit to keep the current value.",
                    "example": true
                  },
                  "commentTaskLinkOnGitHubIssue": {
                    "type": "boolean",
                    "description": "Whether to comment a link back to the task on the linked GitHub issue. Omit to keep the current value.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubIntegration"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or the resulting settings failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no GitHub integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The integration changed during the request; refresh before updating",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteGitHubIntegration",
        "tags": [
          "GitHub"
        ],
        "summary": "Delete GitHub integration",
        "description": "Unlinks a project from its GitHub repository by deleting the integration. Syncing stops; nothing is changed on GitHub. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The integration was removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubDeleteResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no GitHub integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/github-integration/import-issues": {
      "post": {
        "operationId": "importGitHubIssues",
        "tags": [
          "GitHub"
        ],
        "summary": "Import GitHub issues",
        "description": "Imports the linked repository's open issues as tasks, with their labels and comments, and links open pull requests to tasks, in bounded steps of up to four GitHub pages per request. Issues are read oldest first, and existing linked tasks are updated instead of duplicated. Issues, comments and pull requests created after the run started are not included. Continue 202 responses with the returned runId until 200; the same runId safely retries completion. Progress is saved after each page. New calls without runId resume an unfinished import or start a new one after completion. Publishes `task.updated`, `task.labels_updated`, `comment.updated` and `project.updated` events for the changes on each page. When too many imports are already running, the server answers 429 with `Retry-After: 1`. The integration must be active and verified. Requires the `task:create` and `task:update` workspace permissions and access to the project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "ID of the project whose linked repository to import from.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "ID of the import run to continue, from a previous response. Omit to resume the unfinished run or start a new one when the last run completed. A run ID that does not match the saved run returns 409.",
                    "example": "h7i3jtaehpaixygugf24uy51"
                  }
                },
                "required": [
                  "projectId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Completed import summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueImportResult"
                }
              }
            }
          },
          "202": {
            "description": "Saved import progress; continue with runId",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueImportResult"
                }
              }
            }
          },
          "400": {
            "description": "`projectId` is missing, or the integration is inactive, has an invalid configuration, or must be reconnected by a repository administrator",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:create or task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no GitHub integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Integration or import changed, or an imported label is being deleted; retry after resolving the conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Import busy; retry after one second",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "GitHub could not be reached, rate-limited the import, or returned an invalid page; progress is saved and a retry resumes it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/gitea-integration/repositories": {
      "post": {
        "operationId": "listGiteaRepositories",
        "tags": [
          "Gitea"
        ],
        "summary": "List Gitea repositories",
        "description": "Lists the repositories a Gitea token's user can reach, for picking one to link. Reads up to 50 pages of 50 repositories. Sent as a POST because the token travels in the body rather than the URL; the token is not stored. Requires the `workspace:manage_settings` workspace permission on the workspace of the project in `projectId`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of the project the Gitea repository is being linked to. Used to check workspace access.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  },
                  "baseUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Root URL of the Gitea instance, such as https://gitea.example.com. Must use http or https and must not contain credentials, a query or a fragment.",
                    "example": "https://gitea.example.com"
                  },
                  "accessToken": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Gitea personal access token used for this request only. It is not stored.",
                    "example": "example-gitea-access-token"
                  }
                },
                "required": [
                  "projectId",
                  "baseUrl",
                  "accessToken"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accessible repositories",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiteaRepositoryList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or Gitea rejected the token or could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/gitea-integration/verify": {
      "post": {
        "operationId": "verifyGiteaAccess",
        "tags": [
          "Gitea"
        ],
        "summary": "Verify Gitea access",
        "description": "Checks that the base URL is a Gitea instance and that the token can reach the repository with the permissions albus needs (push or admin access). A URL that is not Gitea, a redirect, a missing repository, or insufficient permissions are reported in a 200 body; a token Gitea rejects and other upstream errors return an error status. Omit accessToken to use the saved token for the unchanged base URL. Makes no changes. Requires the `workspace:manage_settings` workspace permission on the workspace of the project in `projectId`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of the project the Gitea repository is being linked to. Used to check workspace access.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  },
                  "baseUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Root URL of the Gitea instance, such as https://gitea.example.com. Must use http or https and must not contain credentials, a query or a fragment.",
                    "example": "https://gitea.example.com"
                  },
                  "accessToken": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Omit to verify with this project's saved token. The base URL must match the saved integration.",
                    "example": "example-gitea-access-token"
                  },
                  "repositoryOwner": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Login of the Gitea user or organization that owns the repository.",
                    "example": "acme"
                  },
                  "repositoryName": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Name of the Gitea repository without the owner.",
                    "example": "website"
                  }
                },
                "required": [
                  "projectId",
                  "baseUrl",
                  "repositoryOwner",
                  "repositoryName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiteaVerificationResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body or base URL, Gitea rejected the token, no token was sent and none is saved for this base URL, or the saved configuration is invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "albus authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "500": {
            "description": "Gitea verification failed with an unexpected upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/gitea-integration/project/{projectId}": {
      "get": {
        "operationId": "getGiteaIntegration",
        "tags": [
          "Gitea"
        ],
        "summary": "Get Gitea integration",
        "description": "Returns the Gitea integration for a project, or null when none is configured. The webhook secret is filled in only for callers with `workspace:manage_settings`; other callers get an empty string. Requires the `project:read` workspace permission and access to the project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Gitea integration details, or null",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiteaIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createGiteaIntegration",
        "tags": [
          "Gitea"
        ],
        "summary": "Create Gitea integration",
        "description": "Links a project to a Gitea repository and activates the integration, or reconnects an existing link. The token is checked against Gitea and must be able to read the repository; Gitea errors are returned with Gitea's status code. A repository already linked to another active project returns 409. A webhook secret is generated on first connect; add the webhook in Gitea afterwards using the returned `webhookUrl` and `webhookSecret`. Reconnecting keeps the webhook secret and sync rules but resets the other settings to their defaults. Use the verify route first to confirm the token really reaches the repository. Publishes an `integration.sync_rules_changed` event. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Root URL of the Gitea instance, such as https://gitea.example.com. Must use http or https and must not contain credentials, a query or a fragment.",
                    "example": "https://gitea.example.com"
                  },
                  "accessToken": {
                    "type": "string",
                    "description": "Gitea personal access token to store for the integration. Omit to keep the token already stored for this project; that is only allowed when the base URL is unchanged.",
                    "example": "example-gitea-access-token"
                  },
                  "repositoryOwner": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Login of the Gitea user or organization that owns the repository.",
                    "example": "acme"
                  },
                  "repositoryName": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Name of the Gitea repository without the owner.",
                    "example": "website"
                  }
                },
                "required": [
                  "baseUrl",
                  "repositoryOwner",
                  "repositoryName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiteaIntegration"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body or base URL, no token was sent and none is saved for this base URL, or the resulting settings failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateGiteaIntegration",
        "tags": [
          "Gitea"
        ],
        "summary": "Update Gitea integration",
        "description": "Updates the Gitea integration's settings. Omitted fields keep their current value. The update only applies if the stored settings did not change during the request. Publishes a `project.updated` event, and an `integration.sync_rules_changed` event when the integration is reactivated. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether the integration syncs. `false` pauses syncing without removing the link. Omit to keep the current value.",
                    "example": true
                  },
                  "commentTaskLinkOnGiteaIssue": {
                    "type": "boolean",
                    "description": "Whether to comment a link back to the task on the linked Gitea issue. Omit to keep the current value.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiteaIntegration"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or the resulting settings failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no Gitea integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Integration changed; refresh before updating settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteGiteaIntegration",
        "tags": [
          "Gitea"
        ],
        "summary": "Delete Gitea integration",
        "description": "Unlinks a project from its Gitea repository by deleting the integration, including its stored token and webhook secret. The webhook in Gitea is not removed; delete it there separately. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The integration was removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiteaDeleteResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no Gitea integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/gitea-integration/import-issues": {
      "post": {
        "operationId": "importGiteaIssues",
        "tags": [
          "Gitea"
        ],
        "summary": "Import Gitea issues",
        "description": "Imports the linked repository's open issues as tasks, with their labels and comments, and links open pull requests to the tasks their head branch names. Issues that already have a task are refreshed rather than duplicated, and issues the sync rules exclude are skipped. Runs to completion in one request, reading pages of 100 until a short page; a failed page or item is reported in `errors` instead of failing the request. Publishes `task.created`, `task.updated`, `task.labels_updated` and `comment.updated` events. The integration must be active. Requires the `task:create` and `task:update` workspace permissions and access to the project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "description": "ID of the project the integration belongs to.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  }
                },
                "required": [
                  "projectId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GiteaImportResult"
                }
              }
            }
          },
          "400": {
            "description": "`projectId` is missing, or the integration is inactive, has an invalid configuration, or has no access token or base URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:create or task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no Gitea integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/tangled-integration/project/{projectId}/outcome": {
      "get": {
        "operationId": "getTangledOutcome",
        "tags": [
          "Tangled"
        ],
        "summary": "Get the latest sanitized Tangled processing outcome",
        "description": "Returns the latest processing outcome of the project's Tangled connection, from either a webhook delivery or the scheduled branch reconciliation. Only the most recent outcome is kept, and no webhook payload is stored. Returns null before anything has been processed. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Latest outcome, or null before a delivery",
            "content": {
              "application/json": {
                "schema": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "eventType": {
                      "type": "string",
                      "enum": [
                        "push",
                        "pull_request",
                        "reconciliation"
                      ],
                      "description": "What was processed. `push`: a branch or tag push webhook. `pull_request`: a pull request webhook. `reconciliation`: the scheduled check of linked branches.",
                      "example": "push"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "applied",
                        "skipped",
                        "failed"
                      ],
                      "description": "Result of processing. `applied`: a task changed. `skipped`: nothing needed to change or the event is not supported. `failed`: the change could not be made; see `code`.",
                      "example": "applied"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "branch_linked",
                        "branch_unchanged",
                        "branch_missing",
                        "branch_unmatched",
                        "branch_conflict",
                        "task_not_found",
                        "tag_ignored",
                        "pull_request_unsupported",
                        "upstream_failed",
                        "repository_changed"
                      ],
                      "description": "Reason for the outcome. `branch_linked`: the branch was linked to its task. `branch_unchanged`: the link was already current. `branch_missing`: the branch no longer exists on Tangled. `branch_unmatched`: the branch name does not match the branch pattern. `branch_conflict`: the branch is already linked to another task. `task_not_found`: no task in the project has the number in the branch name. `tag_ignored`: tag pushes are ignored. `pull_request_unsupported`: pull request events are not applied. `upstream_failed`: the Tangled read API request failed. `repository_changed`: the repository DID now points to a different webhook repository identity.",
                      "example": "branch_linked"
                    },
                    "ref": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Full Git ref that was processed, such as `refs/heads/web-12`. Null for pull request events.",
                      "example": "refs/heads/web-12"
                    },
                    "checkedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the outcome was recorded, in UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "eventType",
                    "outcome",
                    "code",
                    "ref",
                    "checkedAt"
                  ],
                  "description": "The latest processing outcome of a Tangled connection. No webhook payload is stored."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no Tangled connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/tangled-integration/project/{projectId}": {
      "get": {
        "operationId": "getTangledProjectIntegration",
        "tags": [
          "Tangled"
        ],
        "summary": "Get Tangled project connection",
        "description": "Returns the project's Tangled connection, or null when none is configured. The webhook secret is never returned; `hasSecret` says whether one is stored. Requires the `project:read` workspace permission and access to the project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Tangled connection, or null when disconnected",
            "content": {
              "application/json": {
                "schema": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "integrationId": {
                      "type": "string",
                      "description": "ID of the integration. Also the last segment of `webhookUrl`.",
                      "example": "rmj63dhunda6v4ufepcb35cq"
                    },
                    "webhookUrl": {
                      "type": "string",
                      "description": "Public URL for signed Tangled webhook deliveries"
                    },
                    "baseUrl": {
                      "type": "string",
                      "description": "HTTPS origin of the Tangled read API.",
                      "example": "https://tangled.example.com"
                    },
                    "repositoryId": {
                      "type": "string",
                      "description": "Webhook repository identity: owner DID followed by / and the repository name. Deliveries must name this repository.",
                      "example": "did:plc:acmeexampleowner0000000/website"
                    },
                    "repositoryDid": {
                      "type": "string",
                      "description": "Stable DID of the repository, used to read it from the Tangled read API.",
                      "example": "did:plc:websiterepoexample000000"
                    },
                    "repositoryUrl": {
                      "type": "string",
                      "description": "HTTPS URL of the repository's web page, used to build branch links.",
                      "example": "https://tangled.example.com/acme.example.com/website"
                    },
                    "branchPattern": {
                      "type": "string",
                      "description": "Template that branch names must follow to be linked to a task, such as `{slug}-{number}`.",
                      "example": "{slug}-{number}"
                    },
                    "isActive": {
                      "type": "boolean",
                      "description": "Whether webhook deliveries are processed.",
                      "example": true
                    },
                    "hasSecret": {
                      "type": "boolean",
                      "description": "Whether a webhook secret is stored. The secret itself is never returned.",
                      "example": true
                    }
                  },
                  "required": [
                    "integrationId",
                    "webhookUrl",
                    "baseUrl",
                    "repositoryId",
                    "repositoryDid",
                    "repositoryUrl",
                    "branchPattern",
                    "isActive",
                    "hasSecret"
                  ],
                  "description": "A project's connection to a Tangled repository. The webhook secret is never returned."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createTangledProjectIntegration",
        "tags": [
          "Tangled"
        ],
        "summary": "Connect a Tangled repository",
        "description": "Connects a project to a Tangled repository. When `isActive` is `true`, the repository is first read from the Tangled read API at `baseUrl` by `repositoryDid`, and its webhook identity must match `repositoryId`. A project can have one Tangled connection. After connecting, add a webhook in Tangled that posts to the returned `webhookUrl` with the same secret. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "minLength": 1,
                    "description": "HTTPS origin of the Tangled read API, for example https://api.tangled.org. Must be a hostname on port 443 with no path, trailing slash, query or credentials.",
                    "example": "https://tangled.example.com"
                  },
                  "repositoryDid": {
                    "type": "string",
                    "pattern": "^did:[a-z0-9]+:[A-Za-z0-9._:%-]+$",
                    "description": "Stable repository DID, distinct from the webhook repository identity. Used to read the repository from the Tangled read API. Cannot be changed after connecting."
                  },
                  "repositoryId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Webhook repository.full_name: owner DID followed by / and the lowercased repository name. Deliveries for any other repository are rejected.",
                    "example": "did:plc:acmeexampleowner0000000/website"
                  },
                  "repositoryUrl": {
                    "type": "string",
                    "minLength": 1,
                    "description": "HTTPS URL of the repository's web page, without credentials. Branch links on tasks point to `<repositoryUrl>/tree/<branch>`.",
                    "example": "https://tangled.example.com/acme.example.com/website"
                  },
                  "branchPattern": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Template that branch names must follow to be linked to a task. One of `{slug}-{number}`, `{slug}-{number}-{title}`, `{number}`, `{number}-{title}`, `feature/{slug}-{number}`, `feature/{number}-{title}`, `fix/{slug}-{number}` or `fix/{number}-{title}`, where `{slug}` is the project slug, `{number}` the task number and `{title}` the task title.",
                    "example": "{slug}-{number}"
                  },
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether webhook deliveries are processed. When `true`, the repository is verified against the Tangled read API before saving. Deliveries to an inactive connection return 404.",
                    "example": true
                  },
                  "webhookSecret": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Shared secret used to check the HMAC-SHA256 signature of each webhook delivery. Enter the same value in Tangled. Write-only: it is never returned, and `hasSecret` reports whether one is stored.",
                    "example": "example-webhook-secret"
                  }
                },
                "required": [
                  "baseUrl",
                  "repositoryDid",
                  "repositoryId",
                  "repositoryUrl",
                  "branchPattern",
                  "isActive",
                  "webhookSecret"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored Tangled connection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integrationId": {
                      "type": "string",
                      "description": "ID of the integration. Also the last segment of `webhookUrl`.",
                      "example": "rmj63dhunda6v4ufepcb35cq"
                    },
                    "webhookUrl": {
                      "type": "string",
                      "description": "Public URL for signed Tangled webhook deliveries"
                    },
                    "baseUrl": {
                      "type": "string",
                      "description": "HTTPS origin of the Tangled read API.",
                      "example": "https://tangled.example.com"
                    },
                    "repositoryId": {
                      "type": "string",
                      "description": "Webhook repository identity: owner DID followed by / and the repository name. Deliveries must name this repository.",
                      "example": "did:plc:acmeexampleowner0000000/website"
                    },
                    "repositoryDid": {
                      "type": "string",
                      "description": "Stable DID of the repository, used to read it from the Tangled read API.",
                      "example": "did:plc:websiterepoexample000000"
                    },
                    "repositoryUrl": {
                      "type": "string",
                      "description": "HTTPS URL of the repository's web page, used to build branch links.",
                      "example": "https://tangled.example.com/acme.example.com/website"
                    },
                    "branchPattern": {
                      "type": "string",
                      "description": "Template that branch names must follow to be linked to a task, such as `{slug}-{number}`.",
                      "example": "{slug}-{number}"
                    },
                    "isActive": {
                      "type": "boolean",
                      "description": "Whether webhook deliveries are processed.",
                      "example": true
                    },
                    "hasSecret": {
                      "type": "boolean",
                      "description": "Whether a webhook secret is stored. The secret itself is never returned.",
                      "example": true
                    }
                  },
                  "required": [
                    "integrationId",
                    "webhookUrl",
                    "baseUrl",
                    "repositoryId",
                    "repositoryDid",
                    "repositoryUrl",
                    "branchPattern",
                    "isActive",
                    "hasSecret"
                  ],
                  "description": "A project's connection to a Tangled repository. The webhook secret is never returned."
                }
              }
            }
          },
          "400": {
            "description": "Invalid body or connection settings, or the repository's webhook identity does not match `repositoryId`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The project already has a Tangled connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The Tangled read API could not be reached or did not return the repository; check `baseUrl` and `repositoryDid`, then retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateTangledProjectIntegration",
        "tags": [
          "Tangled"
        ],
        "summary": "Update Tangled project connection",
        "description": "Updates the project's Tangled connection. Send at least one field; omitted fields keep their current values, and omitting `webhookSecret` keeps the stored secret. `repositoryDid` cannot change; disconnect and reconnect to use another repository. When the resulting connection is active, the repository is verified again against the Tangled read API. The update only applies if the connection did not change during the request. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "minLength": 1,
                    "description": "HTTPS origin of the Tangled read API, for example https://api.tangled.org. Must be a hostname on port 443 with no path, trailing slash, query or credentials.",
                    "example": "https://tangled.example.com"
                  },
                  "repositoryDid": {
                    "type": "string",
                    "pattern": "^did:[a-z0-9]+:[A-Za-z0-9._:%-]+$",
                    "description": "Stable repository DID, distinct from the webhook repository identity. Used to read the repository from the Tangled read API. Cannot be changed after connecting."
                  },
                  "repositoryId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Webhook repository.full_name: owner DID followed by / and the lowercased repository name. Deliveries for any other repository are rejected.",
                    "example": "did:plc:acmeexampleowner0000000/website"
                  },
                  "repositoryUrl": {
                    "type": "string",
                    "minLength": 1,
                    "description": "HTTPS URL of the repository's web page, without credentials. Branch links on tasks point to `<repositoryUrl>/tree/<branch>`.",
                    "example": "https://tangled.example.com/acme.example.com/website"
                  },
                  "branchPattern": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Template that branch names must follow to be linked to a task. One of `{slug}-{number}`, `{slug}-{number}-{title}`, `{number}`, `{number}-{title}`, `feature/{slug}-{number}`, `feature/{number}-{title}`, `fix/{slug}-{number}` or `fix/{number}-{title}`, where `{slug}` is the project slug, `{number}` the task number and `{title}` the task title.",
                    "example": "{slug}-{number}"
                  },
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether webhook deliveries are processed. When `true`, the repository is verified against the Tangled read API before saving. Deliveries to an inactive connection return 404.",
                    "example": true
                  },
                  "webhookSecret": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Shared secret used to check the HMAC-SHA256 signature of each webhook delivery. Enter the same value in Tangled. Write-only: it is never returned, and `hasSecret` reports whether one is stored.",
                    "example": "example-webhook-secret"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated Tangled connection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integrationId": {
                      "type": "string",
                      "description": "ID of the integration. Also the last segment of `webhookUrl`.",
                      "example": "rmj63dhunda6v4ufepcb35cq"
                    },
                    "webhookUrl": {
                      "type": "string",
                      "description": "Public URL for signed Tangled webhook deliveries"
                    },
                    "baseUrl": {
                      "type": "string",
                      "description": "HTTPS origin of the Tangled read API.",
                      "example": "https://tangled.example.com"
                    },
                    "repositoryId": {
                      "type": "string",
                      "description": "Webhook repository identity: owner DID followed by / and the repository name. Deliveries must name this repository.",
                      "example": "did:plc:acmeexampleowner0000000/website"
                    },
                    "repositoryDid": {
                      "type": "string",
                      "description": "Stable DID of the repository, used to read it from the Tangled read API.",
                      "example": "did:plc:websiterepoexample000000"
                    },
                    "repositoryUrl": {
                      "type": "string",
                      "description": "HTTPS URL of the repository's web page, used to build branch links.",
                      "example": "https://tangled.example.com/acme.example.com/website"
                    },
                    "branchPattern": {
                      "type": "string",
                      "description": "Template that branch names must follow to be linked to a task, such as `{slug}-{number}`.",
                      "example": "{slug}-{number}"
                    },
                    "isActive": {
                      "type": "boolean",
                      "description": "Whether webhook deliveries are processed.",
                      "example": true
                    },
                    "hasSecret": {
                      "type": "boolean",
                      "description": "Whether a webhook secret is stored. The secret itself is never returned.",
                      "example": true
                    }
                  },
                  "required": [
                    "integrationId",
                    "webhookUrl",
                    "baseUrl",
                    "repositoryId",
                    "repositoryDid",
                    "repositoryUrl",
                    "branchPattern",
                    "isActive",
                    "hasSecret"
                  ],
                  "description": "A project's connection to a Tangled repository. The webhook secret is never returned."
                }
              }
            }
          },
          "400": {
            "description": "Empty body, invalid resulting connection settings, or the repository's webhook identity does not match `repositoryId`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no Tangled connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Connection changed, or a different repository DID requires disconnecting and reconnecting",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The Tangled read API could not be reached or did not return the repository; check `baseUrl` and `repositoryDid`, then retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteTangledProjectIntegration",
        "tags": [
          "Tangled"
        ],
        "summary": "Disconnect Tangled project",
        "description": "Disconnects the project from Tangled by deleting the connection and its stored webhook secret. Later deliveries to its webhook URL return 404. Publishes a `project.updated` event. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Disconnected Tangled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true` when the connection was removed.",
                      "example": true
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "description": "Confirmation that a Tangled connection was removed."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no Tangled connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/gitlab-integration/projects": {
      "post": {
        "operationId": "listGitlabProjects",
        "tags": [
          "GitLab"
        ],
        "summary": "List GitLab projects",
        "description": "Lists the projects a GitLab token is a member of, most recently active first, for picking one to link. Reads up to 50 pages of 50 projects. Sent as a POST because the token travels in the body rather than the URL; the token is not stored. Requires the `workspace:manage_settings` workspace permission on the workspace of the project in `projectId`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of the project the GitLab project is being linked to. Used to check workspace access.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  },
                  "baseUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Root URL of the GitLab instance, such as https://gitlab.example.com. Trailing slashes are removed. It must not contain a query, fragment or credentials, and plain http is refused unless the server allows private network destinations.",
                    "example": "https://gitlab.example.com"
                  },
                  "accessToken": {
                    "type": "string",
                    "minLength": 1,
                    "description": "GitLab access token used for this request only. It is not stored.",
                    "example": "example-gitlab-access-token"
                  },
                  "tokenType": {
                    "type": "string",
                    "enum": [
                      "private",
                      "bearer"
                    ],
                    "description": "`private` sends the token in PRIVATE-TOKEN, which is what personal, project and group access tokens expect. `bearer` sends it in Authorization, for an OAuth2 token you already hold. Defaults to `private`.",
                    "example": "private"
                  }
                },
                "required": [
                  "projectId",
                  "baseUrl",
                  "accessToken"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Accessible projects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitlabProjectList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or an invalid GitLab base URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "GitLab rejected the token, or the instance is unreachable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/gitlab-integration/verify": {
      "post": {
        "operationId": "verifyGitlabAccess",
        "tags": [
          "GitLab"
        ],
        "summary": "Verify GitLab access",
        "description": "Checks that the base URL is a GitLab instance and that the token can reach the project with the permissions albus needs (the Developer role or higher). A URL that is not GitLab, a redirect, a missing project, or insufficient permissions are reported in a 200 body so the form can explain them; a token GitLab rejects outright is a 401. Makes no changes and does not store the token. Requires the `workspace:manage_settings` workspace permission on the workspace of the project in `projectId`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of the project the GitLab project is being linked to. Used to check workspace access.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  },
                  "baseUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Root URL of the GitLab instance, such as https://gitlab.example.com. Trailing slashes are removed. It must not contain a query, fragment or credentials, and plain http is refused unless the server allows private network destinations.",
                    "example": "https://gitlab.example.com"
                  },
                  "accessToken": {
                    "type": "string",
                    "minLength": 1,
                    "description": "GitLab access token used for this request only. It is not stored.",
                    "example": "example-gitlab-access-token"
                  },
                  "tokenType": {
                    "type": "string",
                    "enum": [
                      "private",
                      "bearer"
                    ],
                    "description": "`private` sends the token in PRIVATE-TOKEN, which is what personal, project and group access tokens expect. `bearer` sends it in Authorization, for an OAuth2 token you already hold. Defaults to `private`.",
                    "example": "private"
                  },
                  "projectPath": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Full path of the GitLab project, including any nested groups, for example acme/platform/web.",
                    "example": "acme/platform/web"
                  }
                },
                "required": [
                  "projectId",
                  "baseUrl",
                  "accessToken",
                  "projectPath"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitlabVerificationResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, an invalid GitLab base URL, or a project path without a namespace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "GitLab rejected the token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/gitlab-integration/project/{projectId}": {
      "get": {
        "operationId": "getGitlabIntegration",
        "tags": [
          "GitLab"
        ],
        "summary": "Get GitLab integration",
        "description": "Returns the GitLab integration for a project, or null when none is configured. The masked access token and the webhook secret are filled in only for callers with `workspace:manage_settings`; other callers get empty strings. Requires the `project:read` workspace permission and access to the project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "GitLab integration details, or null",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitlabIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createGitlabIntegration",
        "tags": [
          "GitLab"
        ],
        "summary": "Create GitLab integration",
        "description": "Links a project to a GitLab project and activates the integration, or reconnects an existing link. The token is checked against GitLab and must be able to read the project; GitLab errors are returned with GitLab's status code. albus generates the secret GitLab must send with each webhook; add the webhook in GitLab afterwards using the returned `webhookUrl` and `webhookSecret`. Reconnecting keeps the webhook secret and the existing settings. Use the verify route first to confirm the token really reaches the project. Publishes an `integration.sync_rules_changed` event. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Root URL of the GitLab instance, such as https://gitlab.example.com. Trailing slashes are removed. It must not contain a query, fragment or credentials, and plain http is refused unless the server allows private network destinations.",
                    "example": "https://gitlab.example.com"
                  },
                  "accessToken": {
                    "type": "string",
                    "description": "Omit to keep the stored token only when the GitLab base URL is unchanged. A changed URL requires a new token.",
                    "example": "example-gitlab-access-token"
                  },
                  "tokenType": {
                    "type": "string",
                    "enum": [
                      "private",
                      "bearer"
                    ],
                    "description": "`private` sends the token in PRIVATE-TOKEN, which is what personal, project and group access tokens expect. `bearer` sends it in Authorization, for an OAuth2 token you already hold. Defaults to `private`.",
                    "example": "private"
                  },
                  "projectPath": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Full path of the GitLab project to link, including any nested groups. Must include a namespace and no `.` or `..` segments.",
                    "example": "acme/platform/web"
                  }
                },
                "required": [
                  "baseUrl",
                  "projectPath"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitlabIntegration"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, base URL or project path, no access token, or a new token is required because the GitLab URL changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the caller is not a member of its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "That GitLab project is already linked to another active albus project, or the integration changed during the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateGitlabIntegration",
        "tags": [
          "GitLab"
        ],
        "summary": "Update GitLab integration",
        "description": "Updates the GitLab integration's settings. Omitted fields keep their current value. The update only applies if the stored settings did not change during the request. Publishes a `project.updated` event, and an `integration.sync_rules_changed` event when the integration is reactivated. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether the integration syncs. `false` pauses syncing without removing the link. Omit to keep the current value.",
                    "example": true
                  },
                  "commentTaskLinkOnGitlabIssue": {
                    "type": "boolean",
                    "description": "Whether to comment a link back to the task on each issue opened in GitLab. Omit to keep the current value.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitlabIntegration"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or the resulting settings failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no GitLab integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Integration changed; refresh before updating settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteGitlabIntegration",
        "tags": [
          "GitLab"
        ],
        "summary": "Delete GitLab integration",
        "description": "Unlinks a project from its GitLab project by deleting the integration, including its stored token and webhook secret. The webhook in GitLab is not removed; delete it there separately. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The integration was removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitlabDeleteResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing workspace:manage_settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no GitLab integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/gitlab-integration/import-issues": {
      "post": {
        "operationId": "importGitlabIssues",
        "tags": [
          "GitLab"
        ],
        "summary": "Import GitLab issues",
        "description": "Imports the linked project's open issues as tasks, oldest first, with their labels and comments, and links open merge requests to the tasks their source branch names. Issues that already have a task are refreshed rather than duplicated. Confidential issues and issues the sync rules exclude are skipped. Runs to completion in one request, reading up to 50 pages of 100 issues and 50 pages of 100 merge requests; a failed page or item is reported in `errors` instead of failing the request. Publishes `task.created`, `task.updated`, `task.labels_updated` and `comment.updated` events. The integration must be active. Requires the `task:create` and `task:update` workspace permissions and access to the project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "description": "ID of the project the integration belongs to.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  }
                },
                "required": [
                  "projectId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitlabImportResult"
                }
              }
            }
          },
          "400": {
            "description": "`projectId` is missing, or the integration is inactive, has an invalid configuration, or has no access token or base URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:create or task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, the caller is not a member of its workspace, or the project has no GitLab integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/generic-webhook-integration/project/{projectId}": {
      "get": {
        "operationId": "getGenericWebhookIntegration",
        "tags": [
          "Generic Webhook"
        ],
        "summary": "Get webhook integration",
        "description": "Returns the project's outgoing webhook integration, or `null` when none is configured. Requires access to the project and the `project:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The webhook integration, or null when the project has none",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericWebhookIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `project:read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createGenericWebhookIntegration",
        "tags": [
          "Generic Webhook"
        ],
        "summary": "Create webhook integration",
        "description": "Creates the project's outgoing webhook, or replaces it when one exists. A replace overwrites the URL, secret, event toggles and reminder lead time and turns the webhook back on. albus POSTs the selected task events to this URL, signed with the secret when one is set. The URL's host is checked but the URL is not called, so delivery failures show up only when an event is sent. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "minLength": 1,
                    "description": "URL that receives each selected task event as a JSON POST request. It must use http or https, and its host must resolve to a public address unless the server is configured to allow private destinations. It is a credential: responses show it only masked.",
                    "example": "https://hooks.example.com/task-events"
                  },
                  "secret": {
                    "type": "string",
                    "description": "Optional HMAC secret used to sign outgoing deliveries: each request then carries an `X-albus-Signature` header with the hex-encoded HMAC-SHA256 of the raw body. Surrounding spaces are trimmed, and an empty secret is stored as unset. Responses show it only masked.",
                    "example": "example-signing-secret-not-real"
                  },
                  "events": {
                    "type": "object",
                    "properties": {
                      "taskCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
                        "example": true
                      },
                      "taskStatusChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
                        "example": true
                      },
                      "taskPriorityChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskTitleChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskDescriptionChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskCommentCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
                        "example": true
                      },
                      "taskDeleted": {
                        "type": "boolean",
                        "description": "Whether a `task.deleted` event is delivered when a task is deleted. Defaults to `false`.",
                        "example": false
                      },
                      "taskMoved": {
                        "type": "boolean",
                        "description": "Whether a `task.moved` event is delivered when a task is moved to another project. Defaults to `false`.",
                        "example": false
                      },
                      "taskDueDateChanged": {
                        "type": "boolean",
                        "description": "Whether a `task.due_date_changed` event is delivered when a task's due date is set, changed or cleared. Defaults to `false`.",
                        "example": false
                      },
                      "taskAssigneeChanged": {
                        "type": "boolean",
                        "description": "Whether a `task.assignee_changed` event is delivered when a task is assigned to someone. Defaults to `false`.",
                        "example": false
                      },
                      "taskUnassigned": {
                        "type": "boolean",
                        "description": "Whether a `task.unassigned` event is delivered when a task's assignee is removed. Defaults to `false`.",
                        "example": false
                      },
                      "dueDateReminder": {
                        "type": "boolean",
                        "description": "Whether a `task.due_date_reminder` event is delivered `dueDateReminderLeadTimeMinutes` before a task's due date. Tasks in a final column and archived tasks are skipped, and each task is reminded once per integration. Defaults to `false`.",
                        "example": false
                      }
                    },
                    "description": "Event toggles to set. Keys you omit use their default."
                  },
                  "dueDateReminderLeadTimeMinutes": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 43200,
                    "description": "Minutes before a task's due date that the `task.due_date_reminder` event is delivered, between 5 minutes and 30 days (43,200). Defaults to 1,440 (one day) on create; omit it on update to keep the current value.",
                    "example": 1440
                  }
                },
                "required": [
                  "webhookUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericWebhookIntegration"
                }
              }
            }
          },
          "400": {
            "description": "The webhook URL is not an http or https URL, its host could not be resolved, or it resolves to a non-routable address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateGenericWebhookIntegration",
        "tags": [
          "Generic Webhook"
        ],
        "summary": "Update webhook integration",
        "description": "Updates the project's outgoing webhook. Omitted fields keep their current value, event toggles merge into the existing set, and a null secret clears it. The resulting settings are validated as a whole, including the destination check on the URL. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "description": "New webhook URL. Omit it, or send an empty string, to keep the current URL.",
                    "example": "https://hooks.example.com/task-events"
                  },
                  "secret": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "New signing secret. Send null or an empty string to remove the signing secret so deliveries are unsigned; omit it to keep the current secret.",
                    "example": "example-signing-secret-not-real"
                  },
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether the webhook receives deliveries. Send `false` to pause it without losing its settings. Omit it to keep the current value.",
                    "example": true
                  },
                  "events": {
                    "type": "object",
                    "properties": {
                      "taskCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
                        "example": true
                      },
                      "taskStatusChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
                        "example": true
                      },
                      "taskPriorityChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskTitleChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskDescriptionChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskCommentCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
                        "example": true
                      },
                      "taskDeleted": {
                        "type": "boolean",
                        "description": "Whether a `task.deleted` event is delivered when a task is deleted. Defaults to `false`.",
                        "example": false
                      },
                      "taskMoved": {
                        "type": "boolean",
                        "description": "Whether a `task.moved` event is delivered when a task is moved to another project. Defaults to `false`.",
                        "example": false
                      },
                      "taskDueDateChanged": {
                        "type": "boolean",
                        "description": "Whether a `task.due_date_changed` event is delivered when a task's due date is set, changed or cleared. Defaults to `false`.",
                        "example": false
                      },
                      "taskAssigneeChanged": {
                        "type": "boolean",
                        "description": "Whether a `task.assignee_changed` event is delivered when a task is assigned to someone. Defaults to `false`.",
                        "example": false
                      },
                      "taskUnassigned": {
                        "type": "boolean",
                        "description": "Whether a `task.unassigned` event is delivered when a task's assignee is removed. Defaults to `false`.",
                        "example": false
                      },
                      "dueDateReminder": {
                        "type": "boolean",
                        "description": "Whether a `task.due_date_reminder` event is delivered `dueDateReminderLeadTimeMinutes` before a task's due date. Tasks in a final column and archived tasks are skipped, and each task is reminded once per integration. Defaults to `false`.",
                        "example": false
                      }
                    },
                    "description": "Event toggles to change. Keys you omit keep their current value."
                  },
                  "dueDateReminderLeadTimeMinutes": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 43200,
                    "description": "Minutes before a task's due date that the `task.due_date_reminder` event is delivered, between 5 minutes and 30 days (43,200). Defaults to 1,440 (one day) on create; omit it on update to keep the current value.",
                    "example": 1440
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericWebhookIntegration"
                }
              }
            }
          },
          "400": {
            "description": "The resulting URL is not an http or https URL, its host could not be resolved, or it resolves to a non-routable address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no outgoing webhook (`Generic webhook integration not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteGenericWebhookIntegration",
        "tags": [
          "Generic Webhook"
        ],
        "summary": "Delete webhook integration",
        "description": "Deletes the project's outgoing webhook and its settings. No further events are delivered. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The integration was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Always `true` when the integration was removed.",
                      "example": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no outgoing webhook (`Generic webhook integration not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/discord-integration/project/{projectId}": {
      "get": {
        "operationId": "getDiscordIntegration",
        "tags": [
          "Discord"
        ],
        "summary": "Get Discord integration",
        "description": "Returns the project's Discord integration, or `null` when none is configured. Requires access to the project and the `project:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The Discord integration, or null when the project has none",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `project:read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createDiscordIntegration",
        "tags": [
          "Discord"
        ],
        "summary": "Create Discord integration",
        "description": "Creates the project's Discord integration, or replaces it when one exists. A replace overwrites the webhook URL, channel name and event toggles and turns the integration back on. The webhook URL is checked against Discord's webhook format but not called, so delivery failures show up only when an event is posted. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Discord webhook URL, in the form `https://discord.com/api/webhooks/{id}/{token}`. The `discordapp.com` host is also accepted. It is a credential: responses show it only masked.",
                    "example": "https://discord.com/api/webhooks/123456789012345678/EXAMPLE-not-a-real-token"
                  },
                  "channelName": {
                    "type": "string",
                    "description": "Name of the Discord channel, shown in the integration settings. It does not change where messages go: Discord posts to the channel the webhook was created for. Surrounding spaces are trimmed, and an empty name is stored as unset.",
                    "example": "#releases"
                  },
                  "events": {
                    "type": "object",
                    "properties": {
                      "taskCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
                        "example": true
                      },
                      "taskStatusChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
                        "example": true
                      },
                      "taskPriorityChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskTitleChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskDescriptionChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskCommentCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
                        "example": true
                      }
                    },
                    "description": "Event toggles to set. Keys you omit use their default."
                  }
                },
                "required": [
                  "webhookUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordIntegration"
                }
              }
            }
          },
          "400": {
            "description": "The webhook URL is not a Discord webhook URL (`Enter a valid Discord webhook URL`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateDiscordIntegration",
        "tags": [
          "Discord"
        ],
        "summary": "Update Discord integration",
        "description": "Updates the project's Discord integration. Omitted fields keep their current value, and the event toggles sent are merged into the stored set. The resulting settings are validated as a whole. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "description": "New Discord webhook URL. Omit it, or send an empty string, to keep the current URL.",
                    "example": "https://discord.com/api/webhooks/123456789012345678/EXAMPLE-not-a-real-token"
                  },
                  "channelName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "New channel name for the settings display. Send null or an empty string to clear it; omit it to keep the current name.",
                    "example": "#releases"
                  },
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether the integration posts messages. Send `false` to pause it without losing its settings. Omit it to keep the current value.",
                    "example": true
                  },
                  "events": {
                    "type": "object",
                    "properties": {
                      "taskCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
                        "example": true
                      },
                      "taskStatusChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
                        "example": true
                      },
                      "taskPriorityChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskTitleChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskDescriptionChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskCommentCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
                        "example": true
                      }
                    },
                    "description": "Event toggles to change. Keys you omit keep their current value."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscordIntegration"
                }
              }
            }
          },
          "400": {
            "description": "The resulting webhook URL is not a Discord webhook URL (`Enter a valid Discord webhook URL`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no Discord integration (`Discord integration not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteDiscordIntegration",
        "tags": [
          "Discord"
        ],
        "summary": "Delete Discord integration",
        "description": "Deletes the project's Discord integration and its settings. No further messages are posted. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The integration was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Always `true` when the integration was removed.",
                      "example": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no Discord integration (`Discord integration not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/mattermost-integration/project/{projectId}": {
      "get": {
        "operationId": "getMattermostIntegration",
        "tags": [
          "Mattermost"
        ],
        "summary": "Get Mattermost integration",
        "description": "Returns the project's Mattermost integration, or `null` when none is configured. Requires access to the project and the `project:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The Mattermost integration, or null when the project has none",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MattermostIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `project:read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createMattermostIntegration",
        "tags": [
          "Mattermost"
        ],
        "summary": "Create Mattermost integration",
        "description": "Creates the project's Mattermost integration, or replaces it when one exists. A replace overwrites the webhook URL, channel name and event toggles and turns the integration back on. The webhook URL must use HTTPS and its host is resolved to check that it is a public address, but the webhook is not called, so delivery failures show up only when an event is posted. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Mattermost incoming webhook URL. It must use HTTPS, and its host must resolve to a public address unless the server is configured to allow private destinations. It is a credential: responses show it only masked.",
                    "example": "https://chat.example.com/hooks/xxxxxxxxxxxxxxxxxxxxxxxxxx"
                  },
                  "channelName": {
                    "type": "string",
                    "description": "Name of the Mattermost channel, shown in the integration settings. It does not change where messages go: Mattermost posts to the channel the webhook was created for. Surrounding spaces are trimmed, and an empty name is stored as unset.",
                    "example": "town-square"
                  },
                  "events": {
                    "type": "object",
                    "properties": {
                      "taskCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
                        "example": true
                      },
                      "taskStatusChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
                        "example": true
                      },
                      "taskPriorityChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskTitleChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskDescriptionChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskCommentCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
                        "example": true
                      }
                    },
                    "description": "Event toggles to set. Keys you omit use their default."
                  }
                },
                "required": [
                  "webhookUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MattermostIntegration"
                }
              }
            }
          },
          "400": {
            "description": "The webhook URL does not use HTTPS, its host could not be resolved, or it resolves to a non-routable address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateMattermostIntegration",
        "tags": [
          "Mattermost"
        ],
        "summary": "Update Mattermost integration",
        "description": "Updates the project's Mattermost integration. Omitted fields keep their current value, and the event toggles sent are merged into the stored set. The resulting settings are validated as a whole, including the destination check on the webhook URL. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "description": "New Mattermost incoming webhook URL, trimmed before validation. Omit it to keep the current URL.",
                    "example": "https://chat.example.com/hooks/xxxxxxxxxxxxxxxxxxxxxxxxxx"
                  },
                  "channelName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "New channel name for the settings display. Send null or an empty string to clear it; omit it to keep the current name.",
                    "example": "town-square"
                  },
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether the integration posts messages. Send `false` to pause it without losing its settings. Omit it to keep the current value.",
                    "example": true
                  },
                  "events": {
                    "type": "object",
                    "properties": {
                      "taskCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
                        "example": true
                      },
                      "taskStatusChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
                        "example": true
                      },
                      "taskPriorityChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskTitleChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskDescriptionChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskCommentCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
                        "example": true
                      }
                    },
                    "description": "Event toggles to change. Keys you omit keep their current value."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MattermostIntegration"
                }
              }
            }
          },
          "400": {
            "description": "The resulting webhook URL does not use HTTPS, its host could not be resolved, or it resolves to a non-routable address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no Mattermost integration (`Mattermost integration not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteMattermostIntegration",
        "tags": [
          "Mattermost"
        ],
        "summary": "Delete Mattermost integration",
        "description": "Deletes the project's Mattermost integration and its settings. No further messages are posted. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The integration was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Always `true` when the integration was removed.",
                      "example": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no Mattermost integration (`Mattermost integration not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/slack-integration/project/{projectId}": {
      "get": {
        "operationId": "getSlackIntegration",
        "tags": [
          "Slack"
        ],
        "summary": "Get Slack integration",
        "description": "Returns the project's Slack integration, or `null` when none is configured. Requires access to the project and the `project:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The Slack integration, or null when the project has none",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `project:read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createSlackIntegration",
        "tags": [
          "Slack"
        ],
        "summary": "Create Slack integration",
        "description": "Creates the project's Slack integration, or replaces it when one exists. A replace overwrites the webhook URL, channel name and event toggles and turns the integration back on. The webhook URL is checked against Slack's incoming webhook format but not called, so delivery failures show up only when an event is posted. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Slack incoming webhook URL, in the form `https://hooks.slack.com/services/{team}/{bot}/{secret}`. It is a credential: responses show it only masked.",
                    "example": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
                  },
                  "channelName": {
                    "type": "string",
                    "description": "Name of the Slack channel, shown in the integration settings. It does not change where messages go: Slack posts to the channel the webhook was created for. Surrounding spaces are trimmed, and an empty name is stored as unset.",
                    "example": "#releases"
                  },
                  "events": {
                    "type": "object",
                    "properties": {
                      "taskCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
                        "example": true
                      },
                      "taskStatusChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
                        "example": true
                      },
                      "taskPriorityChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskTitleChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskDescriptionChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskCommentCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
                        "example": true
                      }
                    },
                    "description": "Event toggles to set. Keys you omit use their default."
                  }
                },
                "required": [
                  "webhookUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackIntegration"
                }
              }
            }
          },
          "400": {
            "description": "The webhook URL is not a Slack incoming webhook URL (`Invalid Slack webhook URL`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateSlackIntegration",
        "tags": [
          "Slack"
        ],
        "summary": "Update Slack integration",
        "description": "Updates the project's Slack integration. Omitted fields keep their current value, and the event toggles sent are merged into the stored set. The resulting settings are validated as a whole. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "description": "New Slack incoming webhook URL. Omit it, or send an empty string, to keep the current URL.",
                    "example": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
                  },
                  "channelName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "New channel name for the settings display. Send null or an empty string to clear it; omit it to keep the current name.",
                    "example": "#releases"
                  },
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether the integration posts messages. Send `false` to pause it without losing its settings. Omit it to keep the current value.",
                    "example": true
                  },
                  "events": {
                    "type": "object",
                    "properties": {
                      "taskCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
                        "example": true
                      },
                      "taskStatusChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
                        "example": true
                      },
                      "taskPriorityChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskTitleChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskDescriptionChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskCommentCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
                        "example": true
                      }
                    },
                    "description": "Event toggles to change. Keys you omit keep their current value."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlackIntegration"
                }
              }
            }
          },
          "400": {
            "description": "The resulting webhook URL is not a Slack incoming webhook URL (`Invalid Slack webhook URL`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no Slack integration (`Slack integration not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteSlackIntegration",
        "tags": [
          "Slack"
        ],
        "summary": "Delete Slack integration",
        "description": "Deletes the project's Slack integration and its settings. No further messages are posted. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The integration was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Always `true` when the integration was removed.",
                      "example": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no Slack integration (`Slack integration not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/telegram-integration/project/{projectId}": {
      "get": {
        "operationId": "getTelegramIntegration",
        "tags": [
          "Telegram"
        ],
        "summary": "Get Telegram integration",
        "description": "Returns the project's Telegram integration, or `null` when none is configured. Requires access to the project and the `project:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The Telegram integration, or null when the project has none",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `project:read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createTelegramIntegration",
        "tags": [
          "Telegram"
        ],
        "summary": "Create Telegram integration",
        "description": "Creates the project's Telegram integration, or replaces it when one exists. A replace overwrites every setting but keeps the current `isActive` value. The bot token and chat are checked for format only; nothing is sent to Telegram. A custom serverUrl must use https unless private destinations are allowed. Publishes an `integration.created` event, or `integration.updated` when replacing. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botToken": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Telegram bot token from BotFather: an 8 to 10 digit bot ID, a colon, then 35 letters, digits, `_` or `-`. It is a credential: responses show it only masked.",
                    "example": "123456789:AAExampleTokenNotReal_0123456789abc"
                  },
                  "serverUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Base URL of your own Telegram Bot API server, using http or https, without a query, fragment, or credentials. Trailing slashes are removed. Because the bot token travels in the request path, plain http is accepted only when the server is configured to allow private destinations. Defaults to https://api.telegram.org.",
                    "example": "https://telegram-bot-api.example.com"
                  },
                  "chatId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of the Telegram chat, group, or channel to post to, as the Bot API's `chat_id` accepts it. Surrounding spaces are trimmed.",
                    "example": "-1001234567890"
                  },
                  "threadId": {
                    "type": "number",
                    "description": "ID of the forum topic to post in, for a group with topics. Must be a whole number of 1 or more. Omit it to post in the main chat.",
                    "example": 42
                  },
                  "chatLabel": {
                    "type": "string",
                    "description": "Display name for the chat, shown in the integration settings. Surrounding spaces are trimmed, and an empty label is stored as unset.",
                    "example": "Release announcements"
                  },
                  "events": {
                    "type": "object",
                    "properties": {
                      "taskCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
                        "example": true
                      },
                      "taskStatusChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
                        "example": true
                      },
                      "taskPriorityChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskTitleChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskDescriptionChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskCommentCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
                        "example": true
                      }
                    },
                    "description": "Event toggles to set. Keys you omit use their default."
                  }
                },
                "required": [
                  "botToken",
                  "chatId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramIntegration"
                }
              }
            }
          },
          "400": {
            "description": "The bot token, chat ID, forum topic ID or server URL is invalid, or the server URL uses plain http where that is not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateTelegramIntegration",
        "tags": [
          "Telegram"
        ],
        "summary": "Update Telegram integration",
        "description": "Updates the project's Telegram integration. Omitted fields keep their current value; threadId and chatLabel accept null to clear them, and the event toggles sent are merged into the stored set. Changing serverUrl requires the bot token in the same request, because a saved token is only trusted for the server it was entered for. When nothing would change, the integration is returned as is and no event is published; otherwise an `integration.updated` event is published. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "botToken": {
                    "type": "string",
                    "description": "New bot token, in the same format as on create. Required when `serverUrl` changes. Omit it to keep the current token.",
                    "example": "123456789:AAExampleTokenNotReal_0123456789abc"
                  },
                  "expectedServerUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "description": "The serverUrl from the last read, or null for the official server. If supplied, the update is rejected when the stored server URL differs.",
                    "example": "https://telegram-bot-api.example.com"
                  },
                  "serverUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uri",
                    "description": "An http(s) URL of your own Bot API server, without a query, fragment, or credentials, or null to use https://api.telegram.org. Changing it requires the bot token. Omit it to keep the current server.",
                    "example": "https://telegram-bot-api.example.com"
                  },
                  "chatId": {
                    "type": "string",
                    "description": "New chat ID. Surrounding spaces are trimmed. Omit it to keep the current chat.",
                    "example": "-1001234567890"
                  },
                  "threadId": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "New forum topic ID, or null to post in the main chat. Omit it to keep the current value.",
                    "example": 42
                  },
                  "chatLabel": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "New display name for the chat, or null to clear it. Omit it to keep the current value.",
                    "example": "Release announcements"
                  },
                  "isActive": {
                    "type": "boolean",
                    "description": "Whether the integration posts messages. Send `false` to pause it without losing its settings. Omit it to keep the current value.",
                    "example": true
                  },
                  "events": {
                    "type": "object",
                    "properties": {
                      "taskCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task is created in the project. Defaults to `true`.",
                        "example": true
                      },
                      "taskStatusChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's status (its column) changes. Defaults to `true`.",
                        "example": true
                      },
                      "taskPriorityChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's priority changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskTitleChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's title changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskDescriptionChanged": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a task's description changes. Defaults to `false`.",
                        "example": false
                      },
                      "taskCommentCreated": {
                        "type": "boolean",
                        "description": "Whether a notice is sent when a comment is added to a task. Defaults to `true`.",
                        "example": true
                      }
                    },
                    "description": "Event toggles to change. Keys you omit keep their current value."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelegramIntegration"
                }
              }
            }
          },
          "400": {
            "description": "The resulting config failed validation, or serverUrl changed without a bot token (`Enter the bot token again when changing the Bot API server URL`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no Telegram integration (`Telegram integration not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored server URL differs from expectedServerUrl (`The Bot API server URL changed. Reload settings and try again.`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteTelegramIntegration",
        "tags": [
          "Telegram"
        ],
        "summary": "Delete Telegram integration",
        "description": "Deletes the project's Telegram integration and its settings, and publishes an `integration.deleted` event. No further messages are posted. Requires access to the project and the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project the integration belongs to.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project the integration belongs to.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The integration was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Always `true` when the integration was removed.",
                      "example": true
                    }
                  },
                  "required": [
                    "success"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing the `workspace:manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found, or the project has no Telegram integration (`Telegram integration not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task-relation/project/{projectId}": {
      "get": {
        "operationId": "getProjectTaskRelations",
        "tags": [
          "Task Relations"
        ],
        "summary": "List a project's task relations",
        "description": "Lists every relation whose source and target tasks are both in the project, without the task summaries the per-task route returns. Intended for views that render many tasks at once and already hold them. Relations reaching outside the project are left out. Requires access to the project and the `task:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Relations between tasks in the project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaskRelation"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task-relation/{taskId}": {
      "get": {
        "operationId": "getTaskRelations",
        "tags": [
          "Task Relations"
        ],
        "summary": "List task relations",
        "description": "Lists every relation where the task is the source or the target, each with a summary of both linked tasks. Relations whose other task is outside the workspace or in a project the caller cannot access are left out. Requires access to the task's project and the `task:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task whose relations to list.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task whose relations to list.",
            "name": "taskId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Task relations with the linked task summaries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TaskRelationWithTasks"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task-relation": {
      "post": {
        "operationId": "createTaskRelation",
        "tags": [
          "Task Relations"
        ],
        "summary": "Create task relation",
        "description": "Links two tasks in the same workspace. For `subtask` the source is the parent and the target the subtask; for `blocks` the source blocks the target; `related` has no direction. A task cannot be linked to itself, and a link of the same type between the same two tasks, in either direction, cannot be created twice. Publishes `task-relation.created`. Requires access to both tasks' projects and the `task:update` permission in the source task's workspace.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sourceTaskId": {
                    "type": "string",
                    "description": "ID of the source task: the parent for `subtask`, the blocking task for `blocks`. Its workspace is the one the request is authorized against.",
                    "example": "bkh59p9dpz3efjy7e59v55jd"
                  },
                  "targetTaskId": {
                    "type": "string",
                    "description": "ID of the target task: the subtask for `subtask`, the blocked task for `blocks`. Must be in the source task's workspace and must not be the source task.",
                    "example": "p15q5mwm4dm31qgfyrygj35y"
                  },
                  "relationType": {
                    "type": "string",
                    "enum": [
                      "subtask",
                      "blocks",
                      "related"
                    ],
                    "description": "Type of link: `subtask` makes the target a subtask of the source, `blocks` means the source blocks the target, and `related` links the two without a direction.",
                    "example": "blocks"
                  }
                },
                "required": [
                  "sourceTaskId",
                  "targetTaskId",
                  "relationType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created relation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskRelation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, missing `sourceTaskId`, or a task linked to itself",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to either task's project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Source task not found, or target task not found in the source task's workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "This relation already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/task-relation/{id}": {
      "delete": {
        "operationId": "deleteTaskRelation",
        "tags": [
          "Task Relations"
        ],
        "summary": "Delete task relation",
        "description": "Removes a link between two tasks and returns it. Both tasks must be in the source task's workspace and in projects the caller can access; the tasks themselves are kept. Publishes `task-relation.deleted`. Requires the `task:update` permission in the source task's workspace.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task relation.",
              "example": "pmb0jkv56js39ktxgnarw8sc"
            },
            "required": true,
            "description": "ID of the task relation.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted relation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskRelation"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the source task's project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task relation not found, or one of its tasks is outside the workspace or in a project the caller cannot access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/external-link/task/{taskId}": {
      "post": {
        "operationId": "createExternalLink",
        "tags": [
          "External Links"
        ],
        "summary": "Create an external link",
        "description": "Adds a manual resource link to a task. Pass `resourceType: \"pull_request\"` with `metadata` to show the link as a pull request with its status. Each call creates a new link, even for a URL already on the task. Publishes a `task.updated` event. Requires the `task:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "taskId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "A URL, such as an HTTPS link or an app link like obsidian://. Pull request links must use HTTP or HTTPS. javascript:, data:, vbscript:, file: and blob: URLs are rejected.",
                    "example": "https://github.com/acme/website/pull/128"
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Display title for the link, up to 200 characters. When omitted, the link has no title.",
                    "example": "Fix login redirect"
                  },
                  "resourceType": {
                    "type": "string",
                    "enum": [
                      "url",
                      "pull_request"
                    ],
                    "default": "url",
                    "description": "Kind of link: `url` for a resource link (the default), or `pull_request` to show the link as a pull request with its status. For a pull request, the number in a `/pull/`, `/pulls/`, `/merge_requests/` or `/pull-requests/` path becomes the link's externalId.",
                    "example": "pull_request"
                  },
                  "metadata": {
                    "$ref": "#/components/schemas/PullRequestLinkMetadata"
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "External link created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedExternalLink"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, blocked URL scheme, non-HTTP pull request URL, or metadata on a `url` link",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No permission to update the task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "getExternalLinksByTask",
        "tags": [
          "External Links"
        ],
        "summary": "List task external links",
        "description": "Lists a task's manually added resource links and the links from connected integrations, such as GitHub or Gitea issues. Requires the `task:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "taskId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "External links for the task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExternalLink"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/external-link/task/{taskId}/{id}": {
      "patch": {
        "operationId": "updateExternalLink",
        "tags": [
          "External Links"
        ],
        "summary": "Update a manual link",
        "description": "Changes the title of a manually added link, or the status of a manually added pull request link. Send at least one of title and metadata. Integration-managed links cannot be changed through this endpoint. Publishes a `task.updated` event. Requires the `task:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "taskId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the external link.",
              "example": "ghlz1fqn1h9zzgwvcyi4w4xd"
            },
            "required": true,
            "description": "ID of the external link.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "New display title, up to 200 characters. Omit to keep the current title.",
                    "example": "Fix login redirect"
                  },
                  "metadata": {
                    "$ref": "#/components/schemas/PullRequestLinkMetadata"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Link updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedExternalLink"
                }
              }
            }
          },
          "400": {
            "description": "Neither title nor metadata sent, or metadata sent for a link that is not a pull request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No permission to update the task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task or manual resource link not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteExternalLink",
        "tags": [
          "External Links"
        ],
        "summary": "Remove a manual resource link",
        "description": "Removes a manually added link from a task. Integration-managed links cannot be removed through this endpoint. Publishes a `task.updated` event. Requires the `task:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "taskId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the external link.",
              "example": "ghlz1fqn1h9zzgwvcyi4w4xd"
            },
            "required": true,
            "description": "ID of the external link.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Resource link removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedExternalLink"
                }
              }
            }
          },
          "400": {
            "description": "Invalid link data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No permission to update the task",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task or manual resource link not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workflow-rule/{projectId}": {
      "get": {
        "operationId": "getWorkflowRules",
        "tags": [
          "Workflow Rules"
        ],
        "summary": "List workflow rules",
        "description": "Lists a project's workflow rules, in no particular order, with the name and slug of each target column. A rule moves a task to a column when an integration event fires for it. Requires access to the project and the `project:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List of workflow rules",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowRule"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "upsertWorkflowRule",
        "tags": [
          "Workflow Rules"
        ],
        "summary": "Upsert workflow rule",
        "description": "Creates a workflow rule, or changes the target column of the project's existing rule for the same integration and event, so a project keeps one rule per integration and event. Repeating the same request leaves the rule unchanged. Returns the stored rule without column details. Requires access to the project and the `project:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integrationType": {
                    "type": "string",
                    "description": "Integration whose events the rule handles, stored as given. Integrations look up rules for `github`, `gitlab`, `gitea` and `tangled`.",
                    "example": "github"
                  },
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "branch_push",
                      "pr_opened",
                      "pr_merged",
                      "issue_opened",
                      "issue_closed",
                      "issue_reopened"
                    ],
                    "description": "Integration event that triggers the rule. `branch_push`: a branch linked to the task was pushed. `pr_opened`: a linked pull or merge request was opened. `pr_merged`: a linked pull or merge request was merged. `issue_opened`, `issue_closed`, `issue_reopened`: the linked issue was opened, closed or reopened. Tangled supports only `branch_push`; pull request and issue events are not available for it.",
                    "example": "pr_merged"
                  },
                  "columnId": {
                    "type": "string",
                    "description": "ID of the column, in the same project, that tasks are moved to when the event fires.",
                    "example": "m4e9zz9dn4huwwyxp542ewhm"
                  }
                },
                "required": [
                  "integrationType",
                  "eventType",
                  "columnId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created or updated rule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRuleRow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, a Tangled rule for an event other than `branch_push`, or a column that does not belong to the project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing `project:update` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workflow-rule/{id}": {
      "delete": {
        "operationId": "deleteWorkflowRule",
        "tags": [
          "Workflow Rules"
        ],
        "summary": "Delete workflow rule",
        "description": "Deletes a workflow rule and returns it as it was. Requires access to the rule's project and the `project:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workflow rule.",
              "example": "vqjwk6a90kv81dixs3ndtyqd"
            },
            "required": true,
            "description": "ID of the workflow rule.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted rule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRuleRow"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workflow rule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/invitation/pending": {
      "get": {
        "operationId": "getUserPendingInvitations",
        "tags": [
          "Invitations"
        ],
        "summary": "List pending invitations",
        "description": "Lists the pending, unexpired invitations sent to the current user's email address, oldest first. Invitations to archived workspaces are left out. Returns an empty list until the user's email is verified. The list is not paginated.",
        "responses": {
          "200": {
            "description": "List of pending invitations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PendingInvitation"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/invitation/{id}": {
      "get": {
        "operationId": "getInvitationDetails",
        "tags": [
          "Invitations"
        ],
        "summary": "Get invitation details",
        "description": "Looks up an invitation by ID for any signed-in user, for example to show the accept screen of an invitation link. Always 200 -- an unusable invitation is reported with `valid: false` and a reason rather than an error status. An invitation to an archived workspace is reported as not found.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the invitation, as found in the invitation link.",
              "example": "mjblnmjeznypc1wu03lscipk"
            },
            "required": true,
            "description": "ID of the invitation, as found in the invitation link.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationDetails"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workspace": {
      "get": {
        "operationId": "listWorkspaces",
        "tags": [
          "Workspaces"
        ],
        "summary": "List workspaces",
        "description": "Lists the workspaces the caller is a member of where one of the caller's roles grants `workspace:read`, with the caller's role in each, sorted by name (case-insensitive). Instance admins get every workspace they are a member of, and only those. Archived workspaces are left out. The list is not paginated. With an API key, the key needs the `workspace:read` scope.",
        "responses": {
          "200": {
            "description": "The caller's workspaces, sorted by name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Workspace"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the `workspace:read` scope (code `API_KEY_SCOPE`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workspace/{workspaceId}": {
      "get": {
        "operationId": "getWorkspace",
        "tags": [
          "Workspaces"
        ],
        "summary": "Get workspace",
        "description": "Returns a workspace where one of the caller's roles grants `workspace:read`, with the caller's role. Instance admins can get any workspace, with a null role when they are not a member. An archived workspace returns 403 with the code `WORKSPACE_ARCHIVED` to anyone who could otherwise read it. With an API key, the key needs the `workspace:read` scope.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The API key lacks the `workspace:read` scope (code `API_KEY_SCOPE`), or the workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found, the caller is not a member of it, or none of their roles grants `workspace:read`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workspace/{workspaceId}/members": {
      "get": {
        "operationId": "getWorkspaceMembers",
        "tags": [
          "Workspaces"
        ],
        "summary": "List workspace members",
        "description": "Lists the members of a workspace with their role, in no particular order. The list is not paginated. Pass `projectId` to get only the members who can access that project; the caller must be able to access that project too. Requires the `workspace:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of a project in the workspace. When set, only members who can access this project are returned, for example to fill an assignee picker. When omitted, every member is returned.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": false,
            "description": "ID of a project in the workspace. When set, only members who can access this project are returned, for example to fill an assignee picker. When omitted, every member is returned.",
            "name": "projectId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Members of the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkspaceMember"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing the `workspace:read` permission, no access to the project in `projectId`, or the workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or the caller is not a member, or the project in `projectId` is not in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workspace/{workspaceId}/project-access/me": {
      "get": {
        "operationId": "getMyProjectAccess",
        "tags": [
          "Workspaces"
        ],
        "summary": "Get my project access",
        "description": "Returns the caller's own project access in the workspace: every project, or the selected projects they are limited to. Owners and instance admins always get every project. Any member can call it; no workspace permission is needed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's project access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberProjectAccess"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or the caller is not a member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workspace/{workspaceId}/capabilities": {
      "get": {
        "operationId": "getMyWorkspaceCapabilities",
        "tags": [
          "Workspaces"
        ],
        "summary": "Get my workspace capabilities",
        "description": "Checks every named workspace action for the caller in one request and returns which of them the caller's roles allow, narrowed by the API key's scope when one is used. Instance admins are allowed everything. Any member can call it; no workspace permission is needed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's capabilities in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceCapabilities"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or the caller is not a member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workspace/{workspaceId}/project-access": {
      "get": {
        "operationId": "getWorkspaceProjectAccess",
        "tags": [
          "Workspaces"
        ],
        "summary": "List member project access",
        "description": "Lists the members who are limited to selected projects, with the projects each one can access, in no particular order. Everyone else in the workspace can access every project. A caller whose own access is limited only sees the projects they can access. Requires the `member:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Members limited to selected projects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MemberProjectAccess"
                  },
                  "description": "Members limited to selected projects. Members not listed can access every project. Project IDs only include projects the caller can access."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing the `member:update` permission, or the workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or the caller is not a member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workspace/{workspaceId}/members/{userId}/project-access": {
      "put": {
        "operationId": "updateMemberProjectAccess",
        "tags": [
          "Workspaces"
        ],
        "summary": "Update member project access",
        "description": "Gives a member access to every project, or limits them to selected projects, replacing their previous access. Owners always access every project, you can't change your own access, and you can only give access to projects you can access yourself. A caller whose own access is limited can't limit a member who can access every project, and the member keeps any project grants the caller can't see. Tasks assigned to the member in projects they lose access to are unassigned, each with an `unassigned` activity. Publishes a `project_access.updated` event and, for each project with unassigned tasks, a `task.bulk_unassigned` event. Requires the `member:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the member whose project access is changed.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the member whose project access is changed.",
            "name": "userId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectAccess": {
                    "type": "string",
                    "enum": [
                      "all",
                      "selected"
                    ],
                    "description": "Project access mode. `all` gives access to every project in the workspace, including projects created later. `selected` limits the member to the projects in `projectIds`.",
                    "example": "selected"
                  },
                  "projectIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "default": [],
                    "description": "IDs of the projects the member can access when `projectAccess` is `selected`. Duplicates are ignored. Every ID must be a project in this workspace that the caller can access. Ignored when `projectAccess` is `all`. Defaults to an empty list.",
                    "example": [
                      "cef5d6uaajgxwpe38vkp4khl"
                    ]
                  }
                },
                "required": [
                  "projectAccess"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The member's project access as requested. Project grants kept because the caller can't see them are not included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberProjectAccess"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, the member is an owner and `projectAccess` is `selected`, or some selected projects don't belong to this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing the `member:update` permission, changing your own access, giving access to projects you can't access yourself, limiting a member who can access every project while your own access is limited, or the workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or the caller is not a member, or the member is not in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workspace/{workspaceId}/oidc-group-mappings": {
      "get": {
        "operationId": "listWorkspaceOidcGroupMappings",
        "tags": [
          "Workspaces"
        ],
        "summary": "List OIDC group-to-role mappings for this workspace",
        "description": "Lists the workspace's OIDC group-to-role mappings, sorted by priority from highest to lowest. The list is not paginated. Requires the `workspace:read` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "OIDC group mappings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OidcGroupRoleMapping"
                      },
                      "description": "The workspace's mappings, sorted by priority from highest to lowest."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing the `workspace:read` permission, or the workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or the caller is not a member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "upsertWorkspaceOidcGroupMapping",
        "tags": [
          "Workspaces"
        ],
        "summary": "Create or update an OIDC group-to-role mapping for this workspace",
        "description": "Creates a mapping for an OIDC group, or, when the workspace already has a mapping with exactly the same group name, replaces its role and priority. The role is stored as given and is not checked against the workspace's roles. Requires the `workspace:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "groupName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Name of the OIDC group, as sent by the identity provider, from 1 to 200 characters after surrounding spaces are removed. Identifies the mapping to create or replace.",
                    "example": "engineering"
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Workspace role to map the group to, from 1 to 100 characters after surrounding spaces are removed: a built-in role (owner, admin, member, viewer) or the name of a custom role.",
                    "example": "admin"
                  },
                  "priority": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000,
                    "default": 0,
                    "description": "Priority of the mapping, an integer from 0 to 1000. Defaults to 0.",
                    "example": 10
                  }
                },
                "required": [
                  "groupName",
                  "role"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved OIDC group mapping",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OidcGroupRoleMapping"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing the `workspace:update` permission, or the workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or the caller is not a member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/workspace/{workspaceId}/oidc-group-mappings/{mappingId}": {
      "delete": {
        "operationId": "deleteWorkspaceOidcGroupMapping",
        "tags": [
          "Workspaces"
        ],
        "summary": "Delete an OIDC group-to-role mapping",
        "description": "Deletes one of the workspace's OIDC group-to-role mappings and returns its ID. Requires the `workspace:update` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "description": "ID of the mapping to delete.",
              "example": "kz3m0x8q2v7d1c4b9n6w5r0t"
            },
            "required": true,
            "description": "ID of the mapping to delete.",
            "name": "mappingId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted mapping ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted mapping.",
                      "example": "kz3m0x8q2v7d1c4b9n6w5r0t"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing the `workspace:update` permission, or the workspace is archived (code `WORKSPACE_ARCHIVED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Mapping not found in this workspace, or workspace not found or the caller is not a member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/storage": {
      "get": {
        "operationId": "checkQuillsS3Configured",
        "tags": [
          "Files"
        ],
        "summary": "Check whether file storage is configured",
        "description": "Reports whether the instance can store uploads: always true with local storage, otherwise true when the object storage settings are complete. Upload routes need it. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Storage status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "configured": {
                      "type": "boolean",
                      "description": "Whether file storage is configured",
                      "example": true
                    }
                  },
                  "required": [
                    "configured"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/files/uploads": {
      "post": {
        "operationId": "createQuillsUpload",
        "tags": [
          "Files"
        ],
        "summary": "Request an upload URL for a file or a post or changelog image",
        "description": "Returns a presigned PUT URL for a server-chosen key in the caller's workspace; upload the file there, then register it. An unregistered upload is not a reference. Writes nothing. Requires the `create` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "file",
                      "post_image",
                      "changelog_image"
                    ],
                    "description": "What the file is for. It decides the allowed types and where the file is stored.",
                    "example": "file"
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "The file's name on the caller's device. Its extension is kept on the stored file.",
                    "example": "screenshot.png"
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  }
                },
                "required": [
                  "purpose",
                  "filename",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presigned upload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "Storage key of the new file. Send it back unchanged when you attach or register the upload."
                    },
                    "uploadUrl": {
                      "type": "string",
                      "description": "Short-lived URL. Send the file's bytes to it in a PUT request, with the headers below.",
                      "example": "https://storage.example.com/upload?token=abc123"
                    },
                    "headers": {
                      "type": "object",
                      "properties": {
                        "Content-Type": {
                          "type": "string",
                          "description": "The content type from the request.",
                          "example": "image/png"
                        }
                      },
                      "required": [
                        "Content-Type"
                      ],
                      "description": "Headers to send with the PUT request."
                    },
                    "expiresAt": {
                      "type": "string",
                      "description": "When uploadUrl stops working, as an ISO 8601 date and time in UTC.",
                      "example": "2026-03-14T09:31:53.589Z"
                    }
                  },
                  "required": [
                    "key",
                    "uploadUrl",
                    "headers",
                    "expiresAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/files/settings-uploads": {
      "post": {
        "operationId": "createQuillsSettingsUpload",
        "tags": [
          "Files"
        ],
        "summary": "Request an upload URL for a workspace logo, favicon, header logo, assistant avatar or widget hero image",
        "description": "Returns a presigned PUT URL for a server-chosen key in the caller's workspace; upload the file there, then register it. An unregistered upload is not a reference. Writes nothing. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "purpose": {
                    "type": "string",
                    "enum": [
                      "logo",
                      "favicon",
                      "header_logo",
                      "assistant_avatar",
                      "widget_hero"
                    ],
                    "description": "What the file is for. It decides the allowed types and where the file is stored.",
                    "example": "logo"
                  },
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "The file's name on the caller's device. Its extension is kept on the stored file.",
                    "example": "screenshot.png"
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  }
                },
                "required": [
                  "purpose",
                  "filename",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presigned upload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "Storage key of the new file. Send it back unchanged when you attach or register the upload."
                    },
                    "uploadUrl": {
                      "type": "string",
                      "description": "Short-lived URL. Send the file's bytes to it in a PUT request, with the headers below.",
                      "example": "https://storage.example.com/upload?token=abc123"
                    },
                    "headers": {
                      "type": "object",
                      "properties": {
                        "Content-Type": {
                          "type": "string",
                          "description": "The content type from the request.",
                          "example": "image/png"
                        }
                      },
                      "required": [
                        "Content-Type"
                      ],
                      "description": "Headers to send with the PUT request."
                    },
                    "expiresAt": {
                      "type": "string",
                      "description": "When uploadUrl stops working, as an ISO 8601 date and time in UTC.",
                      "example": "2026-03-14T09:31:53.589Z"
                    }
                  },
                  "required": [
                    "key",
                    "uploadUrl",
                    "headers",
                    "expiresAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/files": {
      "post": {
        "operationId": "createQuillsFiles",
        "tags": [
          "Files"
        ],
        "summary": "Register an uploaded file",
        "description": "Verifies an object uploaded with a URL from POST /files/uploads or POST /files/settings-uploads (assistant avatar) and registers it in the workspace's files. Idempotent per key: a retry returns the file of the first request with created false. A file of the `file` purpose that no reply or note attaches within a day is removed. Requires the `create` permission. Records a `file.created` event when the file is new.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "^[^\\\\/\\p{Cc}]+$/u",
                    "description": "The file's display name, without slashes or control characters",
                    "example": "invoice-1042.pdf"
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Registered file",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The file's ID",
                      "example": "file_01m8rxxee8esga9ve6f0hcvyc0"
                    },
                    "name": {
                      "type": "string",
                      "description": "The file name given at registration",
                      "example": "invoice-1042.pdf"
                    },
                    "contentType": {
                      "type": "string",
                      "description": "The MIME type of the stored object",
                      "example": "application/pdf"
                    },
                    "size": {
                      "type": "number",
                      "description": "The file size in bytes",
                      "example": 48213
                    },
                    "family": {
                      "type": "string",
                      "description": "The file family, from the content type: image, video, audio, pdf, csv, text or other",
                      "example": "pdf"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the file was registered",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "created": {
                      "type": "boolean",
                      "description": "Whether this request registered the file. False when a retry found the file that an earlier request registered.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "contentType",
                    "size",
                    "family",
                    "createdAt",
                    "created"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The key is not an upload of the caller, or the uploaded object is missing or does not match",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The file that registered this upload was removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/files/{fileId}": {
      "get": {
        "operationId": "getQuillsFile",
        "tags": [
          "Files"
        ],
        "summary": "Get a file and a short-lived download URL",
        "description": "Returns the file's details and a signed download URL. Images open inline; other files download as attachments. A teammate without the `update` permission who belongs to support teams sees message files only from conversations and tickets of those teams, and unattached files only when they uploaded them. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The file's ID",
              "example": "file_01m8rxxee8esga9ve6f0hcvyc0"
            },
            "required": true,
            "description": "The file's ID",
            "name": "fileId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "File",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The file's ID",
                      "example": "file_01m8rxxee8esga9ve6f0hcvyc0"
                    },
                    "name": {
                      "type": "string",
                      "description": "The file name given at registration",
                      "example": "invoice-1042.pdf"
                    },
                    "contentType": {
                      "type": "string",
                      "description": "The MIME type of the stored object",
                      "example": "application/pdf"
                    },
                    "size": {
                      "type": "number",
                      "description": "The file size in bytes",
                      "example": 48213
                    },
                    "family": {
                      "type": "string",
                      "description": "The file family, from the content type: image, video, audio, pdf, csv, text or other",
                      "example": "pdf"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the file was registered",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "downloadUrl": {
                      "type": "string",
                      "description": "A signed URL that downloads the file until downloadExpiresAt",
                      "example": "https://storage.example.com/files/invoice-1042.pdf?X-Amz-Expires=900"
                    },
                    "downloadExpiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When downloadUrl stops working",
                      "example": "2026-11-30T14:20:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "contentType",
                    "size",
                    "family",
                    "createdAt",
                    "downloadUrl",
                    "downloadExpiresAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No live file has this ID, or the caller's teams cannot see it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/files/{fileId}/opened": {
      "post": {
        "operationId": "createQuillsFilesOpened",
        "tags": [
          "Files"
        ],
        "summary": "Count an open of a file",
        "description": "Adds one to the file's open counter and returns the new count. Not idempotent: each call counts. The same team visibility applies as for GET /files/{fileId}. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The file's ID",
              "example": "file_01m8rxxee8esga9ve6f0hcvyc0"
            },
            "required": true,
            "description": "The file's ID",
            "name": "fileId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Open count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "openCount": {
                      "type": "number",
                      "description": "How many times the file was opened, including this call",
                      "example": 3
                    }
                  },
                  "required": [
                    "openCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No live file has this ID, or the caller's teams cannot see it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/logo": {
      "put": {
        "operationId": "saveQuillsLogoKey",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Set the workspace logo to an uploaded image",
        "description": "Verifies an image uploaded with a URL from POST /files/settings-uploads (purpose logo) and makes it the workspace logo. Sending the current key again changes nothing. The replaced image is queued for cleanup. Requires the `manage_settings` permission. Records a `settings.logo_updated` event when the key changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Whether the key changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored image changed. False when the request named the current state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The key is not a logo upload of this workspace, or the uploaded object is missing or does not match",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsLogo",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Remove the workspace logo",
        "description": "Clears the workspace logo. The removed image is queued for cleanup. Removing when none is set changes nothing. Requires the `manage_settings` permission. Records a `settings.logo_removed` event when an image was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a key was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored image changed. False when the request named the current state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/favicon": {
      "put": {
        "operationId": "saveQuillsFaviconKey",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Set the workspace favicon to an uploaded image",
        "description": "Verifies an image uploaded with a URL from POST /files/settings-uploads (purpose favicon) and makes it the workspace favicon. Sending the current key again changes nothing. The replaced image is queued for cleanup. Requires the `manage_settings` permission. Records a `settings.favicon_updated` event when the key changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Whether the key changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored image changed. False when the request named the current state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The key is not a favicon upload of this workspace, or the uploaded object is missing or does not match",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsFavicon",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Remove the workspace favicon",
        "description": "Clears the workspace favicon. The removed image is queued for cleanup. Removing when none is set changes nothing. Requires the `manage_settings` permission. Records a `settings.favicon_removed` event when an image was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a key was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored image changed. False when the request named the current state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/header-logo": {
      "put": {
        "operationId": "saveQuillsHeaderLogoKey",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Set the workspace header logo to an uploaded image",
        "description": "Verifies an image uploaded with a URL from POST /files/settings-uploads (purpose header_logo) and makes it the workspace header logo. Sending the current key again changes nothing. The replaced image is queued for cleanup. Requires the `manage_settings` permission. Records a `settings.header_logo_updated` event when the key changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Whether the key changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored image changed. False when the request named the current state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The key is not a header_logo upload of this workspace, or the uploaded object is missing or does not match",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsHeaderLogo",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Remove the workspace header logo",
        "description": "Clears the workspace header logo. The removed image is queued for cleanup. Removing when none is set changes nothing. Requires the `manage_settings` permission. Records a `settings.header_logo_removed` event when an image was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a key was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored image changed. False when the request named the current state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/widget/hero-image": {
      "put": {
        "operationId": "saveQuillsWidgetHeroImageKey",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Set the workspace widget hero image to an uploaded image",
        "description": "Verifies an image uploaded with a URL from POST /files/settings-uploads (purpose widget_hero) and makes it the workspace widget hero image. Sending the current key again changes nothing. The replaced image is queued for cleanup. Requires the `manage_settings` permission. Records a `settings.widget_hero_image_updated` event when the key changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Whether the key changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored image changed. False when the request named the current state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The key is not a widget_hero upload of this workspace, or the uploaded object is missing or does not match",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsWidgetHeroImage",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Remove the workspace widget hero image",
        "description": "Clears the workspace widget hero image. The removed image is queued for cleanup. Removing when none is set changes nothing. Requires the `manage_settings` permission. Records a `settings.widget_hero_image_removed` event when an image was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a key was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the stored image changed. False when the request named the current state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/jobs": {
      "get": {
        "operationId": "listQuillsJobs",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "List recent background jobs",
        "description": "Lists the workspace's background jobs (event delivery, workflow runs, webhooks, mail, notifications, domain checks, wipes, transfers and AI work), newest first. Pages with `before`: pass the previous page's `nextCursor`. Job payloads are never returned. Finished jobs are pruned after the job retention period (7 days by default). Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 19,
              "pattern": "^\\d+$",
              "description": "A cursor: only jobs queued before the job with this internal `id` are listed. Pass the previous page's `nextCursor`; leave it out for the first page.",
              "example": "1042"
            },
            "required": false,
            "description": "A cursor: only jobs queued before the job with this internal `id` are listed. Pass the previous page's `nextCursor`; leave it out for the first page.",
            "name": "before",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "The maximum number of jobs to return. Default 50.",
              "example": 50
            },
            "required": false,
            "description": "The maximum number of jobs to return. Default 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Recent jobs, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "jobs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The job's internal sequence number, a decimal string that grows in queue order. Use it as a `before` cursor.",
                            "example": "1042"
                          },
                          "jobId": {
                            "type": "string",
                            "description": "The job ID, stable across attempts. Pass it to `retryQuillsJob`.",
                            "example": "job_01m8rxfrbhfzr9r8468n432v52"
                          },
                          "queue": {
                            "type": "string",
                            "description": "The queue that names the job's handler, such as event delivery, mail or webhooks."
                          },
                          "status": {
                            "type": "string",
                            "description": "`pending`: waiting to run. `running`: claimed by a worker. `succeeded`: finished. `failed`: out of attempts or failed for good; `lastError` says why.",
                            "example": "failed"
                          },
                          "attempts": {
                            "type": "number",
                            "description": "How many times a worker has claimed the job.",
                            "example": 3
                          },
                          "maxAttempts": {
                            "type": "number",
                            "description": "How many attempts the job gets before it fails. 1: at most once.",
                            "example": 3
                          },
                          "lastError": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The error from the most recent failed attempt. Null when none is recorded; a manual retry clears it.",
                            "example": "Webhook endpoint answered 500"
                          }
                        },
                        "required": [
                          "id",
                          "jobId",
                          "queue",
                          "status",
                          "attempts",
                          "maxAttempts",
                          "lastError"
                        ]
                      },
                      "description": "One page of jobs, most recently queued first"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The `before` value for the next page. Null on the last page.",
                      "example": "993"
                    }
                  },
                  "required": [
                    "jobs",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/jobs/{jobId}/retry": {
      "post": {
        "operationId": "retryQuillsJob",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "Retry a failed event delivery job",
        "description": "Puts a failed event delivery job back in the queue to run now, with its attempts reset to 0 and its last error cleared. Only failed jobs of the event delivery queue can be retried. The worker then processes the event again; follow-up jobs that it already queued are not queued twice. Writes a `job.retried` audit entry. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The job ID (`jobId` in the job list).",
              "example": "job_01m8rxfrbhfzr9r8468n432v52"
            },
            "required": true,
            "description": "The job ID (`jobId` in the job list).",
            "name": "jobId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Job queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "retried": {
                      "type": "boolean",
                      "description": "Always true: the job is pending again.",
                      "example": true
                    }
                  },
                  "required": [
                    "retried"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No failed event delivery job has this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/boards/{boardId}/projects/{projectId}": {
      "put": {
        "operationId": "linkQuillsBoardToProject",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Link an Albus board to a project",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
              "example": "board_01h455vb4pex5vsknk084sn02q"
            },
            "required": true,
            "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
            "name": "boardId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Link updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "unlinkQuillsBoardFromProject",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Unlink an Albus board from a project",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
              "example": "board_01h455vb4pex5vsknk084sn02q"
            },
            "required": true,
            "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
            "name": "boardId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": true,
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Link updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/tasks/{taskId}": {
      "put": {
        "operationId": "linkQuillsPostToTask",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Link an Albus post to a task",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "TypeID with the `post` prefix. Requests also accept the bare UUID.",
              "example": "post_01h455vb4pex5vsknk084sn02q"
            },
            "required": true,
            "description": "TypeID with the `post` prefix. Requests also accept the bare UUID.",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": true,
            "name": "taskId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Link updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "unlinkQuillsPostFromTask",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Unlink an Albus post from a task",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "TypeID with the `post` prefix. Requests also accept the bare UUID.",
              "example": "post_01h455vb4pex5vsknk084sn02q"
            },
            "required": true,
            "description": "TypeID with the `post` prefix. Requests also accept the bare UUID.",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "required": true,
            "name": "taskId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Link updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/links": {
      "get": {
        "operationId": "listQuillsLinks",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List visible Albus board and post links",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0
            },
            "required": false,
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Visible product links",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "boards": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "boardId": {
                            "type": "string"
                          },
                          "projectId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "boardId",
                          "projectId"
                        ]
                      }
                    },
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "postId": {
                            "type": "string"
                          },
                          "taskId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "postId",
                          "taskId"
                        ]
                      }
                    }
                  },
                  "required": [
                    "nextOffset",
                    "boards",
                    "posts"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/teams": {
      "post": {
        "operationId": "bindQuillsTeam",
        "tags": [
          "Teammates and teams"
        ],
        "summary": "Bind a workspace team to Albus",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kaneoTeamId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "isDefault": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "kaneoTeamId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Team",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "kaneoTeamId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "icon": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "color": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assignmentMethod": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "kaneoTeamId",
                    "isDefault",
                    "icon",
                    "color",
                    "description",
                    "assignmentMethod"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Team not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "listQuillsTeams",
        "tags": [
          "Teammates and teams"
        ],
        "summary": "List Albus teams and their rosters",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Teams and their projected rosters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "teams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "kaneoTeamId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "isDefault": {
                            "type": "boolean"
                          },
                          "icon": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "color": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "assignmentMethod": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "kaneoTeamId",
                          "isDefault",
                          "icon",
                          "color",
                          "description",
                          "assignmentMethod"
                        ]
                      }
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "teamId": {
                            "type": "string"
                          },
                          "principalId": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "teamId",
                          "principalId"
                        ]
                      }
                    }
                  },
                  "required": [
                    "teams",
                    "members"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Team not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/teams/{teamId}/binding": {
      "put": {
        "operationId": "updateQuillsTeamBinding",
        "tags": [
          "Teammates and teams"
        ],
        "summary": "Change the team binding of an Albus team",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "TypeID with the `team` prefix. Requests also accept the bare UUID.",
              "example": "team_01h455vb4pex5vsknk084sn02q"
            },
            "required": true,
            "description": "TypeID with the `team` prefix. Requests also accept the bare UUID.",
            "name": "teamId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kaneoTeamId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "isDefault": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kaneoTeamId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Team",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "kaneoTeamId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "icon": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "color": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assignmentMethod": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "kaneoTeamId",
                    "isDefault",
                    "icon",
                    "color",
                    "description",
                    "assignmentMethod"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Team not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/teams/{teamId}": {
      "put": {
        "operationId": "updateQuillsTeam",
        "tags": [
          "Teammates and teams"
        ],
        "summary": "Update the Albus settings of a team",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "TypeID with the `team` prefix. Requests also accept the bare UUID.",
              "example": "team_01h455vb4pex5vsknk084sn02q"
            },
            "required": true,
            "description": "TypeID with the `team` prefix. Requests also accept the bare UUID.",
            "name": "teamId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "icon": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 16
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 32
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500
                  },
                  "assignmentMethod": {
                    "type": "string",
                    "enum": [
                      "manual",
                      "round_robin",
                      "balanced"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Team",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "kaneoTeamId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isDefault": {
                      "type": "boolean"
                    },
                    "icon": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "color": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "assignmentMethod": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "kaneoTeamId",
                    "isDefault",
                    "icon",
                    "color",
                    "description",
                    "assignmentMethod"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Team not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsTeam",
        "tags": [
          "Teammates and teams"
        ],
        "summary": "Delete an Albus team",
        "description": "Soft delete. The linked workspace team and its members stay.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "TypeID with the `team` prefix. Requests also accept the bare UUID.",
              "example": "team_01h455vb4pex5vsknk084sn02q"
            },
            "required": true,
            "description": "TypeID with the `team` prefix. Requests also accept the bare UUID.",
            "name": "teamId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted team",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Team not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/duplicates": {
      "get": {
        "operationId": "listQuillsDuplicateContacts",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Detect likely duplicate contacts in the workspace",
        "description": "Returns pairs of customers and leads that look like the same person: the same email (the account email, else the contact email), or the same name (the profile name, else the display name; `anonymous` never matches), all case-insensitive. Checks at most 500 contacts that aren't merged, in no guaranteed order, so a large workspace may have pairs that aren't listed. Email pairs come first, then name pairs; each pair is listed once. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Candidate duplicate contact pairs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "reason": {
                            "type": "string",
                            "enum": [
                              "email_match",
                              "name_and_company_match",
                              "name_match"
                            ],
                            "description": "Why the pair matched. `email_match`: same email; `name_and_company_match`: same name and same company; `name_match`: same name, different or no company.",
                            "example": "email_match"
                          },
                          "confidence": {
                            "type": "string",
                            "enum": [
                              "high",
                              "medium"
                            ],
                            "description": "How likely the pair is the same person. `high` for an email match or a name and company match; `medium` for a name match alone.",
                            "example": "high"
                          },
                          "primaryPrincipalId": {
                            "type": "string",
                            "description": "Principal ID of the contact to keep. An identified customer is preferred over a lead.",
                            "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                          },
                          "duplicatePrincipalId": {
                            "type": "string",
                            "description": "Principal ID of the likely duplicate, a candidate source for the merge route.",
                            "example": "principal_01m8rz9gc9fztr3vb2c7z8rnwv"
                          },
                          "primaryName": {
                            "type": "string",
                            "description": "Name of the primary contact: the profile name, else the display name, else `Anonymous`.",
                            "example": "Dana Whitfield"
                          },
                          "duplicateName": {
                            "type": "string",
                            "description": "Name of the duplicate contact: the profile name, else the display name, else `Anonymous`.",
                            "example": "Dana Whitfield"
                          },
                          "primaryEmail": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Email of the primary contact: the account email, else the contact email. Null when neither is set.",
                            "example": "dana@example.com"
                          },
                          "duplicateEmail": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Email of the duplicate contact: the account email, else the contact email. Null when neither is set.",
                            "example": "dana@example.com"
                          }
                        },
                        "required": [
                          "reason",
                          "confidence",
                          "primaryPrincipalId",
                          "duplicatePrincipalId",
                          "primaryName",
                          "duplicateName",
                          "primaryEmail",
                          "duplicateEmail"
                        ]
                      },
                      "description": "Candidate pairs. Up to 100."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/merge": {
      "post": {
        "operationId": "mergeQuillsContacts",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Merge one or more contacts into a surviving contact (30-day reversible)",
        "description": "Merges each source contact into the target, in one transaction. Moves the source's conversations, messages, tickets, ticket activity, feedback posts, comments, votes, post subscriptions, files, email log, in-app notifications, feedback signals, survey responses, help center article ratings, page views, devices, push devices, unsubscribe links, workflow runs and linked identities to the target. A source row that would collide with one the target already has (a vote or subscription on the same post, a response to the same survey, a rating of the same article) is set aside, and vote and rating counts are adjusted. The source's account and contact emails become `email` identities of the target (source `merge`), and the target's empty contact email, company and block are filled from the source. Each source is then marked as merged and hidden from the people list, and gets a merge record that can be undone for 30 days. Requires the `update` permission. Records one `user.merged` event for the request.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sourcePrincipalIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                      "example": "principal_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "Principal IDs of the contacts to merge into the target, 1 to 20. Each accepts the TypeID or its UUID; a repeated ID counts once.",
                    "example": [
                      "principal_01m8rz9gc9fztr3vb2c7z8rnwv"
                    ]
                  },
                  "targetPrincipalId": {
                    "type": "string",
                    "description": "Principal ID of the contact that survives and receives the sources' activity. Accepts the TypeID or its UUID.",
                    "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Why the contacts are merged, up to 500 characters. Stored on each merge record.",
                    "example": "Same person, work and personal email"
                  }
                },
                "required": [
                  "sourcePrincipalIds",
                  "targetPrincipalId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created reversible contact merge records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "merges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the merge record, a UUID. Pass it to the undo route within the undo window.",
                            "example": "a2b7c1d4-5e6f-4a8b-9c0d-1e2f3a4b5c6d"
                          },
                          "sourcePrincipalId": {
                            "type": "string",
                            "description": "Principal ID of the contact that was merged away. It stays hidden from the people list while the merge holds.",
                            "example": "principal_01m8rz9gc9fztr3vb2c7z8rnwv"
                          },
                          "targetPrincipalId": {
                            "type": "string",
                            "description": "Principal ID of the surviving contact that received the source's activity.",
                            "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                          },
                          "mergedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who merged the contacts. Null when that principal no longer exists.",
                            "example": "principal_01m8rz9gcafztr3vbfyq5qhtzq"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Reason given for the merge. Null when none was given.",
                            "example": "Same person, work and personal email"
                          },
                          "reversibleUntil": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time until which the merge can be undone, in ISO 8601 UTC: 30 days after the merge.",
                            "example": "2026-04-13T09:26:53.000Z"
                          },
                          "undoneAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the merge was undone, in ISO 8601 UTC. Null while the merge holds.",
                            "example": null
                          },
                          "undoneByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who undid the merge. Null while the merge holds, or when that principal no longer exists.",
                            "example": null
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the contacts were merged, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "sourcePrincipalId",
                          "targetPrincipalId",
                          "mergedByPrincipalId",
                          "reason",
                          "reversibleUntil",
                          "undoneAt",
                          "undoneByPrincipalId",
                          "createdAt"
                        ]
                      },
                      "description": "One merge record per source, in request order."
                    }
                  },
                  "required": [
                    "merges"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The target is also listed as a source: a contact can't be merged into itself",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: the target or a source isn't a customer or lead of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The target or a source has already been merged into another contact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/merges": {
      "get": {
        "operationId": "listQuillsContactMerges",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List recent contact merges",
        "description": "Lists the 100 most recent contact merges of the workspace, newest first, including undone and expired ones. There is no paging. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Recent contact merge records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the merge record, a UUID. Pass it to the undo route within the undo window.",
                            "example": "a2b7c1d4-5e6f-4a8b-9c0d-1e2f3a4b5c6d"
                          },
                          "sourcePrincipalId": {
                            "type": "string",
                            "description": "Principal ID of the contact that was merged away. It stays hidden from the people list while the merge holds.",
                            "example": "principal_01m8rz9gc9fztr3vb2c7z8rnwv"
                          },
                          "targetPrincipalId": {
                            "type": "string",
                            "description": "Principal ID of the surviving contact that received the source's activity.",
                            "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                          },
                          "mergedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who merged the contacts. Null when that principal no longer exists.",
                            "example": "principal_01m8rz9gcafztr3vbfyq5qhtzq"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Reason given for the merge. Null when none was given.",
                            "example": "Same person, work and personal email"
                          },
                          "reversibleUntil": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time until which the merge can be undone, in ISO 8601 UTC: 30 days after the merge.",
                            "example": "2026-04-13T09:26:53.000Z"
                          },
                          "undoneAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the merge was undone, in ISO 8601 UTC. Null while the merge holds.",
                            "example": null
                          },
                          "undoneByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who undid the merge. Null while the merge holds, or when that principal no longer exists.",
                            "example": null
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the contacts were merged, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "sourcePrincipalId",
                          "targetPrincipalId",
                          "mergedByPrincipalId",
                          "reason",
                          "reversibleUntil",
                          "undoneAt",
                          "undoneByPrincipalId",
                          "createdAt"
                        ]
                      },
                      "description": "Merge records, newest first. Up to 100."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/merges/{mergeId}/undo": {
      "post": {
        "operationId": "undoQuillsContactMerge",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Undo a contact merge within its 30-day reversibility window",
        "description": "Restores the source contact of a merge, in one transaction. The rows the merge moved go back to the source when they still belong to the target, and the rows it set aside are restored when their post, survey or article still exists, with vote and rating counts adjusted. The `email` identities the merge added to the target are removed and the source's own identities move back. The target's contact email and company return to their values before the merge; a block the target had before is restored, and a block applied after the merge is kept. Activity the target gained after the merge stays with the target. Requires the `update` permission. Records a `user.merge_undone` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "ID of the contact merge record, a UUID.",
              "example": "a2b7c1d4-5e6f-4a8b-9c0d-1e2f3a4b5c6d"
            },
            "required": true,
            "description": "ID of the contact merge record, a UUID.",
            "name": "mergeId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The undone contact merge record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the merge record, a UUID. Pass it to the undo route within the undo window.",
                      "example": "a2b7c1d4-5e6f-4a8b-9c0d-1e2f3a4b5c6d"
                    },
                    "sourcePrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the contact that was merged away. It stays hidden from the people list while the merge holds.",
                      "example": "principal_01m8rz9gc9fztr3vb2c7z8rnwv"
                    },
                    "targetPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the surviving contact that received the source's activity.",
                      "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                    },
                    "mergedByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who merged the contacts. Null when that principal no longer exists.",
                      "example": "principal_01m8rz9gcafztr3vbfyq5qhtzq"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Reason given for the merge. Null when none was given.",
                      "example": "Same person, work and personal email"
                    },
                    "reversibleUntil": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time until which the merge can be undone, in ISO 8601 UTC: 30 days after the merge.",
                      "example": "2026-04-13T09:26:53.000Z"
                    },
                    "undoneAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the merge was undone, in ISO 8601 UTC. Null while the merge holds.",
                      "example": null
                    },
                    "undoneByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who undid the merge. Null while the merge holds, or when that principal no longer exists.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the contacts were merged, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "sourcePrincipalId",
                    "targetPrincipalId",
                    "mergedByPrincipalId",
                    "reason",
                    "reversibleUntil",
                    "undoneAt",
                    "undoneByPrincipalId",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Merge record not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The merge was already undone, its 30-day undo window has passed, the target was merged into another contact since (undo that merge first), or the source is now merged into a different contact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}/identities": {
      "get": {
        "operationId": "listQuillsContactIdentities",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List all linked identities of a contact",
        "description": "Lists every secondary identity linked to a customer or lead (emails, external IDs, phone numbers, Slack and GitHub IDs), newest first. The account email and external ID on the profile itself aren't listed. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the contact, a customer or lead. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the contact, a customer or lead. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Linked emails, external IDs, phones, and channel handles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the identity, a UUID.",
                            "example": "3f6c2a9e-8b1d-4c57-a0e2-6d9b4f1c7e35"
                          },
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the contact the identity belongs to.",
                            "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "email",
                              "external_id",
                              "phone",
                              "slack_id",
                              "github_id"
                            ],
                            "description": "Kind of identity. `email`: an email address; `external_id`: an ID from your app; `phone`: a phone number; `slack_id`: a Slack user ID; `github_id`: a GitHub username or ID.",
                            "example": "email"
                          },
                          "value": {
                            "type": "string",
                            "description": "Normalized value of the identity: an email in lowercase, a phone number without spaces, parentheses, dots or dashes, any other kind trimmed.",
                            "example": "dana.personal@example.com"
                          },
                          "verified": {
                            "type": "boolean",
                            "description": "Whether the identity is marked as verified.",
                            "example": false
                          },
                          "source": {
                            "type": "string",
                            "description": "How the identity was linked. `manual`: added by a teammate or through the API; `merge`: copied from the email of a contact merged into this one.",
                            "example": "manual"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the identity was linked, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "principalId",
                          "kind",
                          "value",
                          "verified",
                          "source",
                          "createdAt"
                        ]
                      },
                      "description": "The contact's linked identities, newest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: no customer or lead of this workspace has this principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "addQuillsContactIdentity",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Attach a secondary email, external ID, phone, or handle to a contact",
        "description": "Links a secondary identity to a customer or lead. Inbound email from a linked email address resolves to the contact, and the people list's `search` matches identity values. The value is normalized first. Idempotent: when the contact already holds the identity, it's returned unchanged and `verified` is ignored. An email can't be one that another live contact uses as account or contact email, and an external ID can't be another live contact's (case-insensitive). Requires the `update` permission. Records a `contact_identity.added` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the contact, a customer or lead. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the contact, a customer or lead. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "email",
                      "external_id",
                      "phone",
                      "slack_id",
                      "github_id"
                    ],
                    "description": "Kind of identity to link. `email`: an email address; `external_id`: an ID from your app; `phone`: a phone number; `slack_id`: a Slack user ID; `github_id`: a GitHub username or ID.",
                    "example": "email"
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320,
                    "description": "Value of the identity, 1 to 320 characters after trimming. An `email` must be an address and is stored in lowercase; a `phone` is an optional `+` and 6 to 20 digits once spaces, parentheses, dots and dashes are removed; other kinds are stored as sent. An invalid value answers 400.",
                    "example": "dana.personal@example.com"
                  },
                  "verified": {
                    "type": "boolean",
                    "description": "Whether to mark the identity as verified. Defaults to false.",
                    "example": false
                  }
                },
                "required": [
                  "kind",
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The linked identity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the identity, a UUID.",
                      "example": "3f6c2a9e-8b1d-4c57-a0e2-6d9b4f1c7e35"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the contact the identity belongs to.",
                      "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "email",
                        "external_id",
                        "phone",
                        "slack_id",
                        "github_id"
                      ],
                      "description": "Kind of identity. `email`: an email address; `external_id`: an ID from your app; `phone`: a phone number; `slack_id`: a Slack user ID; `github_id`: a GitHub username or ID.",
                      "example": "email"
                    },
                    "value": {
                      "type": "string",
                      "description": "Normalized value of the identity: an email in lowercase, a phone number without spaces, parentheses, dots or dashes, any other kind trimmed.",
                      "example": "dana.personal@example.com"
                    },
                    "verified": {
                      "type": "boolean",
                      "description": "Whether the identity is marked as verified.",
                      "example": false
                    },
                    "source": {
                      "type": "string",
                      "description": "How the identity was linked. `manual`: added by a teammate or through the API; `merge`: copied from the email of a contact merged into this one.",
                      "example": "manual"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the identity was linked, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "principalId",
                    "kind",
                    "value",
                    "verified",
                    "source",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The value isn't a valid identity of this kind",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: no customer or lead of this workspace has this principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The identity, email or external ID already belongs to another contact, or the contact was merged into another one",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}/identities/{identityId}": {
      "delete": {
        "operationId": "removeQuillsContactIdentity",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Remove a linked identity from a contact",
        "description": "Unlinks one secondary identity from a contact. Not idempotent: a second call answers 404. Requires the `update` permission. Records a `contact_identity.removed` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the contact that holds the identity. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the contact that holds the identity. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "ID of the linked identity, a UUID.",
              "example": "3f6c2a9e-8b1d-4c57-a0e2-6d9b4f1c7e35"
            },
            "required": true,
            "description": "ID of the linked identity, a UUID.",
            "name": "identityId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The removed identity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true: the identity was removed.",
                      "example": true
                    },
                    "id": {
                      "type": "string",
                      "description": "ID of the removed identity.",
                      "example": "3f6c2a9e-8b1d-4c57-a0e2-6d9b4f1c7e35"
                    }
                  },
                  "required": [
                    "deleted",
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Identity not found: no identity with this ID belongs to the contact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users": {
      "get": {
        "operationId": "listQuillsUsers",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List customers or leads",
        "description": "Lists one page of identified customers (`lifecycle=users`, the default) or leads (`lifecycle=leads`), with filters and offset paging. A lead is listed only once it engaged: it left a contact email, wrote a message, post or comment, voted or reacted. Customers only: teammates, test customers, service principals and contacts merged into another contact are never listed. `total` counts every match. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Text to look for, case-insensitive, anywhere in the name, account email, contact email or a linked identity value (secondary email, phone, external ID, handle). Up to 200 characters.",
              "example": "dana"
            },
            "required": false,
            "description": "Text to look for, case-insensitive, anywhere in the name, account email, contact email or a linked identity value (secondary email, phone, external ID, handle). Up to 200 characters.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "users",
                "leads"
              ],
              "default": "users",
              "description": "Which people to list. `users`: identified customers; `leads`: anonymous visitors who engaged. Defaults to `users`.",
              "example": "users"
            },
            "required": false,
            "description": "Which people to list. `users`: identified customers; `leads`: anonymous visitors who engaged. Defaults to `users`.",
            "name": "lifecycle",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "Filter by account email verification: `true` lists only verified people, `false` only unverified ones. Omit to list both.",
              "example": "true"
            },
            "required": false,
            "description": "Filter by account email verification: `true` lists only verified people, `false` only unverified ones. Omit to list both.",
            "name": "verified",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only people in this segment. Accepts the TypeID or its UUID. An unknown segment answers 404.",
              "example": "segment_01m8rz9gcafztr3vc6be5k87hk"
            },
            "required": false,
            "description": "Only people in this segment. Accepts the TypeID or its UUID. An unknown segment answers 404.",
            "name": "segmentId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only people with this user tag. Accepts the TypeID or its UUID. An unknown tag answers 404.",
              "example": "user_tag_01m8rz9gcafztr3vc810dwfx5r"
            },
            "required": false,
            "description": "Only people with this user tag. Accepts the TypeID or its UUID. An unknown tag answers 404.",
            "name": "tagId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest",
                "name",
                "most_active"
              ],
              "default": "newest",
              "description": "Sort order. `newest`: most recently added first; `oldest`: earliest added first; `name`: by name, A to Z; `most_active`: most posts, comments and votes combined first. Defaults to `newest`.",
              "example": "newest"
            },
            "required": false,
            "description": "Sort order. `newest`: most recently added first; `oldest`: earliest added first; `name`: by name, A to Z; `most_active`: most posts, comments and votes combined first. Defaults to `newest`.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 100000,
              "default": 0,
              "description": "Number of matching people to skip, from 0 to 100,000. Pass the previous page's `nextOffset`. Defaults to 0.",
              "example": 0
            },
            "required": false,
            "description": "Number of matching people to skip, from 0 to 100,000. Pass the previous page's `nextOffset`. Defaults to 0.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Maximum number of people to return, from 1 to 100. Defaults to 20.",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of people to return, from 1 to 100. Defaults to 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of people",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the person: their actor in the support desk. Use it in the `/users/{principalId}` routes.",
                            "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                          },
                          "userId": {
                            "type": "string",
                            "description": "ID of the person's customer profile, which holds their name, email and attributes.",
                            "example": "user_01m8rz9gcafztr3vbvz8yn3197"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the person.",
                            "example": "Dana Whitfield"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Account email of the person. Null when unset, or when it's the placeholder address that an anonymous lead's profile carries.",
                            "example": "dana@example.com"
                          },
                          "contactEmail": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Contact email the person left, typically a lead who gave an address in the messenger. Null when none was given.",
                            "example": "dana.w@example.com"
                          },
                          "image": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the person's avatar image. Null when unset.",
                            "example": "https://example.com/avatars/dana.png"
                          },
                          "emailVerified": {
                            "type": "boolean",
                            "description": "Whether the account email is verified.",
                            "example": true
                          },
                          "isLead": {
                            "type": "boolean",
                            "description": "Whether the person is a lead: an anonymous visitor who hasn't been identified. False for an identified customer.",
                            "example": false
                          },
                          "country": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Country of the person as an ISO 3166-1 alpha-2 code, taken from the request's geo headers when a session starts. Null when unknown.",
                            "example": "DE"
                          },
                          "locale": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Locale that the person's sign-in provider reported, as a BCP 47 tag. Null when unknown.",
                            "example": "en-US"
                          },
                          "externalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID your app gave the person: the verified `sub` of a widget identify token, or the `externalId` set through the API. Null when unset.",
                            "example": "usr_48213"
                          },
                          "attributes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Key of the attribute, as named by its definition.",
                                  "example": "plan"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 1000
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    }
                                  ],
                                  "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                                  "example": "enterprise"
                                }
                              },
                              "required": [
                                "key",
                                "value"
                              ]
                            },
                            "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                          },
                          "companyId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the company the person belongs to. Null when none.",
                            "example": "company_01m8rz9gcafztr3vee9jvpa75f"
                          },
                          "blockedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked. A blocked person's portal and widget requests are refused.",
                            "example": null
                          },
                          "joinedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the person was added to the workspace (their principal was created), in ISO 8601 UTC.",
                            "example": "2026-02-11T15:04:22.000Z"
                          },
                          "postCount": {
                            "type": "number",
                            "description": "Number of feedback posts the person wrote, deleted posts left out.",
                            "example": 3
                          },
                          "commentCount": {
                            "type": "number",
                            "description": "Number of comments the person wrote on feedback posts, leaving out deleted comments and comments on test customers' posts.",
                            "example": 7
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of feedback posts the person voted for, leaving out votes on test customers' posts.",
                            "example": 12
                          }
                        },
                        "required": [
                          "principalId",
                          "userId",
                          "name",
                          "email",
                          "contactEmail",
                          "image",
                          "emailVerified",
                          "isLead",
                          "country",
                          "locale",
                          "externalId",
                          "attributes",
                          "companyId",
                          "blockedAt",
                          "joinedAt",
                          "postCount",
                          "commentCount",
                          "voteCount"
                        ]
                      },
                      "description": "The people on this page, in the requested order."
                    },
                    "total": {
                      "type": "number",
                      "description": "Number of people that match the filters, across all pages.",
                      "example": 148
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page. Null when this page is the last one.",
                      "example": 20
                    }
                  },
                  "required": [
                    "items",
                    "total",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Segment not found, or tag not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsUser",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Create a customer",
        "description": "Creates an identified customer: a customer profile and its principal. Not idempotent: use `POST /users/identify` to create or update by email or external ID. Requires the `create` permission. Records a `user.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Name of the customer. 1 to 200 characters.",
                    "example": "Dana Whitfield"
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 254,
                    "format": "email",
                    "description": "Account email of the customer, stored in lowercase. Must not belong to another profile in the workspace (409). Omit to create a customer without an email.",
                    "example": "dana@example.com"
                  },
                  "emailVerified": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether to mark the email as verified. Ignored without `email`. Defaults to false.",
                    "example": false
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the person: their actor in the support desk. Use it in the `/users/{principalId}` routes.",
                      "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                    },
                    "userId": {
                      "type": "string",
                      "description": "ID of the person's customer profile, which holds their name, email and attributes.",
                      "example": "user_01m8rz9gcafztr3vbvz8yn3197"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the person.",
                      "example": "Dana Whitfield"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Account email of the person. Null when unset, or when it's the placeholder address that an anonymous lead's profile carries.",
                      "example": "dana@example.com"
                    },
                    "contactEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Contact email the person left, typically a lead who gave an address in the messenger. Null when none was given.",
                      "example": "dana.w@example.com"
                    },
                    "image": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the person's avatar image. Null when unset.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "emailVerified": {
                      "type": "boolean",
                      "description": "Whether the account email is verified.",
                      "example": true
                    },
                    "isLead": {
                      "type": "boolean",
                      "description": "Whether the person is a lead: an anonymous visitor who hasn't been identified. False for an identified customer.",
                      "example": false
                    },
                    "country": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Country of the person as an ISO 3166-1 alpha-2 code, taken from the request's geo headers when a session starts. Null when unknown.",
                      "example": "DE"
                    },
                    "locale": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Locale that the person's sign-in provider reported, as a BCP 47 tag. Null when unknown.",
                      "example": "en-US"
                    },
                    "externalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID your app gave the person: the verified `sub` of a widget identify token, or the `externalId` set through the API. Null when unset.",
                      "example": "usr_48213"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the attribute, as named by its definition.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 1000
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ],
                            "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                            "example": "enterprise"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ]
                      },
                      "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                    },
                    "companyId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the company the person belongs to. Null when none.",
                      "example": "company_01m8rz9gcafztr3vee9jvpa75f"
                    },
                    "blockedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked. A blocked person's portal and widget requests are refused.",
                      "example": null
                    },
                    "joinedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the person was added to the workspace (their principal was created), in ISO 8601 UTC.",
                      "example": "2026-02-11T15:04:22.000Z"
                    },
                    "postCount": {
                      "type": "number",
                      "description": "Number of feedback posts the person wrote, deleted posts left out.",
                      "example": 3
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments the person wrote on feedback posts, leaving out deleted comments and comments on test customers' posts.",
                      "example": 7
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of feedback posts the person voted for, leaving out votes on test customers' posts.",
                      "example": 12
                    }
                  },
                  "required": [
                    "principalId",
                    "userId",
                    "name",
                    "email",
                    "contactEmail",
                    "image",
                    "emailVerified",
                    "isLead",
                    "country",
                    "locale",
                    "externalId",
                    "attributes",
                    "companyId",
                    "blockedAt",
                    "joinedAt",
                    "postCount",
                    "commentCount",
                    "voteCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Email already in use by another profile in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/by-email": {
      "get": {
        "operationId": "findQuillsUsersByEmail",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Find the customer and the leads that use an email address",
        "description": "Returns the identified customer whose account email matches, and the leads whose contact email matches, case-insensitive and oldest first. Teammates, test customers and service principals never match. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 254,
              "format": "email",
              "description": "Email address to look up, matched case-insensitive. Up to 254 characters.",
              "example": "dana@example.com"
            },
            "required": true,
            "description": "Email address to look up, matched case-insensitive. Up to 254 characters.",
            "name": "email",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The identified customer and up to 20 leads",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "principalId": {
                          "type": "string",
                          "description": "Principal ID of the person: their actor in the support desk. Use it in the `/users/{principalId}` routes.",
                          "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                        },
                        "userId": {
                          "type": "string",
                          "description": "ID of the person's customer profile, which holds their name, email and attributes.",
                          "example": "user_01m8rz9gcafztr3vbvz8yn3197"
                        },
                        "name": {
                          "type": "string",
                          "description": "Name of the person.",
                          "example": "Dana Whitfield"
                        },
                        "email": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Account email of the person. Null when unset, or when it's the placeholder address that an anonymous lead's profile carries.",
                          "example": "dana@example.com"
                        },
                        "contactEmail": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Contact email the person left, typically a lead who gave an address in the messenger. Null when none was given.",
                          "example": "dana.w@example.com"
                        },
                        "image": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "URL of the person's avatar image. Null when unset.",
                          "example": "https://example.com/avatars/dana.png"
                        },
                        "emailVerified": {
                          "type": "boolean",
                          "description": "Whether the account email is verified.",
                          "example": true
                        },
                        "isLead": {
                          "type": "boolean",
                          "description": "Whether the person is a lead: an anonymous visitor who hasn't been identified. False for an identified customer.",
                          "example": false
                        },
                        "country": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Country of the person as an ISO 3166-1 alpha-2 code, taken from the request's geo headers when a session starts. Null when unknown.",
                          "example": "DE"
                        },
                        "locale": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Locale that the person's sign-in provider reported, as a BCP 47 tag. Null when unknown.",
                          "example": "en-US"
                        },
                        "externalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID your app gave the person: the verified `sub` of a widget identify token, or the `externalId` set through the API. Null when unset.",
                          "example": "usr_48213"
                        },
                        "attributes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "Key of the attribute, as named by its definition.",
                                "example": "plan"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 1000
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  }
                                ],
                                "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                                "example": "enterprise"
                              }
                            },
                            "required": [
                              "key",
                              "value"
                            ]
                          },
                          "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                        },
                        "companyId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the company the person belongs to. Null when none.",
                          "example": "company_01m8rz9gcafztr3vee9jvpa75f"
                        },
                        "blockedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked. A blocked person's portal and widget requests are refused.",
                          "example": null
                        },
                        "joinedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the person was added to the workspace (their principal was created), in ISO 8601 UTC.",
                          "example": "2026-02-11T15:04:22.000Z"
                        },
                        "postCount": {
                          "type": "number",
                          "description": "Number of feedback posts the person wrote, deleted posts left out.",
                          "example": 3
                        },
                        "commentCount": {
                          "type": "number",
                          "description": "Number of comments the person wrote on feedback posts, leaving out deleted comments and comments on test customers' posts.",
                          "example": 7
                        },
                        "voteCount": {
                          "type": "number",
                          "description": "Number of feedback posts the person voted for, leaving out votes on test customers' posts.",
                          "example": 12
                        }
                      },
                      "required": [
                        "principalId",
                        "userId",
                        "name",
                        "email",
                        "contactEmail",
                        "image",
                        "emailVerified",
                        "isLead",
                        "country",
                        "locale",
                        "externalId",
                        "attributes",
                        "companyId",
                        "blockedAt",
                        "joinedAt",
                        "postCount",
                        "commentCount",
                        "voteCount"
                      ],
                      "description": "The identified customer with this account email, the earliest added when several match. Null when none."
                    },
                    "leads": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the person: their actor in the support desk. Use it in the `/users/{principalId}` routes.",
                            "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                          },
                          "userId": {
                            "type": "string",
                            "description": "ID of the person's customer profile, which holds their name, email and attributes.",
                            "example": "user_01m8rz9gcafztr3vbvz8yn3197"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the person.",
                            "example": "Dana Whitfield"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Account email of the person. Null when unset, or when it's the placeholder address that an anonymous lead's profile carries.",
                            "example": "dana@example.com"
                          },
                          "contactEmail": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Contact email the person left, typically a lead who gave an address in the messenger. Null when none was given.",
                            "example": "dana.w@example.com"
                          },
                          "image": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the person's avatar image. Null when unset.",
                            "example": "https://example.com/avatars/dana.png"
                          },
                          "emailVerified": {
                            "type": "boolean",
                            "description": "Whether the account email is verified.",
                            "example": true
                          },
                          "isLead": {
                            "type": "boolean",
                            "description": "Whether the person is a lead: an anonymous visitor who hasn't been identified. False for an identified customer.",
                            "example": false
                          },
                          "country": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Country of the person as an ISO 3166-1 alpha-2 code, taken from the request's geo headers when a session starts. Null when unknown.",
                            "example": "DE"
                          },
                          "locale": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Locale that the person's sign-in provider reported, as a BCP 47 tag. Null when unknown.",
                            "example": "en-US"
                          },
                          "externalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID your app gave the person: the verified `sub` of a widget identify token, or the `externalId` set through the API. Null when unset.",
                            "example": "usr_48213"
                          },
                          "attributes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Key of the attribute, as named by its definition.",
                                  "example": "plan"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 1000
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    }
                                  ],
                                  "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                                  "example": "enterprise"
                                }
                              },
                              "required": [
                                "key",
                                "value"
                              ]
                            },
                            "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                          },
                          "companyId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the company the person belongs to. Null when none.",
                            "example": "company_01m8rz9gcafztr3vee9jvpa75f"
                          },
                          "blockedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked. A blocked person's portal and widget requests are refused.",
                            "example": null
                          },
                          "joinedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the person was added to the workspace (their principal was created), in ISO 8601 UTC.",
                            "example": "2026-02-11T15:04:22.000Z"
                          },
                          "postCount": {
                            "type": "number",
                            "description": "Number of feedback posts the person wrote, deleted posts left out.",
                            "example": 3
                          },
                          "commentCount": {
                            "type": "number",
                            "description": "Number of comments the person wrote on feedback posts, leaving out deleted comments and comments on test customers' posts.",
                            "example": 7
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of feedback posts the person voted for, leaving out votes on test customers' posts.",
                            "example": 12
                          }
                        },
                        "required": [
                          "principalId",
                          "userId",
                          "name",
                          "email",
                          "contactEmail",
                          "image",
                          "emailVerified",
                          "isLead",
                          "country",
                          "locale",
                          "externalId",
                          "attributes",
                          "companyId",
                          "blockedAt",
                          "joinedAt",
                          "postCount",
                          "commentCount",
                          "voteCount"
                        ]
                      },
                      "description": "Leads with this contact email, earliest added first. Up to 20."
                    }
                  },
                  "required": [
                    "user",
                    "leads"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/by-external-id": {
      "get": {
        "operationId": "findQuillsUserByExternalId",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Find the customer with your app's user ID",
        "description": "Returns the identified customer whose external ID matches exactly (case-sensitive). The external ID is the ID your app gave the person: the signed `sub` of a widget identify token, or the `externalId` sent to the identify or update route. Use the returned principal ID with the voter and subscriber routes to vote or subscribe on their behalf. Leads, teammates and test customers never match. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "External ID to look up, matched exactly after trimming spaces. 1 to 255 characters.",
              "example": "usr_48213"
            },
            "required": true,
            "description": "External ID to look up, matched exactly after trimming spaces. 1 to 255 characters.",
            "name": "externalId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the person: their actor in the support desk. Use it in the `/users/{principalId}` routes.",
                      "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                    },
                    "userId": {
                      "type": "string",
                      "description": "ID of the person's customer profile, which holds their name, email and attributes.",
                      "example": "user_01m8rz9gcafztr3vbvz8yn3197"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the person.",
                      "example": "Dana Whitfield"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Account email of the person. Null when unset, or when it's the placeholder address that an anonymous lead's profile carries.",
                      "example": "dana@example.com"
                    },
                    "contactEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Contact email the person left, typically a lead who gave an address in the messenger. Null when none was given.",
                      "example": "dana.w@example.com"
                    },
                    "image": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the person's avatar image. Null when unset.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "emailVerified": {
                      "type": "boolean",
                      "description": "Whether the account email is verified.",
                      "example": true
                    },
                    "isLead": {
                      "type": "boolean",
                      "description": "Whether the person is a lead: an anonymous visitor who hasn't been identified. False for an identified customer.",
                      "example": false
                    },
                    "country": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Country of the person as an ISO 3166-1 alpha-2 code, taken from the request's geo headers when a session starts. Null when unknown.",
                      "example": "DE"
                    },
                    "locale": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Locale that the person's sign-in provider reported, as a BCP 47 tag. Null when unknown.",
                      "example": "en-US"
                    },
                    "externalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID your app gave the person: the verified `sub` of a widget identify token, or the `externalId` set through the API. Null when unset.",
                      "example": "usr_48213"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the attribute, as named by its definition.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 1000
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ],
                            "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                            "example": "enterprise"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ]
                      },
                      "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                    },
                    "companyId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the company the person belongs to. Null when none.",
                      "example": "company_01m8rz9gcafztr3vee9jvpa75f"
                    },
                    "blockedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked. A blocked person's portal and widget requests are refused.",
                      "example": null
                    },
                    "joinedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the person was added to the workspace (their principal was created), in ISO 8601 UTC.",
                      "example": "2026-02-11T15:04:22.000Z"
                    },
                    "postCount": {
                      "type": "number",
                      "description": "Number of feedback posts the person wrote, deleted posts left out.",
                      "example": 3
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments the person wrote on feedback posts, leaving out deleted comments and comments on test customers' posts.",
                      "example": 7
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of feedback posts the person voted for, leaving out votes on test customers' posts.",
                      "example": 12
                    }
                  },
                  "required": [
                    "principalId",
                    "userId",
                    "name",
                    "email",
                    "contactEmail",
                    "image",
                    "emailVerified",
                    "isLead",
                    "country",
                    "locale",
                    "externalId",
                    "attributes",
                    "companyId",
                    "blockedAt",
                    "joinedAt",
                    "postCount",
                    "commentCount",
                    "voteCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No customer has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/identify": {
      "post": {
        "operationId": "identifyQuillsUser",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Create or update a customer by external ID or email",
        "description": "Finds the customer profile by `externalId` or, failing that, by email (case-insensitive), and updates it with the fields sent; a field you leave out stays unchanged, and sent attributes are merged into the stored ones. Without a match, creates a profile: its name defaults to the part of the email before the `@`. Creates the principal when the profile has none, and keeps the principal's display name and avatar in step with the profile. Repeating a request updates the same customer. Requires the `update` permission. Records a `user.identified` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 254,
                    "format": "email",
                    "description": "Email address of the customer, stored in lowercase. Matches a profile when `externalId` doesn't, and becomes the profile's account email. Up to 254 characters.",
                    "example": "dana@example.com"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Name of the customer. 1 to 200 characters. A new profile without a name takes the part of the email before the `@`.",
                    "example": "Dana Whitfield"
                  },
                  "image": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "URL of the customer's avatar image, using http or https. Up to 2,048 characters.",
                    "example": "https://example.com/avatars/dana.png"
                  },
                  "emailVerified": {
                    "type": "boolean",
                    "description": "Whether the email is verified. Omit to keep the stored value; a new profile defaults to false.",
                    "example": true
                  },
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "ID your app gives the customer, 1 to 255 characters. A profile with this external ID wins over one with the email.",
                    "example": "usr_48213"
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Custom attribute values to set, keyed by attribute definition key. Every key needs an attribute definition (a user attribute for a person, a company attribute for a company), or the request fails with 400. Each value is converted to the definition's type and must be valid for it (400 otherwise); a date is stored as an ISO 8601 string. Null removes the attribute; keys you don't send stay unchanged. Up to 50 keys of 1 to 64 characters; a string value is up to 1,000 characters.",
                    "example": {
                      "plan": "enterprise",
                      "seats": 25,
                      "beta_tester": true
                    }
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The identified customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the person: their actor in the support desk. Use it in the `/users/{principalId}` routes.",
                      "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                    },
                    "userId": {
                      "type": "string",
                      "description": "ID of the person's customer profile, which holds their name, email and attributes.",
                      "example": "user_01m8rz9gcafztr3vbvz8yn3197"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the person.",
                      "example": "Dana Whitfield"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Account email of the person. Null when unset, or when it's the placeholder address that an anonymous lead's profile carries.",
                      "example": "dana@example.com"
                    },
                    "contactEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Contact email the person left, typically a lead who gave an address in the messenger. Null when none was given.",
                      "example": "dana.w@example.com"
                    },
                    "image": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the person's avatar image. Null when unset.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "emailVerified": {
                      "type": "boolean",
                      "description": "Whether the account email is verified.",
                      "example": true
                    },
                    "isLead": {
                      "type": "boolean",
                      "description": "Whether the person is a lead: an anonymous visitor who hasn't been identified. False for an identified customer.",
                      "example": false
                    },
                    "country": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Country of the person as an ISO 3166-1 alpha-2 code, taken from the request's geo headers when a session starts. Null when unknown.",
                      "example": "DE"
                    },
                    "locale": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Locale that the person's sign-in provider reported, as a BCP 47 tag. Null when unknown.",
                      "example": "en-US"
                    },
                    "externalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID your app gave the person: the verified `sub` of a widget identify token, or the `externalId` set through the API. Null when unset.",
                      "example": "usr_48213"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the attribute, as named by its definition.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 1000
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ],
                            "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                            "example": "enterprise"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ]
                      },
                      "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                    },
                    "companyId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the company the person belongs to. Null when none.",
                      "example": "company_01m8rz9gcafztr3vee9jvpa75f"
                    },
                    "blockedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked. A blocked person's portal and widget requests are refused.",
                      "example": null
                    },
                    "joinedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the person was added to the workspace (their principal was created), in ISO 8601 UTC.",
                      "example": "2026-02-11T15:04:22.000Z"
                    },
                    "postCount": {
                      "type": "number",
                      "description": "Number of feedback posts the person wrote, deleted posts left out.",
                      "example": 3
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments the person wrote on feedback posts, leaving out deleted comments and comments on test customers' posts.",
                      "example": 7
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of feedback posts the person voted for, leaving out votes on test customers' posts.",
                      "example": 12
                    },
                    "created": {
                      "type": "boolean",
                      "description": "Whether this request created the customer's principal. False when the customer already existed.",
                      "example": false
                    }
                  },
                  "required": [
                    "principalId",
                    "userId",
                    "name",
                    "email",
                    "contactEmail",
                    "image",
                    "emailVerified",
                    "isLead",
                    "country",
                    "locale",
                    "externalId",
                    "attributes",
                    "companyId",
                    "blockedAt",
                    "joinedAt",
                    "postCount",
                    "commentCount",
                    "voteCount",
                    "created"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The matching profile is linked to an account, such as a teammate's, or the profile matched by external ID would take an email that another profile uses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}": {
      "get": {
        "operationId": "getQuillsUser",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Get a customer with segments and tags",
        "description": "Returns one customer or lead with the segments they belong to and their user tags, each sorted by name. Deleted segments and tags are left out. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the person: their actor in the support desk. Use it in the `/users/{principalId}` routes.",
                      "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                    },
                    "userId": {
                      "type": "string",
                      "description": "ID of the person's customer profile, which holds their name, email and attributes.",
                      "example": "user_01m8rz9gcafztr3vbvz8yn3197"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the person.",
                      "example": "Dana Whitfield"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Account email of the person. Null when unset, or when it's the placeholder address that an anonymous lead's profile carries.",
                      "example": "dana@example.com"
                    },
                    "contactEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Contact email the person left, typically a lead who gave an address in the messenger. Null when none was given.",
                      "example": "dana.w@example.com"
                    },
                    "image": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the person's avatar image. Null when unset.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "emailVerified": {
                      "type": "boolean",
                      "description": "Whether the account email is verified.",
                      "example": true
                    },
                    "isLead": {
                      "type": "boolean",
                      "description": "Whether the person is a lead: an anonymous visitor who hasn't been identified. False for an identified customer.",
                      "example": false
                    },
                    "country": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Country of the person as an ISO 3166-1 alpha-2 code, taken from the request's geo headers when a session starts. Null when unknown.",
                      "example": "DE"
                    },
                    "locale": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Locale that the person's sign-in provider reported, as a BCP 47 tag. Null when unknown.",
                      "example": "en-US"
                    },
                    "externalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID your app gave the person: the verified `sub` of a widget identify token, or the `externalId` set through the API. Null when unset.",
                      "example": "usr_48213"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the attribute, as named by its definition.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 1000
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ],
                            "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                            "example": "enterprise"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ]
                      },
                      "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                    },
                    "companyId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the company the person belongs to. Null when none.",
                      "example": "company_01m8rz9gcafztr3vee9jvpa75f"
                    },
                    "blockedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked. A blocked person's portal and widget requests are refused.",
                      "example": null
                    },
                    "joinedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the person was added to the workspace (their principal was created), in ISO 8601 UTC.",
                      "example": "2026-02-11T15:04:22.000Z"
                    },
                    "postCount": {
                      "type": "number",
                      "description": "Number of feedback posts the person wrote, deleted posts left out.",
                      "example": 3
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments the person wrote on feedback posts, leaving out deleted comments and comments on test customers' posts.",
                      "example": 7
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of feedback posts the person voted for, leaving out votes on test customers' posts.",
                      "example": 12
                    },
                    "segments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the segment.",
                            "example": "segment_01m8rz9gcafztr3vc6be5k87hk"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the segment.",
                            "example": "Enterprise trials"
                          },
                          "color": {
                            "type": "string",
                            "description": "Color of the segment as a hex code.",
                            "example": "#6b7280"
                          },
                          "type": {
                            "type": "string",
                            "description": "Kind of segment. `manual`: teammates add and remove members; `dynamic`: membership comes from evaluating the segment's rules.",
                            "example": "manual"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "type"
                        ]
                      },
                      "description": "Segments the person belongs to, by name. Up to 100."
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the user tag.",
                            "example": "user_tag_01m8rz9gcafztr3vc810dwfx5r"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the tag.",
                            "example": "VIP"
                          },
                          "color": {
                            "type": "string",
                            "description": "Display color of the tag, typically a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "User tags assigned to the person, by name. Up to 100."
                    }
                  },
                  "required": [
                    "principalId",
                    "userId",
                    "name",
                    "email",
                    "contactEmail",
                    "image",
                    "emailVerified",
                    "isLead",
                    "country",
                    "locale",
                    "externalId",
                    "attributes",
                    "companyId",
                    "blockedAt",
                    "joinedAt",
                    "postCount",
                    "commentCount",
                    "voteCount",
                    "segments",
                    "tags"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: no customer or lead of this workspace has this principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateQuillsUser",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Update a customer's profile and attributes",
        "description": "Updates the fields sent; a field you leave out stays unchanged. Send at least one field (400 otherwise). For a lead, `email` sets the contact email instead of the account email. Attributes need a user attribute definition; null removes one. A portal customer's profile, linked to their sign-in account, keeps its email, email verification and external ID (409). Requires the `update` permission. Records a `user.updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Name of the person, 1 to 200 characters. Also becomes the principal's display name.",
                    "example": "Dana Whitfield"
                  },
                  "email": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 254,
                    "format": "email",
                    "description": "Email address, stored in lowercase. For an identified customer, the account email, which must not belong to another profile (409); for a lead, the contact email. Null clears it.",
                    "example": "dana@example.com"
                  },
                  "image": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "URL of the person's avatar image, using http or https, up to 2,048 characters. Null clears it.",
                    "example": "https://example.com/avatars/dana.png"
                  },
                  "emailVerified": {
                    "type": "boolean",
                    "description": "Whether the account email is verified.",
                    "example": true
                  },
                  "externalId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "ID your app gives the person, 1 to 255 characters. Must not belong to another profile (409). Null clears it.",
                    "example": "usr_48213"
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Custom attribute values to set, keyed by attribute definition key. Every key needs an attribute definition (a user attribute for a person, a company attribute for a company), or the request fails with 400. Each value is converted to the definition's type and must be valid for it (400 otherwise); a date is stored as an ISO 8601 string. Null removes the attribute; keys you don't send stay unchanged. Up to 50 keys of 1 to 64 characters; a string value is up to 1,000 characters.",
                    "example": {
                      "plan": "enterprise",
                      "seats": 25,
                      "beta_tester": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the person: their actor in the support desk. Use it in the `/users/{principalId}` routes.",
                      "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                    },
                    "userId": {
                      "type": "string",
                      "description": "ID of the person's customer profile, which holds their name, email and attributes.",
                      "example": "user_01m8rz9gcafztr3vbvz8yn3197"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the person.",
                      "example": "Dana Whitfield"
                    },
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Account email of the person. Null when unset, or when it's the placeholder address that an anonymous lead's profile carries.",
                      "example": "dana@example.com"
                    },
                    "contactEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Contact email the person left, typically a lead who gave an address in the messenger. Null when none was given.",
                      "example": "dana.w@example.com"
                    },
                    "image": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the person's avatar image. Null when unset.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "emailVerified": {
                      "type": "boolean",
                      "description": "Whether the account email is verified.",
                      "example": true
                    },
                    "isLead": {
                      "type": "boolean",
                      "description": "Whether the person is a lead: an anonymous visitor who hasn't been identified. False for an identified customer.",
                      "example": false
                    },
                    "country": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Country of the person as an ISO 3166-1 alpha-2 code, taken from the request's geo headers when a session starts. Null when unknown.",
                      "example": "DE"
                    },
                    "locale": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Locale that the person's sign-in provider reported, as a BCP 47 tag. Null when unknown.",
                      "example": "en-US"
                    },
                    "externalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID your app gave the person: the verified `sub` of a widget identify token, or the `externalId` set through the API. Null when unset.",
                      "example": "usr_48213"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the attribute, as named by its definition.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 1000
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ],
                            "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                            "example": "enterprise"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ]
                      },
                      "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                    },
                    "companyId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the company the person belongs to. Null when none.",
                      "example": "company_01m8rz9gcafztr3vee9jvpa75f"
                    },
                    "blockedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked. A blocked person's portal and widget requests are refused.",
                      "example": null
                    },
                    "joinedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the person was added to the workspace (their principal was created), in ISO 8601 UTC.",
                      "example": "2026-02-11T15:04:22.000Z"
                    },
                    "postCount": {
                      "type": "number",
                      "description": "Number of feedback posts the person wrote, deleted posts left out.",
                      "example": 3
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments the person wrote on feedback posts, leaving out deleted comments and comments on test customers' posts.",
                      "example": 7
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of feedback posts the person voted for, leaving out votes on test customers' posts.",
                      "example": 12
                    }
                  },
                  "required": [
                    "principalId",
                    "userId",
                    "name",
                    "email",
                    "contactEmail",
                    "image",
                    "emailVerified",
                    "isLead",
                    "country",
                    "locale",
                    "externalId",
                    "attributes",
                    "companyId",
                    "blockedAt",
                    "joinedAt",
                    "postCount",
                    "commentCount",
                    "voteCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: no customer or lead of this workspace has this principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Email or external ID already in use by another profile, or the profile is linked to a sign-in account and keeps its email, email verification and external ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsUser",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Remove a customer",
        "description": "Removes the customer's or lead's principal and keeps the profile for a later sign-in. Clears the profile's external ID and widget identity key first, so a later identify can't resolve to it. A person who still authors posts, comments or conversations can't be removed (409), and nothing changes. Requires the `delete` permission. Records a `user.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The removed customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the removed person.",
                      "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                    }
                  },
                  "required": [
                    "principalId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: no customer or lead of this workspace has this principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The person still authors posts, comments or conversations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}/duplicates": {
      "get": {
        "operationId": "listQuillsUserDuplicates",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List possible duplicates of a customer",
        "description": "Lists other customers and leads that share this person's name, or whose account or contact email equals this person's account or contact email, case-insensitive. Earliest added first. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Up to 20 possible duplicates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the person: their actor in the support desk. Use it in the `/users/{principalId}` routes.",
                            "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                          },
                          "userId": {
                            "type": "string",
                            "description": "ID of the person's customer profile, which holds their name, email and attributes.",
                            "example": "user_01m8rz9gcafztr3vbvz8yn3197"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the person.",
                            "example": "Dana Whitfield"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Account email of the person. Null when unset, or when it's the placeholder address that an anonymous lead's profile carries.",
                            "example": "dana@example.com"
                          },
                          "contactEmail": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Contact email the person left, typically a lead who gave an address in the messenger. Null when none was given.",
                            "example": "dana.w@example.com"
                          },
                          "image": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the person's avatar image. Null when unset.",
                            "example": "https://example.com/avatars/dana.png"
                          },
                          "emailVerified": {
                            "type": "boolean",
                            "description": "Whether the account email is verified.",
                            "example": true
                          },
                          "isLead": {
                            "type": "boolean",
                            "description": "Whether the person is a lead: an anonymous visitor who hasn't been identified. False for an identified customer.",
                            "example": false
                          },
                          "country": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Country of the person as an ISO 3166-1 alpha-2 code, taken from the request's geo headers when a session starts. Null when unknown.",
                            "example": "DE"
                          },
                          "locale": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Locale that the person's sign-in provider reported, as a BCP 47 tag. Null when unknown.",
                            "example": "en-US"
                          },
                          "externalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID your app gave the person: the verified `sub` of a widget identify token, or the `externalId` set through the API. Null when unset.",
                            "example": "usr_48213"
                          },
                          "attributes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Key of the attribute, as named by its definition.",
                                  "example": "plan"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 1000
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    }
                                  ],
                                  "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                                  "example": "enterprise"
                                }
                              },
                              "required": [
                                "key",
                                "value"
                              ]
                            },
                            "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                          },
                          "companyId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the company the person belongs to. Null when none.",
                            "example": "company_01m8rz9gcafztr3vee9jvpa75f"
                          },
                          "blockedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked. A blocked person's portal and widget requests are refused.",
                            "example": null
                          },
                          "joinedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the person was added to the workspace (their principal was created), in ISO 8601 UTC.",
                            "example": "2026-02-11T15:04:22.000Z"
                          },
                          "postCount": {
                            "type": "number",
                            "description": "Number of feedback posts the person wrote, deleted posts left out.",
                            "example": 3
                          },
                          "commentCount": {
                            "type": "number",
                            "description": "Number of comments the person wrote on feedback posts, leaving out deleted comments and comments on test customers' posts.",
                            "example": 7
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of feedback posts the person voted for, leaving out votes on test customers' posts.",
                            "example": 12
                          }
                        },
                        "required": [
                          "principalId",
                          "userId",
                          "name",
                          "email",
                          "contactEmail",
                          "image",
                          "emailVerified",
                          "isLead",
                          "country",
                          "locale",
                          "externalId",
                          "attributes",
                          "companyId",
                          "blockedAt",
                          "joinedAt",
                          "postCount",
                          "commentCount",
                          "voteCount"
                        ]
                      },
                      "description": "Possible duplicates, earliest added first. Up to 20."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: no customer or lead of this workspace has this principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}/timeline": {
      "get": {
        "operationId": "getQuillsUserTimeline",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Get a contact's unified cross-channel history",
        "description": "Returns one feed of a customer's or lead's conversations, tickets, feedback posts, comments, feedback signals and survey answers, newest activity first. Merged conversations and tickets, deleted tickets, deleted posts and deleted comments are left out. Takes up to `limit` items from each kind, then keeps the `limit` most recent overall; there is no paging. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "conversation",
                "ticket",
                "post",
                "comment",
                "signal",
                "survey"
              ],
              "description": "Only items of this kind: `conversation`, `ticket`, `post`, `comment`, `signal` or `survey`. Omit for every kind.",
              "example": "ticket"
            },
            "required": false,
            "description": "Only items of this kind: `conversation`, `ticket`, `post`, `comment`, `signal` or `survey`. Omit for every kind.",
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return, from 1 to 100. Defaults to 50.",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return, from 1 to 100. Defaults to 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Chronological unified timeline items (newest first)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "conversation",
                              "ticket",
                              "post",
                              "comment",
                              "signal",
                              "survey"
                            ],
                            "description": "Kind of record. `conversation`: a support conversation the person started; `ticket`: a support ticket they requested; `post`: a feedback post they wrote; `comment`: a comment they wrote on a feedback post; `signal`: a feedback signal captured from them; `survey`: their answer to a survey.",
                            "example": "conversation"
                          },
                          "id": {
                            "type": "string",
                            "description": "ID of the underlying record, a TypeID whose prefix matches `kind` (for example `conversation_`, `ticket_`, `post_`, `post_comment_`, `feedback_signal_`, `survey_response_`).",
                            "example": "conversation_01m8rz9gcafztr3vdf6ewdvd31"
                          },
                          "title": {
                            "type": "string",
                            "description": "Heading for the item. A conversation's subject (or `Conversation`); `#<number> <title>` for a ticket; a post's title; `Comment on <post title>` for a comment; a signal's suggested title (or `Feedback signal`); the survey question (or `Survey response`).",
                            "example": "Can't export invoices to CSV"
                          },
                          "preview": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Short text preview. A conversation's last message preview; the first 200 characters of a post, comment or signal excerpt; `Score <n>: <comment>` for a survey answer (comment cut to 180 characters). Null for a ticket, and when there's no text.",
                            "example": "Hi, the export button does nothing when I pick CSV."
                          },
                          "channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Channel of the item. For a conversation, its channel (`messenger`, `email` or `github`); otherwise `ticket`, `feedback` (posts and comments), `signal` or `survey`.",
                            "example": "messenger"
                          },
                          "status": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Status of the item. For a conversation `open`, `snoozed` or `closed`; for a ticket, the name of its status; for a signal `pending`, `accepted` or `dismissed`. Null for posts, comments and survey answers, and for a ticket without a status.",
                            "example": "open"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the record was created, in ISO 8601 UTC.",
                            "example": "2026-03-12T16:40:11.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time of the item's latest activity, in ISO 8601 UTC, which orders the feed: a conversation's last message, a ticket's or post's last update, a comment's last edit, otherwise the creation time.",
                            "example": "2026-03-14T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "kind",
                          "id",
                          "title",
                          "preview",
                          "channel",
                          "status",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "Timeline items, newest `updatedAt` first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: no customer or lead of this workspace has this principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}/comments": {
      "get": {
        "operationId": "listQuillsUserComments",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List the comments of a customer, newest first",
        "description": "Lists one page of a customer's or lead's comments on feedback posts, newest first, with cursor paging. Customers only. Leaves out deleted comments and comments on posts that the caller can't see: deleted posts, test-customer posts, and posts on deleted boards or on boards linked only to projects the caller can't open. `reactionCount` leaves out test customers. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the last comment of the previous page (its `nextCursor`), as a TypeID or UUID. The page starts after it. Omit for the first page. A comment that isn't in this list answers 404.",
              "example": "post_comment_01m8rz9gcafztr3vcq588czk5k"
            },
            "required": false,
            "description": "ID of the last comment of the previous page (its `nextCursor`), as a TypeID or UUID. The page starts after it. Omit for the first page. A comment that isn't in this list answers 404.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Maximum number of comments to return, from 1 to 100. Defaults to 20.",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of comments to return, from 1 to 100. Defaults to 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of comments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the comment.",
                            "example": "post_comment_01m8rz9gcafztr3vcq588czk5k"
                          },
                          "postId": {
                            "type": "string",
                            "description": "ID of the feedback post the comment is on.",
                            "example": "post_01m8rz9gcafztr3vcw9zenj74v"
                          },
                          "postTitle": {
                            "type": "string",
                            "description": "Title of the feedback post.",
                            "example": "Export invoices to CSV"
                          },
                          "content": {
                            "type": "string",
                            "description": "Text of the comment.",
                            "example": "We need this for our monthly close too."
                          },
                          "reactionCount": {
                            "type": "number",
                            "description": "Number of reactions on the comment, test customers' reactions left out.",
                            "example": 4
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the comment was written, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "postId",
                          "postTitle",
                          "content",
                          "reactionCount",
                          "createdAt"
                        ]
                      },
                      "description": "The comments on this page, newest first."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page: the ID of this page's last comment. Null on the last page.",
                      "example": "post_comment_01m8rz9gcafztr3vd7s17m2d3n"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more comments follow this page.",
                      "example": true
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found, or the cursor comment isn't in this person's visible comments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}/merge": {
      "post": {
        "operationId": "mergeQuillsLeadIntoUser",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Merge a lead into an identified customer",
        "description": "Moves the lead's activity to an identified customer and deletes the lead's profile and principal, in one transaction. It can't be undone. The lead's posts, comments, votes, reactions, conversations, messages, tickets, subscriptions, notifications, page views, devices, user tags, survey responses and other activity move to the customer; a lead row that would collide with one the customer already has (a vote on the same post, the same reaction, the same tag) is dropped and the customer's row wins, with vote and rating counts adjusted. Notification preferences are combined so an opt-out on either side wins. Manual segment memberships move to the customer; dynamic ones are dropped until the next evaluation. The customer's empty contact email, company and block are filled from the lead. Requires the `update` permission. Records a `user.lead_merged` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the lead to merge: an anonymous visitor of this workspace. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz9gc9fztr3vb2c7z8rnwv"
            },
            "required": true,
            "description": "Principal ID of the lead to merge: an anonymous visitor of this workspace. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetPrincipalId": {
                    "type": "string",
                    "description": "Principal ID of the identified customer that receives the lead's activity. Accepts the TypeID or its UUID. Must differ from the lead.",
                    "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                  }
                },
                "required": [
                  "targetPrincipalId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The customer that now holds the lead's activity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the customer that now holds the lead's activity.",
                      "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                    }
                  },
                  "required": [
                    "principalId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Lead or customer not found: the path ID isn't a lead of this workspace, the target isn't an identified customer, or both IDs are the same",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/user-tags": {
      "get": {
        "operationId": "listQuillsUserTags",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List user tags",
        "description": "Lists the workspace's user tags that aren't deleted, sorted by name. Returns at most 500, with no paging. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Live user tags, up to 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "User tag ID (TypeID).",
                            "example": "user_tag_01m8rz8c9mfk282ggk0brz4zvp"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the tag. Unique in the workspace.",
                            "example": "VIP"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as stored, usually a `#RRGGBB` hex code. Tags created by name get `#6b7280`.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ],
                        "description": "A tag that teammates put on customers."
                      },
                      "description": "User tags sorted by name, up to 500."
                    }
                  },
                  "required": [
                    "tags"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}/tags": {
      "get": {
        "operationId": "listQuillsUserTagsForPrincipal",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List the tags on a customer",
        "description": "Lists the tags on a customer, sorted by name, up to 500. Deleted tags are left out. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
              "example": "principal_01m8rz8c9mfk282gfax7mg8256"
            },
            "required": true,
            "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The customer's tags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "User tag ID (TypeID).",
                            "example": "user_tag_01m8rz8c9mfk282ggk0brz4zvp"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the tag. Unique in the workspace.",
                            "example": "VIP"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as stored, usually a `#RRGGBB` hex code. Tags created by name get `#6b7280`.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ],
                        "description": "A tag that teammates put on customers."
                      },
                      "description": "The customer's tags sorted by name, up to 500."
                    }
                  },
                  "required": [
                    "tags"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No customer with this principal ID in the workspace; teammates and test customers are not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "assignQuillsUserTag",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Tag a customer by tag ID, or by name (created when missing)",
        "description": "Puts a tag on a customer. Send `tagId` to use an existing tag, or `name` to use the tag with exactly that name; when none exists, the tag is created, or restored with its old color if it was deleted. Tagging a customer who already has the tag changes nothing. Records a `user.tagged` event, even then. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
              "example": "principal_01m8rz8c9mfk282gfax7mg8256"
            },
            "required": true,
            "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tagId": {
                    "type": "string",
                    "description": "ID of an existing tag that isn't deleted. Accepts the TypeID or its UUID. Send either this or `name`, not both.",
                    "example": "user_tag_01m8rz8c9mfk282ggk0brz4zvp"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Name of the tag, matched exactly (including case); the tag is created when missing. 1 to 100 characters after trimming. Send either this or `tagId`, not both.",
                    "example": "VIP"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The assigned tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "User tag ID (TypeID).",
                      "example": "user_tag_01m8rz8c9mfk282ggk0brz4zvp"
                    },
                    "name": {
                      "type": "string",
                      "description": "Name of the tag. Unique in the workspace.",
                      "example": "VIP"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as stored, usually a `#RRGGBB` hex code. Tags created by name get `#6b7280`.",
                      "example": "#6b7280"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "color"
                  ],
                  "description": "A tag that teammates put on customers."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No customer with this principal ID in the workspace, or no tag with `tagId` that isn't deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}/tags/{tagId}": {
      "delete": {
        "operationId": "removeQuillsUserTag",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Remove a tag from a customer",
        "description": "Removes a tag from a customer. The tag itself is kept. Records a `user.untagged` event, even when the customer didn't have the tag. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
              "example": "principal_01m8rz8c9mfk282gfax7mg8256"
            },
            "required": true,
            "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
            "name": "principalId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the tag to remove. Accepts the TypeID or its UUID. A deleted tag is still found.",
              "example": "user_tag_01m8rz8c9mfk282ggk0brz4zvp"
            },
            "required": true,
            "description": "ID of the tag to remove. Accepts the TypeID or its UUID. A deleted tag is still found.",
            "name": "tagId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the tag was on the customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "removed": {
                      "type": "boolean",
                      "description": "Whether the customer had the tag. `false` means nothing changed.",
                      "example": true
                    }
                  },
                  "required": [
                    "removed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No customer with this principal ID, or no tag with this ID, in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}/block": {
      "get": {
        "operationId": "getQuillsUserBlock",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Get whether a customer is blocked",
        "description": "Returns when the customer or lead was blocked, or null when they aren't. A blocked person's portal and widget requests are refused with 403. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Block status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "blockedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked.",
                      "example": "2026-03-14T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "blockedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: no customer or lead of this workspace has this principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "blockQuillsUser",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Block a customer",
        "description": "Blocks the customer or lead and records the caller as the teammate who blocked them. A blocked person's portal and widget requests are refused with 403. Idempotent: an existing block keeps its original time and teammate. Requires the `update` permission. Records a `user.blocked` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Block status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "blockedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked.",
                      "example": "2026-03-14T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "blockedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: no customer or lead of this workspace has this principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "unblockQuillsUser",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Unblock a customer",
        "description": "Lifts the block on the customer or lead, so their portal and widget requests are accepted again. Idempotent: unblocking a person who isn't blocked changes nothing. Requires the `update` permission. Records a `user.unblocked` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
              "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
            },
            "required": true,
            "description": "Principal ID of the customer or lead. Accepts the TypeID or its UUID. Teammates, test customers and service principals answer 404.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Block status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "blockedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked.",
                      "example": "2026-03-14T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "blockedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: no customer or lead of this workspace has this principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/companies/import": {
      "post": {
        "operationId": "importQuillsCompanies",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Create or update companies, with their revenue, from a CSV file",
        "description": "Creates or updates companies from a CSV file, all rows or none. A row updates the company with the same external_id, else the company with the same domain (ignoring case), else creates a company with source `manual`, which needs a name. An empty cell leaves that field unchanged on an existing company. Up to 1000 rows. One invalid row rejects the whole file with a 400 that lists every problem, and nothing changes. A file with any `mrr` value requires the `view_revenue` permission (403 otherwise). Custom attributes can't be imported. Records one `company.imported` event with the created and updated counts. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "csv": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "CSV text, up to 100,000 characters, with a header row of these columns in any order (names ignore case): `name` (up to 200 characters), `domain` (up to 255), `external_id` (up to 255), `plan` (up to 100) and `mrr`, the monthly revenue in major units with up to 8 whole digits and 2 decimals and at most 21474836.47, such as `1250.50` (stored in cents). Unknown or repeated columns reject the file. Each of the 1 to 1000 data rows needs a name, domain or external_id, and two rows can't share a domain or external_id or name the same company.",
                    "example": "name,domain,external_id,plan,mrr\nAcme Corp,example.com,crm_48213,Scale,1250.50"
                  }
                },
                "required": [
                  "csv"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "How many companies the file created and updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "created": {
                      "type": "number",
                      "description": "Number of companies the file created.",
                      "example": 3
                    },
                    "updated": {
                      "type": "number",
                      "description": "Number of existing companies the file updated.",
                      "example": 17
                    }
                  },
                  "required": [
                    "created",
                    "updated"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The CSV is invalid: it can't be parsed, has unknown or repeated columns, no rows or too many, a value that is too long, an `mrr` that isn't an amount, a row without name, domain or external_id, two rows for one company, a domain and external_id of different companies, or a new company without a name. Each problem is an issue on `csv` (up to 100); the message lists the first 20",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another request added a company with one of the file's domains or external IDs during the import. Nothing changed; try again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/companies": {
      "get": {
        "operationId": "listQuillsCompanies",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List companies",
        "description": "Lists the workspace's companies, sorted by name and then ID, with offset paging and a total count. `search` matches the name or domain; `plan` filters by plan label. `mrrCents` is null unless the caller holds the `view_revenue` permission. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Text matched anywhere in the company name or domain, ignoring case. Up to 200 characters after trimming.",
              "example": "acme"
            },
            "required": false,
            "description": "Text matched anywhere in the company name or domain, ignoring case. Up to 200 characters after trimming.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Plan label to filter by. Matches the whole label exactly, including case. Up to 100 characters after trimming.",
              "example": "Scale"
            },
            "required": false,
            "description": "Plan label to filter by. Matches the whole label exactly, including case. Up to 100 characters after trimming.",
            "name": "plan",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 100000,
              "default": 0,
              "description": "Number of companies to skip, from 0 to 100000. Defaults to 0. Use `nextOffset` from the previous page.",
              "example": 0
            },
            "required": false,
            "description": "Number of companies to skip, from 0 to 100000. Defaults to 0. Use `nextOffset` from the previous page.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of companies to return, from 1 to 100. Defaults to 50.",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of companies to return, from 1 to 100. Defaults to 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of companies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "companies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Company ID (TypeID).",
                            "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name of the company.",
                            "example": "Acme Corp"
                          },
                          "domain": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Email domain of the company. Unique in the workspace, ignoring case. Null when unset.",
                            "example": "example.com"
                          },
                          "externalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the company in an external system, such as a CRM. Unique in the workspace. Null when unset.",
                            "example": "crm_48213"
                          },
                          "plan": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Free-text plan label. Null when unset.",
                            "example": "Scale"
                          },
                          "mrrCents": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Monthly recurring revenue in cents (hundredths of the currency unit; no currency is stored), so `125050` is 1,250.50. Null when unset, and always null when the caller lacks the `view_revenue` permission.",
                            "example": 125050
                          },
                          "churnRisk": {
                            "type": "boolean",
                            "description": "Whether the company is flagged as at risk of churning. Feedback demand reports give at-risk companies more weight.",
                            "example": false
                          },
                          "size": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Free-text company size. Null when unset.",
                            "example": "51-200"
                          },
                          "website": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Website of the company, as entered; it isn't checked to be a URL. Null when unset.",
                            "example": "https://example.com"
                          },
                          "industry": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Free-text industry. Null when unset.",
                            "example": "Software"
                          },
                          "source": {
                            "type": "string",
                            "description": "How the company was created. `manual`: by a teammate in the app (create, CSV import, or attaching a customer by name); `api`: by an integration, such as the `companies` claim of a signed widget identity.",
                            "example": "manual"
                          },
                          "attributes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Key of the attribute, as named by its definition.",
                                  "example": "plan"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 1000
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    }
                                  ],
                                  "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                                  "example": "enterprise"
                                }
                              },
                              "required": [
                                "key",
                                "value"
                              ]
                            },
                            "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                          },
                          "memberCount": {
                            "type": "number",
                            "description": "Number of people linked to the company. Teammates and test customers are not counted.",
                            "example": 12
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the company was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the company was last changed, in ISO 8601 UTC.",
                            "example": "2026-11-18T10:42:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "domain",
                          "externalId",
                          "plan",
                          "mrrCents",
                          "churnRisk",
                          "size",
                          "website",
                          "industry",
                          "source",
                          "attributes",
                          "memberCount",
                          "createdAt",
                          "updatedAt"
                        ],
                        "description": "A company: the customer organization that people belong to, with its plan, revenue and custom attributes."
                      },
                      "description": "Companies on this page, sorted by name and then ID."
                    },
                    "total": {
                      "type": "number",
                      "description": "Number of companies that match the filters, across all pages.",
                      "example": 134
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page. Null on the last page.",
                      "example": 50
                    }
                  },
                  "required": [
                    "companies",
                    "total",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsCompany",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Create a company",
        "description": "Creates a company with source `manual`. Its domain and external ID must be unused in the workspace (the domain is compared ignoring case). Each key in `attributes` needs a company attribute definition, and its value is converted to the definition's type (400 otherwise). Setting `mrrCents` requires the `view_revenue` permission (403 otherwise). Records a `company.created` event. Requires the `create` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Display name of the company, 1 to 200 characters after trimming. Names don't have to be unique.",
                    "example": "Acme Corp"
                  },
                  "domain": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Email domain of the company, up to 255 characters after trimming. Must be unused by another company in the workspace, ignoring case (409 otherwise). On update, null clears it and omitting it keeps it.",
                    "example": "example.com"
                  },
                  "externalId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "ID of the company in an external system, such as a CRM, up to 255 characters after trimming. Must be unused by another company in the workspace (409 otherwise). On update, null clears it and omitting it keeps it.",
                    "example": "crm_48213"
                  },
                  "plan": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100,
                    "description": "Free-text plan label, up to 100 characters after trimming. On update, null clears it and omitting it keeps it.",
                    "example": "Scale"
                  },
                  "mrrCents": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 2147483647,
                    "description": "Monthly recurring revenue in cents (hundredths of the currency unit), an integer from 0 to 2147483647, so `125050` is 1,250.50. Sending this field, even as null, requires the `view_revenue` permission (403 otherwise). On update, null clears it and omitting it keeps it.",
                    "example": 125050
                  },
                  "churnRisk": {
                    "type": "boolean",
                    "description": "Whether the company is at risk of churning. Defaults to `false` on create; omitting it on update keeps it.",
                    "example": false
                  },
                  "size": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100,
                    "description": "Free-text company size, up to 100 characters after trimming. On update, null clears it and omitting it keeps it.",
                    "example": "51-200"
                  },
                  "website": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Website of the company, up to 255 characters after trimming; it isn't checked to be a URL. On update, null clears it and omitting it keeps it.",
                    "example": "https://example.com"
                  },
                  "industry": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100,
                    "description": "Free-text industry, up to 100 characters after trimming. On update, null clears it and omitting it keeps it.",
                    "example": "Software"
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Custom attribute values to set, keyed by attribute definition key. Every key needs an attribute definition (a user attribute for a person, a company attribute for a company), or the request fails with 400. Each value is converted to the definition's type and must be valid for it (400 otherwise); a date is stored as an ISO 8601 string. Null removes the attribute; keys you don't send stay unchanged. Up to 50 keys of 1 to 64 characters; a string value is up to 1,000 characters.",
                    "example": {
                      "plan": "enterprise",
                      "seats": 25,
                      "beta_tester": true
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new company",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Company ID (TypeID).",
                      "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the company.",
                      "example": "Acme Corp"
                    },
                    "domain": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Email domain of the company. Unique in the workspace, ignoring case. Null when unset.",
                      "example": "example.com"
                    },
                    "externalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the company in an external system, such as a CRM. Unique in the workspace. Null when unset.",
                      "example": "crm_48213"
                    },
                    "plan": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text plan label. Null when unset.",
                      "example": "Scale"
                    },
                    "mrrCents": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Monthly recurring revenue in cents (hundredths of the currency unit; no currency is stored), so `125050` is 1,250.50. Null when unset, and always null when the caller lacks the `view_revenue` permission.",
                      "example": 125050
                    },
                    "churnRisk": {
                      "type": "boolean",
                      "description": "Whether the company is flagged as at risk of churning. Feedback demand reports give at-risk companies more weight.",
                      "example": false
                    },
                    "size": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text company size. Null when unset.",
                      "example": "51-200"
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Website of the company, as entered; it isn't checked to be a URL. Null when unset.",
                      "example": "https://example.com"
                    },
                    "industry": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text industry. Null when unset.",
                      "example": "Software"
                    },
                    "source": {
                      "type": "string",
                      "description": "How the company was created. `manual`: by a teammate in the app (create, CSV import, or attaching a customer by name); `api`: by an integration, such as the `companies` claim of a signed widget identity.",
                      "example": "manual"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the attribute, as named by its definition.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 1000
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ],
                            "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                            "example": "enterprise"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ]
                      },
                      "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                    },
                    "memberCount": {
                      "type": "number",
                      "description": "Number of people linked to the company. Teammates and test customers are not counted.",
                      "example": 12
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the company was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the company was last changed, in ISO 8601 UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "domain",
                    "externalId",
                    "plan",
                    "mrrCents",
                    "churnRisk",
                    "size",
                    "website",
                    "industry",
                    "source",
                    "attributes",
                    "memberCount",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "A company: the customer organization that people belong to, with its plan, revenue and custom attributes."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another company in the workspace already has this domain (ignoring case) or external ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/companies/{companyId}": {
      "get": {
        "operationId": "getQuillsCompany",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Get a company",
        "description": "Returns one company with its member count and custom attributes. `mrrCents` is null unless the caller holds the `view_revenue` permission. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Company ID. Accepts the TypeID or its UUID.",
              "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
            },
            "required": true,
            "description": "Company ID. Accepts the TypeID or its UUID.",
            "name": "companyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The company",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Company ID (TypeID).",
                      "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the company.",
                      "example": "Acme Corp"
                    },
                    "domain": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Email domain of the company. Unique in the workspace, ignoring case. Null when unset.",
                      "example": "example.com"
                    },
                    "externalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the company in an external system, such as a CRM. Unique in the workspace. Null when unset.",
                      "example": "crm_48213"
                    },
                    "plan": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text plan label. Null when unset.",
                      "example": "Scale"
                    },
                    "mrrCents": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Monthly recurring revenue in cents (hundredths of the currency unit; no currency is stored), so `125050` is 1,250.50. Null when unset, and always null when the caller lacks the `view_revenue` permission.",
                      "example": 125050
                    },
                    "churnRisk": {
                      "type": "boolean",
                      "description": "Whether the company is flagged as at risk of churning. Feedback demand reports give at-risk companies more weight.",
                      "example": false
                    },
                    "size": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text company size. Null when unset.",
                      "example": "51-200"
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Website of the company, as entered; it isn't checked to be a URL. Null when unset.",
                      "example": "https://example.com"
                    },
                    "industry": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text industry. Null when unset.",
                      "example": "Software"
                    },
                    "source": {
                      "type": "string",
                      "description": "How the company was created. `manual`: by a teammate in the app (create, CSV import, or attaching a customer by name); `api`: by an integration, such as the `companies` claim of a signed widget identity.",
                      "example": "manual"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the attribute, as named by its definition.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 1000
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ],
                            "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                            "example": "enterprise"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ]
                      },
                      "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                    },
                    "memberCount": {
                      "type": "number",
                      "description": "Number of people linked to the company. Teammates and test customers are not counted.",
                      "example": 12
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the company was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the company was last changed, in ISO 8601 UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "domain",
                    "externalId",
                    "plan",
                    "mrrCents",
                    "churnRisk",
                    "size",
                    "website",
                    "industry",
                    "source",
                    "attributes",
                    "memberCount",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "A company: the customer organization that people belong to, with its plan, revenue and custom attributes."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No company with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateQuillsCompany",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Update a company",
        "description": "Changes the fields that are sent; send at least one. `attributes` merges into the stored attributes: each key needs a company attribute definition and its value is converted to the definition's type (400 otherwise), null removes that attribute, and keys not sent are kept. The domain and external ID must be unused by another company in the workspace. Sending `mrrCents` requires the `view_revenue` permission (403 otherwise); the other fields don't. Records a `company.updated` event. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Company ID. Accepts the TypeID or its UUID.",
              "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
            },
            "required": true,
            "description": "Company ID. Accepts the TypeID or its UUID.",
            "name": "companyId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "New display name, 1 to 200 characters after trimming. Omit it to keep the current name.",
                    "example": "Acme Corporation"
                  },
                  "domain": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Email domain of the company, up to 255 characters after trimming. Must be unused by another company in the workspace, ignoring case (409 otherwise). On update, null clears it and omitting it keeps it.",
                    "example": "example.com"
                  },
                  "externalId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "ID of the company in an external system, such as a CRM, up to 255 characters after trimming. Must be unused by another company in the workspace (409 otherwise). On update, null clears it and omitting it keeps it.",
                    "example": "crm_48213"
                  },
                  "plan": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100,
                    "description": "Free-text plan label, up to 100 characters after trimming. On update, null clears it and omitting it keeps it.",
                    "example": "Scale"
                  },
                  "mrrCents": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 2147483647,
                    "description": "Monthly recurring revenue in cents (hundredths of the currency unit), an integer from 0 to 2147483647, so `125050` is 1,250.50. Sending this field, even as null, requires the `view_revenue` permission (403 otherwise). On update, null clears it and omitting it keeps it.",
                    "example": 125050
                  },
                  "churnRisk": {
                    "type": "boolean",
                    "description": "Whether the company is at risk of churning. Defaults to `false` on create; omitting it on update keeps it.",
                    "example": false
                  },
                  "size": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100,
                    "description": "Free-text company size, up to 100 characters after trimming. On update, null clears it and omitting it keeps it.",
                    "example": "51-200"
                  },
                  "website": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Website of the company, up to 255 characters after trimming; it isn't checked to be a URL. On update, null clears it and omitting it keeps it.",
                    "example": "https://example.com"
                  },
                  "industry": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100,
                    "description": "Free-text industry, up to 100 characters after trimming. On update, null clears it and omitting it keeps it.",
                    "example": "Software"
                  },
                  "attributes": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 1000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Custom attribute values to set, keyed by attribute definition key. Every key needs an attribute definition (a user attribute for a person, a company attribute for a company), or the request fails with 400. Each value is converted to the definition's type and must be valid for it (400 otherwise); a date is stored as an ISO 8601 string. Null removes the attribute; keys you don't send stay unchanged. Up to 50 keys of 1 to 64 characters; a string value is up to 1,000 characters.",
                    "example": {
                      "plan": "enterprise",
                      "seats": 25,
                      "beta_tester": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated company",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Company ID (TypeID).",
                      "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the company.",
                      "example": "Acme Corp"
                    },
                    "domain": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Email domain of the company. Unique in the workspace, ignoring case. Null when unset.",
                      "example": "example.com"
                    },
                    "externalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the company in an external system, such as a CRM. Unique in the workspace. Null when unset.",
                      "example": "crm_48213"
                    },
                    "plan": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text plan label. Null when unset.",
                      "example": "Scale"
                    },
                    "mrrCents": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Monthly recurring revenue in cents (hundredths of the currency unit; no currency is stored), so `125050` is 1,250.50. Null when unset, and always null when the caller lacks the `view_revenue` permission.",
                      "example": 125050
                    },
                    "churnRisk": {
                      "type": "boolean",
                      "description": "Whether the company is flagged as at risk of churning. Feedback demand reports give at-risk companies more weight.",
                      "example": false
                    },
                    "size": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text company size. Null when unset.",
                      "example": "51-200"
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Website of the company, as entered; it isn't checked to be a URL. Null when unset.",
                      "example": "https://example.com"
                    },
                    "industry": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text industry. Null when unset.",
                      "example": "Software"
                    },
                    "source": {
                      "type": "string",
                      "description": "How the company was created. `manual`: by a teammate in the app (create, CSV import, or attaching a customer by name); `api`: by an integration, such as the `companies` claim of a signed widget identity.",
                      "example": "manual"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the attribute, as named by its definition.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 1000
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ],
                            "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                            "example": "enterprise"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ]
                      },
                      "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                    },
                    "memberCount": {
                      "type": "number",
                      "description": "Number of people linked to the company. Teammates and test customers are not counted.",
                      "example": 12
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the company was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the company was last changed, in ISO 8601 UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "domain",
                    "externalId",
                    "plan",
                    "mrrCents",
                    "churnRisk",
                    "size",
                    "website",
                    "industry",
                    "source",
                    "attributes",
                    "memberCount",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "A company: the customer organization that people belong to, with its plan, revenue and custom attributes."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No company with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another company in the workspace already has this domain (ignoring case) or external ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsCompany",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Delete a company",
        "description": "Deletes a company for good. The people who belonged to it are kept, with no company. Records a `company.deleted` event. Requires the `delete` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Company ID. Accepts the TypeID or its UUID.",
              "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
            },
            "required": true,
            "description": "Company ID. Accepts the TypeID or its UUID.",
            "name": "companyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted company",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted company (TypeID).",
                      "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No company with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/companies/{companyId}/members": {
      "get": {
        "operationId": "listQuillsCompanyMembers",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List the customers of a company",
        "description": "Lists the customers linked to a company, sorted by name and then principal ID, with offset paging. Leads are included; teammates and test customers are left out. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Company ID. Accepts the TypeID or its UUID.",
              "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
            },
            "required": true,
            "description": "Company ID. Accepts the TypeID or its UUID.",
            "name": "companyId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 100000,
              "default": 0,
              "description": "Number of customers to skip, from 0 to 100000. Defaults to 0. Use `nextOffset` from the previous page.",
              "example": 0
            },
            "required": false,
            "description": "Number of customers to skip, from 0 to 100000. Defaults to 0. Use `nextOffset` from the previous page.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of customers to return, from 1 to 100. Defaults to 50.",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of customers to return, from 1 to 100. Defaults to 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of customers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the person: their actor in the support desk. Use it in the `/users/{principalId}` routes.",
                            "example": "principal_01m8rz9gc9fztr3vaz4e3hnkwt"
                          },
                          "userId": {
                            "type": "string",
                            "description": "ID of the person's customer profile, which holds their name, email and attributes.",
                            "example": "user_01m8rz9gcafztr3vbvz8yn3197"
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the person.",
                            "example": "Dana Whitfield"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Account email of the person. Null when unset, or when it's the placeholder address that an anonymous lead's profile carries.",
                            "example": "dana@example.com"
                          },
                          "contactEmail": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Contact email the person left, typically a lead who gave an address in the messenger. Null when none was given.",
                            "example": "dana.w@example.com"
                          },
                          "image": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the person's avatar image. Null when unset.",
                            "example": "https://example.com/avatars/dana.png"
                          },
                          "emailVerified": {
                            "type": "boolean",
                            "description": "Whether the account email is verified.",
                            "example": true
                          },
                          "isLead": {
                            "type": "boolean",
                            "description": "Whether the person is a lead: an anonymous visitor who hasn't been identified. False for an identified customer.",
                            "example": false
                          },
                          "country": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Country of the person as an ISO 3166-1 alpha-2 code, taken from the request's geo headers when a session starts. Null when unknown.",
                            "example": "DE"
                          },
                          "locale": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Locale that the person's sign-in provider reported, as a BCP 47 tag. Null when unknown.",
                            "example": "en-US"
                          },
                          "externalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID your app gave the person: the verified `sub` of a widget identify token, or the `externalId` set through the API. Null when unset.",
                            "example": "usr_48213"
                          },
                          "attributes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Key of the attribute, as named by its definition.",
                                  "example": "plan"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 1000
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    }
                                  ],
                                  "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                                  "example": "enterprise"
                                }
                              },
                              "required": [
                                "key",
                                "value"
                              ]
                            },
                            "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                          },
                          "companyId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the company the person belongs to. Null when none.",
                            "example": "company_01m8rz9gcafztr3vee9jvpa75f"
                          },
                          "blockedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the person was blocked, in ISO 8601 UTC. Null when not blocked. A blocked person's portal and widget requests are refused.",
                            "example": null
                          },
                          "joinedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the person was added to the workspace (their principal was created), in ISO 8601 UTC.",
                            "example": "2026-02-11T15:04:22.000Z"
                          },
                          "postCount": {
                            "type": "number",
                            "description": "Number of feedback posts the person wrote, deleted posts left out.",
                            "example": 3
                          },
                          "commentCount": {
                            "type": "number",
                            "description": "Number of comments the person wrote on feedback posts, leaving out deleted comments and comments on test customers' posts.",
                            "example": 7
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of feedback posts the person voted for, leaving out votes on test customers' posts.",
                            "example": 12
                          }
                        },
                        "required": [
                          "principalId",
                          "userId",
                          "name",
                          "email",
                          "contactEmail",
                          "image",
                          "emailVerified",
                          "isLead",
                          "country",
                          "locale",
                          "externalId",
                          "attributes",
                          "companyId",
                          "blockedAt",
                          "joinedAt",
                          "postCount",
                          "commentCount",
                          "voteCount"
                        ]
                      },
                      "description": "Customers on this page, sorted by name and then principal ID."
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page. Null on the last page.",
                      "example": 50
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No company with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/companies/{companyId}/activity": {
      "get": {
        "operationId": "getQuillsCompanyActivity",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Count the conversations and tickets of a company",
        "description": "Counts the conversations whose visitor belongs to the company and the company's tickets that aren't deleted. Test customers' conversations and tickets are left out. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Company ID. Accepts the TypeID or its UUID.",
              "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
            },
            "required": true,
            "description": "Company ID. Accepts the TypeID or its UUID.",
            "name": "companyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Activity counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversations": {
                      "type": "number",
                      "description": "Number of conversations started by a visitor who belongs to the company, in any status. Test customers' conversations aren't counted.",
                      "example": 27
                    },
                    "tickets": {
                      "type": "number",
                      "description": "Number of the company's tickets that aren't deleted, in any status. Tickets requested by a test customer or linked to a test customer's conversation aren't counted.",
                      "example": 9
                    }
                  },
                  "required": [
                    "conversations",
                    "tickets"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No company with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/users/{principalId}/company": {
      "get": {
        "operationId": "getQuillsUserCompany",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Get a customer's company",
        "description": "Returns the company a customer belongs to, or null when the customer has none. `mrrCents` is null unless the caller holds the `view_revenue` permission. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
              "example": "principal_01m8rz8c9mfk282gfax7mg8256"
            },
            "required": true,
            "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The company, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "company": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Company ID (TypeID).",
                          "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
                        },
                        "name": {
                          "type": "string",
                          "description": "Display name of the company.",
                          "example": "Acme Corp"
                        },
                        "domain": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Email domain of the company. Unique in the workspace, ignoring case. Null when unset.",
                          "example": "example.com"
                        },
                        "externalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the company in an external system, such as a CRM. Unique in the workspace. Null when unset.",
                          "example": "crm_48213"
                        },
                        "plan": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Free-text plan label. Null when unset.",
                          "example": "Scale"
                        },
                        "mrrCents": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Monthly recurring revenue in cents (hundredths of the currency unit; no currency is stored), so `125050` is 1,250.50. Null when unset, and always null when the caller lacks the `view_revenue` permission.",
                          "example": 125050
                        },
                        "churnRisk": {
                          "type": "boolean",
                          "description": "Whether the company is flagged as at risk of churning. Feedback demand reports give at-risk companies more weight.",
                          "example": false
                        },
                        "size": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Free-text company size. Null when unset.",
                          "example": "51-200"
                        },
                        "website": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Website of the company, as entered; it isn't checked to be a URL. Null when unset.",
                          "example": "https://example.com"
                        },
                        "industry": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Free-text industry. Null when unset.",
                          "example": "Software"
                        },
                        "source": {
                          "type": "string",
                          "description": "How the company was created. `manual`: by a teammate in the app (create, CSV import, or attaching a customer by name); `api`: by an integration, such as the `companies` claim of a signed widget identity.",
                          "example": "manual"
                        },
                        "attributes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "Key of the attribute, as named by its definition.",
                                "example": "plan"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 1000
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  }
                                ],
                                "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                                "example": "enterprise"
                              }
                            },
                            "required": [
                              "key",
                              "value"
                            ]
                          },
                          "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                        },
                        "memberCount": {
                          "type": "number",
                          "description": "Number of people linked to the company. Teammates and test customers are not counted.",
                          "example": 12
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the company was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the company was last changed, in ISO 8601 UTC.",
                          "example": "2026-11-18T10:42:00.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "domain",
                        "externalId",
                        "plan",
                        "mrrCents",
                        "churnRisk",
                        "size",
                        "website",
                        "industry",
                        "source",
                        "attributes",
                        "memberCount",
                        "createdAt",
                        "updatedAt"
                      ],
                      "description": "The customer's company. Null when the customer has none."
                    }
                  },
                  "required": [
                    "company"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No customer with this principal ID in the workspace; teammates and test customers are not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsUserCompany",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Attach a customer to a company",
        "description": "Links a customer to a company, replacing any company the customer had. Send `companyId` to link an existing company, or `name` to link the oldest company with that name (ignoring case); when none exists, a company with that name and source `manual` is created. `size`, `website` and `industry` apply only to a company created this way. Records a `user.company_set` event (a company created here records no `company.created` event). Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
              "example": "principal_01m8rz8c9mfk282gfax7mg8256"
            },
            "required": true,
            "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyId": {
                    "type": "string",
                    "description": "ID of an existing company to link. Accepts the TypeID or its UUID. Send either this or `name`, not both.",
                    "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Name of the company to link, matched ignoring case; the company is created when no company has this name. 1 to 200 characters after trimming. Send either this or `companyId`, not both.",
                    "example": "Acme Corp"
                  },
                  "size": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100,
                    "description": "Free-text size for a company that `name` creates, up to 100 characters after trimming. Ignored otherwise.",
                    "example": "51-200"
                  },
                  "website": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 255,
                    "description": "Website for a company that `name` creates, up to 255 characters after trimming. Ignored otherwise.",
                    "example": "https://example.com"
                  },
                  "industry": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100,
                    "description": "Free-text industry for a company that `name` creates, up to 100 characters after trimming. Ignored otherwise.",
                    "example": "Software"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The customer's company",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Company ID (TypeID).",
                      "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the company.",
                      "example": "Acme Corp"
                    },
                    "domain": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Email domain of the company. Unique in the workspace, ignoring case. Null when unset.",
                      "example": "example.com"
                    },
                    "externalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the company in an external system, such as a CRM. Unique in the workspace. Null when unset.",
                      "example": "crm_48213"
                    },
                    "plan": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text plan label. Null when unset.",
                      "example": "Scale"
                    },
                    "mrrCents": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Monthly recurring revenue in cents (hundredths of the currency unit; no currency is stored), so `125050` is 1,250.50. Null when unset, and always null when the caller lacks the `view_revenue` permission.",
                      "example": 125050
                    },
                    "churnRisk": {
                      "type": "boolean",
                      "description": "Whether the company is flagged as at risk of churning. Feedback demand reports give at-risk companies more weight.",
                      "example": false
                    },
                    "size": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text company size. Null when unset.",
                      "example": "51-200"
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Website of the company, as entered; it isn't checked to be a URL. Null when unset.",
                      "example": "https://example.com"
                    },
                    "industry": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text industry. Null when unset.",
                      "example": "Software"
                    },
                    "source": {
                      "type": "string",
                      "description": "How the company was created. `manual`: by a teammate in the app (create, CSV import, or attaching a customer by name); `api`: by an integration, such as the `companies` claim of a signed widget identity.",
                      "example": "manual"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the attribute, as named by its definition.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 1000
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ],
                            "description": "Value of the attribute: a string, number or boolean. A date attribute holds an ISO 8601 string.",
                            "example": "enterprise"
                          }
                        },
                        "required": [
                          "key",
                          "value"
                        ]
                      },
                      "description": "Custom attributes of the record as key and value pairs. Internal keys (starting with `_`) and values that aren't a string, number or boolean are left out."
                    },
                    "memberCount": {
                      "type": "number",
                      "description": "Number of people linked to the company. Teammates and test customers are not counted.",
                      "example": 12
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the company was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the company was last changed, in ISO 8601 UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "domain",
                    "externalId",
                    "plan",
                    "mrrCents",
                    "churnRisk",
                    "size",
                    "website",
                    "industry",
                    "source",
                    "attributes",
                    "memberCount",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "A company: the customer organization that people belong to, with its plan, revenue and custom attributes."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No customer with this principal ID, or no company with `companyId`, in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsUserCompany",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Detach a customer from its company",
        "description": "Unlinks a customer from its company. The company itself is kept. Records a `user.company_removed` event, even when the customer had no company. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
              "example": "principal_01m8rz8c9mfk282gfax7mg8256"
            },
            "required": true,
            "description": "Principal ID of the customer. Accepts the TypeID or its UUID. Teammates and test customers are not found.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the customer had a company",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "removed": {
                      "type": "boolean",
                      "description": "Whether the customer had a company before this request. `false` means nothing changed.",
                      "example": true
                    }
                  },
                  "required": [
                    "removed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No customer with this principal ID in the workspace; teammates and test customers are not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/user-attributes": {
      "get": {
        "operationId": "listQuillsUserAttributes",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List user attribute definitions",
        "description": "Lists the workspace's user attribute definitions, the typed custom fields of customers, sorted by label. Returns at most 500, with no paging. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Attribute definitions, up to 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Attribute definition ID: a TypeID with the `user_attr` prefix for a user attribute, or `company_attr` for a company attribute.",
                            "example": "user_attr_01m8rz8c9mfk282gg5mnrnbnra"
                          },
                          "key": {
                            "type": "string",
                            "description": "Key that values are stored under: in a customer's attributes for a user attribute, in a company's custom attributes for a company attribute. Unique per kind in the workspace. It can't change.",
                            "example": "seats"
                          },
                          "label": {
                            "type": "string",
                            "description": "Display name shown to teammates.",
                            "example": "Seats"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Free-text description. Null when unset.",
                            "example": "Number of paid seats on the account."
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "string",
                              "number",
                              "boolean",
                              "date",
                              "currency"
                            ],
                            "description": "Data type that values are converted to when they are set. `string`: text; `number`: a number; `boolean`: `true` or `false` (the strings `true` and `false` are accepted); `date`: a date or time, stored as an ISO 8601 UTC timestamp; `currency`: a number, in the currency of `currencyCode`.",
                            "example": "number"
                          },
                          "currencyCode": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 4217 currency code, used by `currency` attributes. Null when unset.",
                            "example": null
                          },
                          "externalKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the matching field in an external source, such as a customer data platform trait. For a user attribute, an inbound identify from an integration reads the value under this name, or under `key` when it is null. Null when unset.",
                            "example": "seat_count"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the definition was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the definition was last changed, in ISO 8601 UTC.",
                            "example": "2026-11-18T10:42:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "key",
                          "label",
                          "description",
                          "type",
                          "currencyCode",
                          "externalKey",
                          "createdAt",
                          "updatedAt"
                        ],
                        "description": "An attribute definition: a typed custom field for customers (user attribute) or companies (company attribute). Setting an attribute value needs a definition with that key."
                      },
                      "description": "Attribute definitions sorted by label, up to 500."
                    }
                  },
                  "required": [
                    "attributes"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsUserAttribute",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Create a user attribute definition",
        "description": "Creates a user attribute definition, so customers can hold values under its key. Records a `user_attribute.created` event with the key. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*$",
                    "description": "Key that values are stored under, 1 to 64 characters after trimming: letters, digits, `_`, `.` and `-`, starting with a letter or digit (keys starting with `_` are reserved). Must be unused by another definition of this kind (409 otherwise). It can't change later.",
                    "example": "seats"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Display name shown to teammates, 1 to 128 characters after trimming.",
                    "example": "Seats"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 512,
                    "description": "Free-text description, up to 512 characters after trimming. Null clears it; on update, omitting it keeps it.",
                    "example": "Number of paid seats on the account."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "string",
                      "number",
                      "boolean",
                      "date",
                      "currency"
                    ],
                    "description": "Data type that values are converted to when they are set. `string`: text; `number`: a number; `boolean`: `true` or `false` (the strings `true` and `false` are accepted); `date`: a date or time, stored as an ISO 8601 UTC timestamp; `currency`: a number, in the currency of `currencyCode`. Changing the type on update doesn't convert values already stored.",
                    "example": "number"
                  },
                  "currencyCode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "USD",
                      "EUR",
                      "GBP",
                      "JPY",
                      "CAD",
                      "AUD",
                      "CHF",
                      "CNY",
                      "INR",
                      "BRL",
                      null
                    ],
                    "description": "ISO 4217 currency code for a `currency` attribute. On create, it is stored only when `type` is `currency`; an update stores it as sent. Null clears it; on update, omitting it keeps it.",
                    "example": "USD"
                  },
                  "externalKey": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 256,
                    "description": "Name of the matching field in an external source, such as a customer data platform trait, up to 256 characters after trimming. For a user attribute, an inbound identify from an integration reads the value under this name instead of `key`. Null clears it; on update, omitting it keeps it.",
                    "example": "seat_count"
                  }
                },
                "required": [
                  "key",
                  "label",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Attribute definition ID: a TypeID with the `user_attr` prefix for a user attribute, or `company_attr` for a company attribute.",
                      "example": "user_attr_01m8rz8c9mfk282gg5mnrnbnra"
                    },
                    "key": {
                      "type": "string",
                      "description": "Key that values are stored under: in a customer's attributes for a user attribute, in a company's custom attributes for a company attribute. Unique per kind in the workspace. It can't change.",
                      "example": "seats"
                    },
                    "label": {
                      "type": "string",
                      "description": "Display name shown to teammates.",
                      "example": "Seats"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text description. Null when unset.",
                      "example": "Number of paid seats on the account."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "string",
                        "number",
                        "boolean",
                        "date",
                        "currency"
                      ],
                      "description": "Data type that values are converted to when they are set. `string`: text; `number`: a number; `boolean`: `true` or `false` (the strings `true` and `false` are accepted); `date`: a date or time, stored as an ISO 8601 UTC timestamp; `currency`: a number, in the currency of `currencyCode`.",
                      "example": "number"
                    },
                    "currencyCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO 4217 currency code, used by `currency` attributes. Null when unset.",
                      "example": null
                    },
                    "externalKey": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the matching field in an external source, such as a customer data platform trait. For a user attribute, an inbound identify from an integration reads the value under this name, or under `key` when it is null. Null when unset.",
                      "example": "seat_count"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was last changed, in ISO 8601 UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "label",
                    "description",
                    "type",
                    "currencyCode",
                    "externalKey",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "An attribute definition: a typed custom field for customers (user attribute) or companies (company attribute). Setting an attribute value needs a definition with that key."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another user attribute definition in the workspace already has this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/user-attributes/{attributeId}": {
      "put": {
        "operationId": "updateQuillsUserAttribute",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Update a user attribute definition",
        "description": "Changes the fields that are sent; send at least one. The key can't change. Changing `type` doesn't convert values already stored on customers. Records a `user_attribute.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "User attribute definition ID. Accepts the TypeID (`user_attr` prefix) or its UUID.",
              "example": "user_attr_01m8rz8c9mfk282gg5mnrnbnra"
            },
            "required": true,
            "description": "User attribute definition ID. Accepts the TypeID (`user_attr` prefix) or its UUID.",
            "name": "attributeId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Display name shown to teammates, 1 to 128 characters after trimming.",
                    "example": "Seats"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 512,
                    "description": "Free-text description, up to 512 characters after trimming. Null clears it; on update, omitting it keeps it.",
                    "example": "Number of paid seats on the account."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "string",
                      "number",
                      "boolean",
                      "date",
                      "currency"
                    ],
                    "description": "Data type that values are converted to when they are set. `string`: text; `number`: a number; `boolean`: `true` or `false` (the strings `true` and `false` are accepted); `date`: a date or time, stored as an ISO 8601 UTC timestamp; `currency`: a number, in the currency of `currencyCode`. Changing the type on update doesn't convert values already stored.",
                    "example": "number"
                  },
                  "currencyCode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "USD",
                      "EUR",
                      "GBP",
                      "JPY",
                      "CAD",
                      "AUD",
                      "CHF",
                      "CNY",
                      "INR",
                      "BRL",
                      null
                    ],
                    "description": "ISO 4217 currency code for a `currency` attribute. On create, it is stored only when `type` is `currency`; an update stores it as sent. Null clears it; on update, omitting it keeps it.",
                    "example": "USD"
                  },
                  "externalKey": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 256,
                    "description": "Name of the matching field in an external source, such as a customer data platform trait, up to 256 characters after trimming. For a user attribute, an inbound identify from an integration reads the value under this name instead of `key`. Null clears it; on update, omitting it keeps it.",
                    "example": "seat_count"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Attribute definition ID: a TypeID with the `user_attr` prefix for a user attribute, or `company_attr` for a company attribute.",
                      "example": "user_attr_01m8rz8c9mfk282gg5mnrnbnra"
                    },
                    "key": {
                      "type": "string",
                      "description": "Key that values are stored under: in a customer's attributes for a user attribute, in a company's custom attributes for a company attribute. Unique per kind in the workspace. It can't change.",
                      "example": "seats"
                    },
                    "label": {
                      "type": "string",
                      "description": "Display name shown to teammates.",
                      "example": "Seats"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text description. Null when unset.",
                      "example": "Number of paid seats on the account."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "string",
                        "number",
                        "boolean",
                        "date",
                        "currency"
                      ],
                      "description": "Data type that values are converted to when they are set. `string`: text; `number`: a number; `boolean`: `true` or `false` (the strings `true` and `false` are accepted); `date`: a date or time, stored as an ISO 8601 UTC timestamp; `currency`: a number, in the currency of `currencyCode`.",
                      "example": "number"
                    },
                    "currencyCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO 4217 currency code, used by `currency` attributes. Null when unset.",
                      "example": null
                    },
                    "externalKey": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the matching field in an external source, such as a customer data platform trait. For a user attribute, an inbound identify from an integration reads the value under this name, or under `key` when it is null. Null when unset.",
                      "example": "seat_count"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was last changed, in ISO 8601 UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "label",
                    "description",
                    "type",
                    "currencyCode",
                    "externalKey",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "An attribute definition: a typed custom field for customers (user attribute) or companies (company attribute). Setting an attribute value needs a definition with that key."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user attribute definition with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsUserAttribute",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Delete a user attribute definition",
        "description": "Deletes a user attribute definition for good. Values already stored under its key stay on customers, but the directory routes refuse a new value for that key (400) until a definition with the key exists again. Records a `user_attribute.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "User attribute definition ID. Accepts the TypeID (`user_attr` prefix) or its UUID.",
              "example": "user_attr_01m8rz8c9mfk282gg5mnrnbnra"
            },
            "required": true,
            "description": "User attribute definition ID. Accepts the TypeID (`user_attr` prefix) or its UUID.",
            "name": "attributeId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted definition (TypeID).",
                      "example": "user_attr_01m8rz8c9mfk282gg5mnrnbnra"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user attribute definition with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/company-attributes": {
      "get": {
        "operationId": "listQuillsCompanyAttributes",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List company attribute definitions",
        "description": "Lists the workspace's company attribute definitions, the typed custom fields of companies, sorted by label. Returns at most 500, with no paging. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Attribute definitions, up to 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Attribute definition ID: a TypeID with the `user_attr` prefix for a user attribute, or `company_attr` for a company attribute.",
                            "example": "user_attr_01m8rz8c9mfk282gg5mnrnbnra"
                          },
                          "key": {
                            "type": "string",
                            "description": "Key that values are stored under: in a customer's attributes for a user attribute, in a company's custom attributes for a company attribute. Unique per kind in the workspace. It can't change.",
                            "example": "seats"
                          },
                          "label": {
                            "type": "string",
                            "description": "Display name shown to teammates.",
                            "example": "Seats"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Free-text description. Null when unset.",
                            "example": "Number of paid seats on the account."
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "string",
                              "number",
                              "boolean",
                              "date",
                              "currency"
                            ],
                            "description": "Data type that values are converted to when they are set. `string`: text; `number`: a number; `boolean`: `true` or `false` (the strings `true` and `false` are accepted); `date`: a date or time, stored as an ISO 8601 UTC timestamp; `currency`: a number, in the currency of `currencyCode`.",
                            "example": "number"
                          },
                          "currencyCode": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ISO 4217 currency code, used by `currency` attributes. Null when unset.",
                            "example": null
                          },
                          "externalKey": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the matching field in an external source, such as a customer data platform trait. For a user attribute, an inbound identify from an integration reads the value under this name, or under `key` when it is null. Null when unset.",
                            "example": "seat_count"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the definition was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the definition was last changed, in ISO 8601 UTC.",
                            "example": "2026-11-18T10:42:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "key",
                          "label",
                          "description",
                          "type",
                          "currencyCode",
                          "externalKey",
                          "createdAt",
                          "updatedAt"
                        ],
                        "description": "An attribute definition: a typed custom field for customers (user attribute) or companies (company attribute). Setting an attribute value needs a definition with that key."
                      },
                      "description": "Attribute definitions sorted by label, up to 500."
                    }
                  },
                  "required": [
                    "attributes"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsCompanyAttribute",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Create a company attribute definition",
        "description": "Creates a company attribute definition, so companies can hold values under its key. Records a `company_attribute.created` event with the key. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]*$",
                    "description": "Key that values are stored under, 1 to 64 characters after trimming: letters, digits, `_`, `.` and `-`, starting with a letter or digit (keys starting with `_` are reserved). Must be unused by another definition of this kind (409 otherwise). It can't change later.",
                    "example": "seats"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Display name shown to teammates, 1 to 128 characters after trimming.",
                    "example": "Seats"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 512,
                    "description": "Free-text description, up to 512 characters after trimming. Null clears it; on update, omitting it keeps it.",
                    "example": "Number of paid seats on the account."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "string",
                      "number",
                      "boolean",
                      "date",
                      "currency"
                    ],
                    "description": "Data type that values are converted to when they are set. `string`: text; `number`: a number; `boolean`: `true` or `false` (the strings `true` and `false` are accepted); `date`: a date or time, stored as an ISO 8601 UTC timestamp; `currency`: a number, in the currency of `currencyCode`. Changing the type on update doesn't convert values already stored.",
                    "example": "number"
                  },
                  "currencyCode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "USD",
                      "EUR",
                      "GBP",
                      "JPY",
                      "CAD",
                      "AUD",
                      "CHF",
                      "CNY",
                      "INR",
                      "BRL",
                      null
                    ],
                    "description": "ISO 4217 currency code for a `currency` attribute. On create, it is stored only when `type` is `currency`; an update stores it as sent. Null clears it; on update, omitting it keeps it.",
                    "example": "USD"
                  },
                  "externalKey": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 256,
                    "description": "Name of the matching field in an external source, such as a customer data platform trait, up to 256 characters after trimming. For a user attribute, an inbound identify from an integration reads the value under this name instead of `key`. Null clears it; on update, omitting it keeps it.",
                    "example": "seat_count"
                  }
                },
                "required": [
                  "key",
                  "label",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Attribute definition ID: a TypeID with the `user_attr` prefix for a user attribute, or `company_attr` for a company attribute.",
                      "example": "user_attr_01m8rz8c9mfk282gg5mnrnbnra"
                    },
                    "key": {
                      "type": "string",
                      "description": "Key that values are stored under: in a customer's attributes for a user attribute, in a company's custom attributes for a company attribute. Unique per kind in the workspace. It can't change.",
                      "example": "seats"
                    },
                    "label": {
                      "type": "string",
                      "description": "Display name shown to teammates.",
                      "example": "Seats"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text description. Null when unset.",
                      "example": "Number of paid seats on the account."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "string",
                        "number",
                        "boolean",
                        "date",
                        "currency"
                      ],
                      "description": "Data type that values are converted to when they are set. `string`: text; `number`: a number; `boolean`: `true` or `false` (the strings `true` and `false` are accepted); `date`: a date or time, stored as an ISO 8601 UTC timestamp; `currency`: a number, in the currency of `currencyCode`.",
                      "example": "number"
                    },
                    "currencyCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO 4217 currency code, used by `currency` attributes. Null when unset.",
                      "example": null
                    },
                    "externalKey": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the matching field in an external source, such as a customer data platform trait. For a user attribute, an inbound identify from an integration reads the value under this name, or under `key` when it is null. Null when unset.",
                      "example": "seat_count"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was last changed, in ISO 8601 UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "label",
                    "description",
                    "type",
                    "currencyCode",
                    "externalKey",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "An attribute definition: a typed custom field for customers (user attribute) or companies (company attribute). Setting an attribute value needs a definition with that key."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another company attribute definition in the workspace already has this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/company-attributes/{attributeId}": {
      "put": {
        "operationId": "updateQuillsCompanyAttribute",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Update a company attribute definition",
        "description": "Changes the fields that are sent; send at least one. The key can't change. Changing `type` doesn't convert values already stored on companies. Records a `company_attribute.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Company attribute definition ID. Accepts the TypeID (`company_attr` prefix) or its UUID.",
              "example": "company_attr_01m8rz8c9mfk282ggca7jfq2kc"
            },
            "required": true,
            "description": "Company attribute definition ID. Accepts the TypeID (`company_attr` prefix) or its UUID.",
            "name": "attributeId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Display name shown to teammates, 1 to 128 characters after trimming.",
                    "example": "Seats"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 512,
                    "description": "Free-text description, up to 512 characters after trimming. Null clears it; on update, omitting it keeps it.",
                    "example": "Number of paid seats on the account."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "string",
                      "number",
                      "boolean",
                      "date",
                      "currency"
                    ],
                    "description": "Data type that values are converted to when they are set. `string`: text; `number`: a number; `boolean`: `true` or `false` (the strings `true` and `false` are accepted); `date`: a date or time, stored as an ISO 8601 UTC timestamp; `currency`: a number, in the currency of `currencyCode`. Changing the type on update doesn't convert values already stored.",
                    "example": "number"
                  },
                  "currencyCode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "USD",
                      "EUR",
                      "GBP",
                      "JPY",
                      "CAD",
                      "AUD",
                      "CHF",
                      "CNY",
                      "INR",
                      "BRL",
                      null
                    ],
                    "description": "ISO 4217 currency code for a `currency` attribute. On create, it is stored only when `type` is `currency`; an update stores it as sent. Null clears it; on update, omitting it keeps it.",
                    "example": "USD"
                  },
                  "externalKey": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 256,
                    "description": "Name of the matching field in an external source, such as a customer data platform trait, up to 256 characters after trimming. For a user attribute, an inbound identify from an integration reads the value under this name instead of `key`. Null clears it; on update, omitting it keeps it.",
                    "example": "seat_count"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Attribute definition ID: a TypeID with the `user_attr` prefix for a user attribute, or `company_attr` for a company attribute.",
                      "example": "user_attr_01m8rz8c9mfk282gg5mnrnbnra"
                    },
                    "key": {
                      "type": "string",
                      "description": "Key that values are stored under: in a customer's attributes for a user attribute, in a company's custom attributes for a company attribute. Unique per kind in the workspace. It can't change.",
                      "example": "seats"
                    },
                    "label": {
                      "type": "string",
                      "description": "Display name shown to teammates.",
                      "example": "Seats"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text description. Null when unset.",
                      "example": "Number of paid seats on the account."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "string",
                        "number",
                        "boolean",
                        "date",
                        "currency"
                      ],
                      "description": "Data type that values are converted to when they are set. `string`: text; `number`: a number; `boolean`: `true` or `false` (the strings `true` and `false` are accepted); `date`: a date or time, stored as an ISO 8601 UTC timestamp; `currency`: a number, in the currency of `currencyCode`.",
                      "example": "number"
                    },
                    "currencyCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO 4217 currency code, used by `currency` attributes. Null when unset.",
                      "example": null
                    },
                    "externalKey": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Name of the matching field in an external source, such as a customer data platform trait. For a user attribute, an inbound identify from an integration reads the value under this name, or under `key` when it is null. Null when unset.",
                      "example": "seat_count"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was last changed, in ISO 8601 UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "label",
                    "description",
                    "type",
                    "currencyCode",
                    "externalKey",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "An attribute definition: a typed custom field for customers (user attribute) or companies (company attribute). Setting an attribute value needs a definition with that key."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No company attribute definition with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsCompanyAttribute",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Delete a company attribute definition",
        "description": "Deletes a company attribute definition for good. Values already stored under its key stay on companies, but the directory routes refuse a new value for that key (400) until a definition with the key exists again. Records a `company_attribute.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Company attribute definition ID. Accepts the TypeID (`company_attr` prefix) or its UUID.",
              "example": "company_attr_01m8rz8c9mfk282ggca7jfq2kc"
            },
            "required": true,
            "description": "Company attribute definition ID. Accepts the TypeID (`company_attr` prefix) or its UUID.",
            "name": "attributeId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted definition (TypeID).",
                      "example": "company_attr_01m8rz8c9mfk282ggca7jfq2kc"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No company attribute definition with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/segments": {
      "get": {
        "operationId": "listQuillsSegments",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "List segments with member counts",
        "description": "Lists the workspace's segments that aren't deleted, sorted by name, with their rules and member counts. Returns at most 500 segments, with no paging. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Live segments, up to 500",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "segments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Segment ID (TypeID).",
                            "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name of the segment.",
                            "example": "Enterprise customers"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Stable identifier made from the name when the segment was created: lowercase letters, digits and hyphens, with `-2`, `-3`… added when taken. Renaming the segment doesn't change it. Signed widget identities name segments by slug in their `segments` claim.",
                            "example": "enterprise-customers"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Free-text description. Null when unset.",
                            "example": "Customers on the Enterprise plan."
                          },
                          "type": {
                            "type": "string",
                            "description": "How members are chosen. `manual`: teammates add and remove them; `dynamic`: they come from `rules` each time the segment is evaluated.",
                            "example": "dynamic"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                            "example": "#6b7280"
                          },
                          "rules": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "match": {
                                "type": "string",
                                "description": "How the conditions combine. `all`: a customer must match every condition; `any`: at least one.",
                                "example": "all"
                              },
                              "conditions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "attribute": {
                                      "type": "string",
                                      "description": "Customer property the condition tests. `email`, `name`, `locale`, `country`: the customer's profile fields (email compared ignoring case, country as an uppercase code). `email_verified`: whether the email is verified. `created_at_days_ago`: days since the customer joined the workspace. `post_count`, `vote_count`, `comment_count`: the customer's feedback posts, votes and comments (deleted posts and comments not counted). `plan`: the `plan` key of the customer's attributes. `metadata_key`: the customer attribute named by `metadataKey`. `principal_type`: `user` or `anonymous` (only identified `user` customers ever match a rule). `company_plan`, `company_size`, `company_industry`: fields of the customer's company. `company_mrr`: the company's monthly revenue in major units; a rule on it needs the `view_revenue` permission. `company_attr`: the company custom attribute named by `metadataKey`. Rules stored before this API may hold other attributes, which are ignored when the segment is evaluated.",
                                      "example": "company_plan"
                                    },
                                    "operator": {
                                      "type": "string",
                                      "description": "Comparison. `eq`, `neq`, `lt`, `lte`, `gt`, `gte`: compare with `value` (numerically when `value` is a number). `contains`, `starts_with`, `ends_with`: text match ignoring case. `in`: equals one of `values`. `is_set`, `is_not_set`: whether the property has a value (for `email_verified`, whether the email is verified; for counts, whether the count is above zero). A condition whose operator doesn't apply to its attribute is ignored when the segment is evaluated.",
                                      "example": "eq"
                                    },
                                    "value": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "Value the condition compares with. Null for an `in` condition and when no value is stored, as for `is_set` and `is_not_set`.",
                                      "example": "Scale"
                                    },
                                    "values": {
                                      "type": [
                                        "array",
                                        "null"
                                      ],
                                      "items": {
                                        "anyOf": [
                                          {
                                            "type": "string"
                                          },
                                          {
                                            "type": "number"
                                          }
                                        ]
                                      },
                                      "description": "Values of an `in` condition. Null for other operators.",
                                      "example": null
                                    },
                                    "metadataKey": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "description": "Attribute key of a `metadata_key` or `company_attr` condition. Null when unset.",
                                      "example": null
                                    }
                                  },
                                  "required": [
                                    "attribute",
                                    "operator",
                                    "value",
                                    "values",
                                    "metadataKey"
                                  ],
                                  "description": "One condition of the segment's rules."
                                },
                                "description": "Conditions of the rules, in stored order."
                              }
                            },
                            "required": [
                              "match",
                              "conditions"
                            ],
                            "description": "Rules of a dynamic segment. A manual segment has none (null)."
                          },
                          "memberCount": {
                            "type": "number",
                            "description": "Number of customers in the segment. For a dynamic segment, as of its last evaluation.",
                            "example": 42
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the segment was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the segment was last changed, in ISO 8601 UTC.",
                            "example": "2026-11-18T10:42:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "description",
                          "type",
                          "color",
                          "rules",
                          "memberCount",
                          "createdAt",
                          "updatedAt"
                        ],
                        "description": "A segment: a named group of customers, chosen by hand (`manual`) or by rules (`dynamic`)."
                      },
                      "description": "Segments sorted by name, up to 500."
                    }
                  },
                  "required": [
                    "segments"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsSegment",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Create a segment",
        "description": "Creates a segment. Its slug is made from the name, with a number added when taken. A dynamic segment needs `rules` and a manual segment must not have them (400 otherwise). A new dynamic segment has no members until it is evaluated with `POST /segments/{segmentId}/evaluate` or `POST /segments/evaluate`. A rule on `company_mrr` requires the `view_revenue` permission (403 otherwise). Records a `segment.created` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Display name, 1 to 100 characters after trimming. It also seeds the slug.",
                    "example": "Enterprise customers"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "Free-text description, up to 500 characters after trimming. Null or omitted leaves it unset.",
                    "example": "Customers on the Enterprise plan."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "manual",
                      "dynamic"
                    ],
                    "description": "How members are chosen. `manual`: teammates add and remove them; `dynamic`: they come from `rules`. The type can't change later.",
                    "example": "dynamic"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$",
                    "description": "Badge color as a six-digit hex code in `#RRGGBB` form. Defaults to `#6b7280` on create; omitting it on update keeps it.",
                    "example": "#6366f1"
                  },
                  "rules": {
                    "type": "object",
                    "properties": {
                      "match": {
                        "type": "string",
                        "enum": [
                          "all",
                          "any"
                        ],
                        "description": "How the conditions combine. `all`: a customer must match every condition; `any`: at least one.",
                        "example": "all"
                      },
                      "conditions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "attribute": {
                              "type": "string",
                              "enum": [
                                "email",
                                "email_verified",
                                "created_at_days_ago",
                                "post_count",
                                "vote_count",
                                "comment_count",
                                "plan",
                                "metadata_key",
                                "name",
                                "locale",
                                "country",
                                "principal_type",
                                "company_plan",
                                "company_mrr",
                                "company_size",
                                "company_industry",
                                "company_attr"
                              ],
                              "description": "Customer property the condition tests. `email`, `name`, `locale`, `country`: the customer's profile fields (email compared ignoring case, country as an uppercase code). `email_verified`: whether the email is verified. `created_at_days_ago`: days since the customer joined the workspace. `post_count`, `vote_count`, `comment_count`: the customer's feedback posts, votes and comments (deleted posts and comments not counted). `plan`: the `plan` key of the customer's attributes. `metadata_key`: the customer attribute named by `metadataKey`. `principal_type`: `user` or `anonymous` (only identified `user` customers ever match a rule). `company_plan`, `company_size`, `company_industry`: fields of the customer's company. `company_mrr`: the company's monthly revenue in major units; a rule on it needs the `view_revenue` permission. `company_attr`: the company custom attribute named by `metadataKey`.",
                              "example": "company_plan"
                            },
                            "operator": {
                              "type": "string",
                              "enum": [
                                "eq",
                                "neq",
                                "lt",
                                "lte",
                                "gt",
                                "gte",
                                "contains",
                                "starts_with",
                                "ends_with",
                                "in",
                                "is_set",
                                "is_not_set"
                              ],
                              "description": "Comparison. `eq`, `neq`, `lt`, `lte`, `gt`, `gte`: compare with `value` (numerically when `value` is a number). `contains`, `starts_with`, `ends_with`: text match ignoring case. `in`: equals one of `values`. `is_set`, `is_not_set`: whether the property has a value (for `email_verified`, whether the email is verified; for counts, whether the count is above zero). A condition whose operator doesn't apply to its attribute is ignored when the segment is evaluated.",
                              "example": "eq"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 200
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Value to compare with: a string of up to 200 characters, a number or a boolean. For `created_at_days_ago`, a number of days; for `company_mrr`, an amount in major units (`100` means 100.00), not cents. Not used by `in`, `is_set` or `is_not_set`.",
                              "example": "Scale"
                            },
                            "values": {
                              "type": [
                                "array",
                                "null"
                              ],
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  {
                                    "type": "number"
                                  }
                                ]
                              },
                              "maxItems": 100,
                              "description": "Values for the `in` operator, up to 100 strings (each up to 200 characters) or numbers. Not used by other operators.",
                              "example": [
                                "US",
                                "CA"
                              ]
                            },
                            "metadataKey": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 64,
                              "description": "Attribute key, up to 64 characters, for `metadata_key` (a customer attribute) and `company_attr` (a company custom attribute). Without it, a condition on those attributes is ignored. Not used by other attributes.",
                              "example": "seats"
                            }
                          },
                          "required": [
                            "attribute",
                            "operator"
                          ],
                          "description": "One condition of a dynamic segment rule."
                        },
                        "minItems": 1,
                        "maxItems": 20,
                        "description": "Conditions to test, 1 to 20."
                      }
                    },
                    "required": [
                      "match",
                      "conditions"
                    ],
                    "description": "Rules of a dynamic segment. Only identified customers can match: teammates, leads and test customers never do."
                  }
                },
                "required": [
                  "name",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new segment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Segment ID (TypeID).",
                      "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the segment.",
                      "example": "Enterprise customers"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Stable identifier made from the name when the segment was created: lowercase letters, digits and hyphens, with `-2`, `-3`… added when taken. Renaming the segment doesn't change it. Signed widget identities name segments by slug in their `segments` claim.",
                      "example": "enterprise-customers"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text description. Null when unset.",
                      "example": "Customers on the Enterprise plan."
                    },
                    "type": {
                      "type": "string",
                      "description": "How members are chosen. `manual`: teammates add and remove them; `dynamic`: they come from `rules` each time the segment is evaluated.",
                      "example": "dynamic"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    },
                    "rules": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "match": {
                          "type": "string",
                          "description": "How the conditions combine. `all`: a customer must match every condition; `any`: at least one.",
                          "example": "all"
                        },
                        "conditions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "attribute": {
                                "type": "string",
                                "description": "Customer property the condition tests. `email`, `name`, `locale`, `country`: the customer's profile fields (email compared ignoring case, country as an uppercase code). `email_verified`: whether the email is verified. `created_at_days_ago`: days since the customer joined the workspace. `post_count`, `vote_count`, `comment_count`: the customer's feedback posts, votes and comments (deleted posts and comments not counted). `plan`: the `plan` key of the customer's attributes. `metadata_key`: the customer attribute named by `metadataKey`. `principal_type`: `user` or `anonymous` (only identified `user` customers ever match a rule). `company_plan`, `company_size`, `company_industry`: fields of the customer's company. `company_mrr`: the company's monthly revenue in major units; a rule on it needs the `view_revenue` permission. `company_attr`: the company custom attribute named by `metadataKey`. Rules stored before this API may hold other attributes, which are ignored when the segment is evaluated.",
                                "example": "company_plan"
                              },
                              "operator": {
                                "type": "string",
                                "description": "Comparison. `eq`, `neq`, `lt`, `lte`, `gt`, `gte`: compare with `value` (numerically when `value` is a number). `contains`, `starts_with`, `ends_with`: text match ignoring case. `in`: equals one of `values`. `is_set`, `is_not_set`: whether the property has a value (for `email_verified`, whether the email is verified; for counts, whether the count is above zero). A condition whose operator doesn't apply to its attribute is ignored when the segment is evaluated.",
                                "example": "eq"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Value the condition compares with. Null for an `in` condition and when no value is stored, as for `is_set` and `is_not_set`.",
                                "example": "Scale"
                              },
                              "values": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                "description": "Values of an `in` condition. Null for other operators.",
                                "example": null
                              },
                              "metadataKey": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Attribute key of a `metadata_key` or `company_attr` condition. Null when unset.",
                                "example": null
                              }
                            },
                            "required": [
                              "attribute",
                              "operator",
                              "value",
                              "values",
                              "metadataKey"
                            ],
                            "description": "One condition of the segment's rules."
                          },
                          "description": "Conditions of the rules, in stored order."
                        }
                      },
                      "required": [
                        "match",
                        "conditions"
                      ],
                      "description": "Rules of a dynamic segment. A manual segment has none (null)."
                    },
                    "memberCount": {
                      "type": "number",
                      "description": "Number of customers in the segment. For a dynamic segment, as of its last evaluation.",
                      "example": 42
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the segment was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the segment was last changed, in ISO 8601 UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "description",
                    "type",
                    "color",
                    "rules",
                    "memberCount",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "A segment: a named group of customers, chosen by hand (`manual`) or by rules (`dynamic`)."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/segments/attribute-values": {
      "get": {
        "operationId": "listQuillsSegmentAttributeValues",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Suggest existing values for a segment rule attribute",
        "description": "Suggests values for a segment rule from the existing values of a customer field: the most common values among identified customers first, then in alphabetical order. Leads, teammates, test customers and unset (null) values are left out. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "country",
                "locale",
                "name",
                "email"
              ],
              "description": "Customer field to suggest values for. `country`: country code; `locale`: locale code; `name`: display name; `email`: email address.",
              "example": "country"
            },
            "required": true,
            "description": "Customer field to suggest values for. `country`: country code; `locale`: locale code; `name`: display name; `email`: email address.",
            "name": "attribute",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "default": "",
              "description": "Prefix that values must start with, ignoring case. Up to 200 characters after trimming. Defaults to empty, which matches every value.",
              "example": "u"
            },
            "required": false,
            "description": "Prefix that values must start with, ignoring case. Up to 200 characters after trimming. Defaults to empty, which matches every value.",
            "name": "query",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of values to return, from 1 to 50. Defaults to 20.",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of values to return, from 1 to 50. Defaults to 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The most common values among identified customers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "string",
                            "description": "A value of the field, as stored.",
                            "example": "US"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of identified customers with this value.",
                            "example": 318
                          }
                        },
                        "required": [
                          "value",
                          "count"
                        ]
                      },
                      "description": "Values sorted by count (highest first), then by value."
                    }
                  },
                  "required": [
                    "values"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/segments/evaluate": {
      "post": {
        "operationId": "evaluateQuillsAllSegments",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Rebuild the members of the dynamic segments",
        "description": "Rebuilds the members of the workspace's dynamic segments from their rules, as `POST /segments/{segmentId}/evaluate` does for one: the first 25 segments that aren't deleted, in ID order. `truncated` says that more exist. A segment whose rules match more than 10000 people is skipped and keeps its members. Records one `segment.evaluated_all` event with the number of segments evaluated. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The membership change per segment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "segmentId": {
                            "type": "string",
                            "description": "ID of the evaluated segment (TypeID).",
                            "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
                          },
                          "added": {
                            "type": "number",
                            "description": "Number of customers who joined the segment.",
                            "example": 5
                          },
                          "removed": {
                            "type": "number",
                            "description": "Number of customers who left the segment.",
                            "example": 2
                          },
                          "members": {
                            "type": "number",
                            "description": "Number of customers who match the rules, which is the segment's member count after the evaluation.",
                            "example": 42
                          },
                          "skipped": {
                            "type": "boolean",
                            "description": "Whether the segment was skipped because its rules match more than 10000 people. A skipped segment keeps its members, and its counts are 0.",
                            "example": false
                          }
                        },
                        "required": [
                          "segmentId",
                          "added",
                          "removed",
                          "members",
                          "skipped"
                        ]
                      },
                      "description": "One result per evaluated segment, in ID order."
                    },
                    "truncated": {
                      "type": "boolean",
                      "description": "Whether more than 25 dynamic segments exist, so some were not evaluated.",
                      "example": false
                    }
                  },
                  "required": [
                    "results",
                    "truncated"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/segments/{segmentId}": {
      "put": {
        "operationId": "updateQuillsSegment",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Update a segment",
        "description": "Changes the fields that are sent; send at least one. The type can't change, and renaming doesn't change the slug. `rules` replaces the rules of a dynamic segment (409 for a manual segment); members change only at the next evaluation. A rule on `company_mrr` requires the `view_revenue` permission (403 otherwise). Records a `segment.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Segment ID. Accepts the TypeID or its UUID. Deleted segments are not found.",
              "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
            },
            "required": true,
            "description": "Segment ID. Accepts the TypeID or its UUID. Deleted segments are not found.",
            "name": "segmentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "New display name, 1 to 100 characters after trimming. Omit it to keep the current name.",
                    "example": "Enterprise accounts"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "New description, up to 500 characters after trimming. Null clears it; omitting it keeps it.",
                    "example": "Customers on the Enterprise plan."
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$",
                    "description": "Badge color as a six-digit hex code in `#RRGGBB` form. Defaults to `#6b7280` on create; omitting it on update keeps it.",
                    "example": "#6366f1"
                  },
                  "rules": {
                    "type": "object",
                    "properties": {
                      "match": {
                        "type": "string",
                        "enum": [
                          "all",
                          "any"
                        ],
                        "description": "How the conditions combine. `all`: a customer must match every condition; `any`: at least one.",
                        "example": "all"
                      },
                      "conditions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "attribute": {
                              "type": "string",
                              "enum": [
                                "email",
                                "email_verified",
                                "created_at_days_ago",
                                "post_count",
                                "vote_count",
                                "comment_count",
                                "plan",
                                "metadata_key",
                                "name",
                                "locale",
                                "country",
                                "principal_type",
                                "company_plan",
                                "company_mrr",
                                "company_size",
                                "company_industry",
                                "company_attr"
                              ],
                              "description": "Customer property the condition tests. `email`, `name`, `locale`, `country`: the customer's profile fields (email compared ignoring case, country as an uppercase code). `email_verified`: whether the email is verified. `created_at_days_ago`: days since the customer joined the workspace. `post_count`, `vote_count`, `comment_count`: the customer's feedback posts, votes and comments (deleted posts and comments not counted). `plan`: the `plan` key of the customer's attributes. `metadata_key`: the customer attribute named by `metadataKey`. `principal_type`: `user` or `anonymous` (only identified `user` customers ever match a rule). `company_plan`, `company_size`, `company_industry`: fields of the customer's company. `company_mrr`: the company's monthly revenue in major units; a rule on it needs the `view_revenue` permission. `company_attr`: the company custom attribute named by `metadataKey`.",
                              "example": "company_plan"
                            },
                            "operator": {
                              "type": "string",
                              "enum": [
                                "eq",
                                "neq",
                                "lt",
                                "lte",
                                "gt",
                                "gte",
                                "contains",
                                "starts_with",
                                "ends_with",
                                "in",
                                "is_set",
                                "is_not_set"
                              ],
                              "description": "Comparison. `eq`, `neq`, `lt`, `lte`, `gt`, `gte`: compare with `value` (numerically when `value` is a number). `contains`, `starts_with`, `ends_with`: text match ignoring case. `in`: equals one of `values`. `is_set`, `is_not_set`: whether the property has a value (for `email_verified`, whether the email is verified; for counts, whether the count is above zero). A condition whose operator doesn't apply to its attribute is ignored when the segment is evaluated.",
                              "example": "eq"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 200
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Value to compare with: a string of up to 200 characters, a number or a boolean. For `created_at_days_ago`, a number of days; for `company_mrr`, an amount in major units (`100` means 100.00), not cents. Not used by `in`, `is_set` or `is_not_set`.",
                              "example": "Scale"
                            },
                            "values": {
                              "type": [
                                "array",
                                "null"
                              ],
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  {
                                    "type": "number"
                                  }
                                ]
                              },
                              "maxItems": 100,
                              "description": "Values for the `in` operator, up to 100 strings (each up to 200 characters) or numbers. Not used by other operators.",
                              "example": [
                                "US",
                                "CA"
                              ]
                            },
                            "metadataKey": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "maxLength": 64,
                              "description": "Attribute key, up to 64 characters, for `metadata_key` (a customer attribute) and `company_attr` (a company custom attribute). Without it, a condition on those attributes is ignored. Not used by other attributes.",
                              "example": "seats"
                            }
                          },
                          "required": [
                            "attribute",
                            "operator"
                          ],
                          "description": "One condition of a dynamic segment rule."
                        },
                        "minItems": 1,
                        "maxItems": 20,
                        "description": "Conditions to test, 1 to 20."
                      }
                    },
                    "required": [
                      "match",
                      "conditions"
                    ],
                    "description": "Rules of a dynamic segment. Only identified customers can match: teammates, leads and test customers never do."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated segment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Segment ID (TypeID).",
                      "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the segment.",
                      "example": "Enterprise customers"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Stable identifier made from the name when the segment was created: lowercase letters, digits and hyphens, with `-2`, `-3`… added when taken. Renaming the segment doesn't change it. Signed widget identities name segments by slug in their `segments` claim.",
                      "example": "enterprise-customers"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text description. Null when unset.",
                      "example": "Customers on the Enterprise plan."
                    },
                    "type": {
                      "type": "string",
                      "description": "How members are chosen. `manual`: teammates add and remove them; `dynamic`: they come from `rules` each time the segment is evaluated.",
                      "example": "dynamic"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    },
                    "rules": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "match": {
                          "type": "string",
                          "description": "How the conditions combine. `all`: a customer must match every condition; `any`: at least one.",
                          "example": "all"
                        },
                        "conditions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "attribute": {
                                "type": "string",
                                "description": "Customer property the condition tests. `email`, `name`, `locale`, `country`: the customer's profile fields (email compared ignoring case, country as an uppercase code). `email_verified`: whether the email is verified. `created_at_days_ago`: days since the customer joined the workspace. `post_count`, `vote_count`, `comment_count`: the customer's feedback posts, votes and comments (deleted posts and comments not counted). `plan`: the `plan` key of the customer's attributes. `metadata_key`: the customer attribute named by `metadataKey`. `principal_type`: `user` or `anonymous` (only identified `user` customers ever match a rule). `company_plan`, `company_size`, `company_industry`: fields of the customer's company. `company_mrr`: the company's monthly revenue in major units; a rule on it needs the `view_revenue` permission. `company_attr`: the company custom attribute named by `metadataKey`. Rules stored before this API may hold other attributes, which are ignored when the segment is evaluated.",
                                "example": "company_plan"
                              },
                              "operator": {
                                "type": "string",
                                "description": "Comparison. `eq`, `neq`, `lt`, `lte`, `gt`, `gte`: compare with `value` (numerically when `value` is a number). `contains`, `starts_with`, `ends_with`: text match ignoring case. `in`: equals one of `values`. `is_set`, `is_not_set`: whether the property has a value (for `email_verified`, whether the email is verified; for counts, whether the count is above zero). A condition whose operator doesn't apply to its attribute is ignored when the segment is evaluated.",
                                "example": "eq"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Value the condition compares with. Null for an `in` condition and when no value is stored, as for `is_set` and `is_not_set`.",
                                "example": "Scale"
                              },
                              "values": {
                                "type": [
                                  "array",
                                  "null"
                                ],
                                "items": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    }
                                  ]
                                },
                                "description": "Values of an `in` condition. Null for other operators.",
                                "example": null
                              },
                              "metadataKey": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Attribute key of a `metadata_key` or `company_attr` condition. Null when unset.",
                                "example": null
                              }
                            },
                            "required": [
                              "attribute",
                              "operator",
                              "value",
                              "values",
                              "metadataKey"
                            ],
                            "description": "One condition of the segment's rules."
                          },
                          "description": "Conditions of the rules, in stored order."
                        }
                      },
                      "required": [
                        "match",
                        "conditions"
                      ],
                      "description": "Rules of a dynamic segment. A manual segment has none (null)."
                    },
                    "memberCount": {
                      "type": "number",
                      "description": "Number of customers in the segment. For a dynamic segment, as of its last evaluation.",
                      "example": 42
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the segment was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the segment was last changed, in ISO 8601 UTC.",
                      "example": "2026-11-18T10:42:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "description",
                    "type",
                    "color",
                    "rules",
                    "memberCount",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "A segment: a named group of customers, chosen by hand (`manual`) or by rules (`dynamic`)."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No segment with this ID in the workspace, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The segment is manual; only a dynamic segment has rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsSegment",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Delete a segment",
        "description": "Soft-deletes a segment and removes all its memberships. A deleted segment is left out of lists and is not found by the other segment routes. Records a `segment.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Segment ID. Accepts the TypeID or its UUID. Deleted segments are not found.",
              "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
            },
            "required": true,
            "description": "Segment ID. Accepts the TypeID or its UUID. Deleted segments are not found.",
            "name": "segmentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted segment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted segment (TypeID).",
                      "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No segment with this ID in the workspace, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/segments/{segmentId}/members": {
      "post": {
        "operationId": "addQuillsSegmentMembers",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Add customers to a manual segment",
        "description": "Adds customers to a manual segment. All or nothing: if any ID isn't a customer of the workspace, nothing changes (404). Customers already in the segment are skipped. Records a `segment.members_added` event with the number added. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Segment ID. Accepts the TypeID or its UUID. Deleted segments are not found.",
              "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
            },
            "required": true,
            "description": "Segment ID. Accepts the TypeID or its UUID. Deleted segments are not found.",
            "name": "segmentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "principalIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                      "example": "principal_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Principal IDs of the customers, 1 to 100. Each accepts the TypeID or its UUID; repeated IDs count once. Leads can be members; teammates and test customers can't.",
                    "example": [
                      "principal_01m8rz8c9mfk282gfax7mg8256",
                      "principal_01m8rz8c9mfk282gfp8y4nkwnm"
                    ]
                  }
                },
                "required": [
                  "principalIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "How many memberships were added",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "segmentId": {
                      "type": "string",
                      "description": "ID of the segment (TypeID).",
                      "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
                    },
                    "added": {
                      "type": "number",
                      "description": "Number of customers added. Customers who were already members aren't counted.",
                      "example": 2
                    }
                  },
                  "required": [
                    "segmentId",
                    "added"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No live segment with this ID, or an ID in `principalIds` isn't a customer of the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The segment is dynamic; its members come from its rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsSegmentMembers",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Remove customers from a manual segment",
        "description": "Removes customers from a manual segment. All or nothing: if any ID isn't a customer of the workspace, nothing changes (404). Customers who aren't members are skipped. Records a `segment.members_removed` event with the number removed. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Segment ID. Accepts the TypeID or its UUID. Deleted segments are not found.",
              "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
            },
            "required": true,
            "description": "Segment ID. Accepts the TypeID or its UUID. Deleted segments are not found.",
            "name": "segmentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "principalIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                      "example": "principal_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Principal IDs of the customers, 1 to 100. Each accepts the TypeID or its UUID; repeated IDs count once. Leads can be members; teammates and test customers can't.",
                    "example": [
                      "principal_01m8rz8c9mfk282gfax7mg8256",
                      "principal_01m8rz8c9mfk282gfp8y4nkwnm"
                    ]
                  }
                },
                "required": [
                  "principalIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "How many memberships were removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "segmentId": {
                      "type": "string",
                      "description": "ID of the segment (TypeID).",
                      "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
                    },
                    "removed": {
                      "type": "number",
                      "description": "Number of customers removed. Customers who weren't members aren't counted.",
                      "example": 1
                    }
                  },
                  "required": [
                    "segmentId",
                    "removed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No live segment with this ID, or an ID in `principalIds` isn't a customer of the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The segment is dynamic; its members come from its rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/segments/{segmentId}/evaluate": {
      "post": {
        "operationId": "evaluateQuillsSegment",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Rebuild the members of a dynamic segment from its rules",
        "description": "Rebuilds the members of a dynamic segment from its current rules: adds the identified customers who match and removes the members who no longer do. Rules with no applicable condition match nobody. Fails with 409, and changes nothing, when the rules match more than 10000 people. Records a `segment.evaluated` event with the numbers added and removed. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Segment ID. Accepts the TypeID or its UUID. Deleted segments are not found.",
              "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
            },
            "required": true,
            "description": "Segment ID. Accepts the TypeID or its UUID. Deleted segments are not found.",
            "name": "segmentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The membership change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "segmentId": {
                      "type": "string",
                      "description": "ID of the evaluated segment (TypeID).",
                      "example": "segment_01m8rz8c9mfk282gfr0xyb5ha1"
                    },
                    "added": {
                      "type": "number",
                      "description": "Number of customers who joined the segment.",
                      "example": 5
                    },
                    "removed": {
                      "type": "number",
                      "description": "Number of customers who left the segment.",
                      "example": 2
                    },
                    "members": {
                      "type": "number",
                      "description": "Number of customers who match the rules, which is the segment's member count after the evaluation.",
                      "example": 42
                    }
                  },
                  "required": [
                    "segmentId",
                    "added",
                    "removed",
                    "members"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No segment with this ID in the workspace, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The segment is manual, or its rules match more than 10000 people",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/audit-events": {
      "get": {
        "operationId": "listQuillsAuditEvents",
        "tags": [
          "Privacy and audit"
        ],
        "summary": "List Albus audit events, newest first",
        "description": "Lists the workspace's audit events, newest first, with cursor paging. Filters combine. Events leave out their metadata, before and after values, IP address and user agent. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "description": "Event type to list, matched exactly. 1 to 100 characters after trimming.",
              "example": "company.created"
            },
            "required": false,
            "description": "Event type to list, matched exactly. 1 to 100 characters after trimming.",
            "name": "eventType",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 2000,
              "description": "Comma-separated event types to leave out, up to 20 (each up to 100 characters, 2,000 characters in all).",
              "example": "segment.evaluated,segment.evaluated_all"
            },
            "required": false,
            "description": "Comma-separated event types to leave out, up to 20 (each up to 100 characters, 2,000 characters in all).",
            "name": "exclude",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only events made by this principal. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz8c9mfk282gfp8y4nkwnm"
            },
            "required": false,
            "description": "Only events made by this principal. Accepts the TypeID or its UUID.",
            "name": "actorPrincipalId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "Earliest time to include (inclusive), as an ISO 8601 date-time with `Z` or an offset.",
              "example": "2026-11-01T00:00:00Z"
            },
            "required": false,
            "description": "Earliest time to include (inclusive), as an ISO 8601 date-time with `Z` or an offset.",
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "Latest time to include (inclusive), as an ISO 8601 date-time with `Z` or an offset.",
              "example": "2026-11-30T23:59:59Z"
            },
            "required": false,
            "description": "Latest time to include (inclusive), as an ISO 8601 date-time with `Z` or an offset.",
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor: the `nextCursor` of the previous page. Lists the events older than that event. Accepts the TypeID or its UUID.",
              "example": "audit_01m8rz8c9mfk282ggtxr4mwk7c"
            },
            "required": false,
            "description": "Cursor: the `nextCursor` of the previous page. Lists the events older than that event. Accepts the TypeID or its UUID.",
            "name": "before",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of events to return, from 1 to 100. Defaults to 50.",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of events to return, from 1 to 100. Defaults to 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of audit events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Audit event ID (TypeID).",
                            "example": "audit_01m8rz8c9mfk282ggtxr4mwk7c"
                          },
                          "occurredAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the event happened, in ISO 8601 UTC.",
                            "example": "2026-11-18T10:42:00.000Z"
                          },
                          "eventType": {
                            "type": "string",
                            "description": "Dotted event type.",
                            "example": "company.created"
                          },
                          "eventOutcome": {
                            "type": "string",
                            "description": "Whether the action worked. `success` or `failure`.",
                            "example": "success"
                          },
                          "actorPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of who acted. Null for system actions or when unknown.",
                            "example": "principal_01m8rz8c9mfk282gfp8y4nkwnm"
                          },
                          "actorType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal type of the actor when the event was written, such as `user`, `service`, `system` or `api_key`. Null when unknown.",
                            "example": "user"
                          },
                          "targetType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Kind of record acted on, such as `company` or `settings`. Null when the event has no target.",
                            "example": "company"
                          },
                          "targetId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the record acted on. Null when the event has no target.",
                            "example": "company_01m8rz8c9kfk282gerr2zmvjm7"
                          },
                          "channel": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "What carried the change: `ui`, `api`, `mcp`, `assistant`, `workflow` or `system`. Null on older rows and on paths that don't record it.",
                            "example": "api"
                          }
                        },
                        "required": [
                          "id",
                          "occurredAt",
                          "eventType",
                          "eventOutcome",
                          "actorPrincipalId",
                          "actorType",
                          "targetType",
                          "targetId",
                          "channel"
                        ]
                      },
                      "description": "Audit events on this page, newest first."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Value to send as `before` for the next page. Null on the last page.",
                      "example": "audit_01m8rz8c9mfk282ggtxr4mwk7c"
                    }
                  },
                  "required": [
                    "events",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No audit event with the `before` ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/principals": {
      "get": {
        "operationId": "listQuillsPrincipals",
        "tags": [
          "Teammates and teams"
        ],
        "summary": "List teammates",
        "description": "Lists the support-desk principals of current workspace members, with their workspace role, sorted by display name. Former members are left out, and customers are never listed. The roster is read-only here: manage it in the workspace member settings. Offset paging. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Text to look for, case-insensitive, anywhere in the display name. Up to 200 characters.",
              "example": "priya"
            },
            "required": false,
            "description": "Text to look for, case-insensitive, anywhere in the display name. Up to 200 characters.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 100000,
              "default": 0,
              "description": "Number of teammates to skip, from 0 to 100,000. Pass the previous page's `nextOffset`. Defaults to 0.",
              "example": 0
            },
            "required": false,
            "description": "Number of teammates to skip, from 0 to 100,000. Pass the previous page's `nextOffset`. Defaults to 0.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "Maximum number of teammates to return, from 1 to 100. Defaults to 100.",
              "example": 100
            },
            "required": false,
            "description": "Maximum number of teammates to return, from 1 to 100. Defaults to 100.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of teammates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Principal ID of the teammate: their actor in the support desk, used for assignment and mentions.",
                            "example": "principal_01m8rz9gcafztr3vbfyq5qhtzq"
                          },
                          "userId": {
                            "type": "string",
                            "description": "ID of the teammate's user account.",
                            "example": "vpptt8t3d7ft91y45poatb3p"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the teammate. Null when unset.",
                            "example": "Priya Raman"
                          },
                          "avatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the teammate's avatar image. Null when unset.",
                            "example": "https://example.com/avatars/priya.png"
                          },
                          "role": {
                            "type": "string",
                            "description": "Workspace role of the member: a built-in role (`owner`, `admin`, `member`, `collaborator`, `viewer`) or a custom role's name.",
                            "example": "member"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the teammate's principal was created, in ISO 8601 UTC.",
                            "example": "2026-01-08T11:15:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "userId",
                          "name",
                          "avatarUrl",
                          "role",
                          "createdAt"
                        ]
                      },
                      "description": "The teammates on this page, by display name."
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page. Null when this page is the last one.",
                      "example": null
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/principals/{principalId}": {
      "get": {
        "operationId": "getQuillsPrincipal",
        "tags": [
          "Teammates and teams"
        ],
        "summary": "Get a teammate",
        "description": "Returns one teammate with their workspace role. Only current workspace members are found. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the teammate. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz9gcafztr3vbfyq5qhtzq"
            },
            "required": true,
            "description": "Principal ID of the teammate. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The teammate",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Principal ID of the teammate: their actor in the support desk, used for assignment and mentions.",
                      "example": "principal_01m8rz9gcafztr3vbfyq5qhtzq"
                    },
                    "userId": {
                      "type": "string",
                      "description": "ID of the teammate's user account.",
                      "example": "vpptt8t3d7ft91y45poatb3p"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the teammate. Null when unset.",
                      "example": "Priya Raman"
                    },
                    "avatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the teammate's avatar image. Null when unset.",
                      "example": "https://example.com/avatars/priya.png"
                    },
                    "role": {
                      "type": "string",
                      "description": "Workspace role of the member: a built-in role (`owner`, `admin`, `member`, `collaborator`, `viewer`) or a custom role's name.",
                      "example": "member"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the teammate's principal was created, in ISO 8601 UTC.",
                      "example": "2026-01-08T11:15:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "userId",
                    "name",
                    "avatarUrl",
                    "role",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Teammate not found: the principal isn't a current member of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/mentions/suggest": {
      "get": {
        "operationId": "listQuillsMentionSuggestions",
        "tags": [
          "Teammates and teams"
        ],
        "summary": "Suggest people to @-mention",
        "description": "Returns up to 10 people whose name starts with `q`, case-insensitive, sorted by name. The name is the display name, else the profile name. Email is never searched or returned. `scope=all` covers current teammates and identified customers (not leads, test customers or former members); `scope=team` covers teammates only. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "default": "",
              "description": "Start of the name to match, case-insensitive, up to 100 characters. Empty (the default) matches everyone.",
              "example": "pri"
            },
            "required": false,
            "description": "Start of the name to match, case-insensitive, up to 100 characters. Empty (the default) matches everyone.",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "team"
              ],
              "default": "all",
              "description": "Who to suggest. `all`: teammates and identified customers; `team`: teammates only. Defaults to `all`.",
              "example": "team"
            },
            "required": false,
            "description": "Who to suggest. `all`: teammates and identified customers; `team`: teammates only. Defaults to `all`.",
            "name": "scope",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Up to 10 people",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the person.",
                            "example": "principal_01m8rz9gcafztr3vbfyq5qhtzq"
                          },
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the person: the display name, else the profile name. Null when neither is set.",
                            "example": "Priya Raman"
                          },
                          "avatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the person's avatar image. Null when unset.",
                            "example": "https://example.com/avatars/priya.png"
                          },
                          "teammate": {
                            "type": "boolean",
                            "description": "Whether the person is a teammate. False for a customer.",
                            "example": true
                          }
                        },
                        "required": [
                          "principalId",
                          "displayName",
                          "avatarUrl",
                          "teammate"
                        ]
                      },
                      "description": "Matching people, by name. Up to 10."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings": {
      "get": {
        "operationId": "listQuillsSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the workspace settings overview",
        "description": "Returns the workspace name and slug, which product modules are on, and the settings areas that have their own routes. The name and slug belong to the workspace and are read-only here. Secrets are never included. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Settings overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The workspace name",
                      "example": "Acme"
                    },
                    "slug": {
                      "type": "string",
                      "description": "The workspace slug, used in portal and API URLs",
                      "example": "acme"
                    },
                    "modules": {
                      "type": "object",
                      "properties": {
                        "feedback": {
                          "type": "boolean",
                          "description": "Whether feedback boards are on. Always true: feedback is the portal home page.",
                          "example": true
                        },
                        "roadmap": {
                          "type": "boolean",
                          "description": "Whether the roadmap is on",
                          "example": true
                        },
                        "changelog": {
                          "type": "boolean",
                          "description": "Whether the changelog is on",
                          "example": true
                        },
                        "helpCenter": {
                          "type": "boolean",
                          "description": "Whether the help center is on",
                          "example": false
                        },
                        "supportInbox": {
                          "type": "boolean",
                          "description": "Whether the support inbox (conversations) is on",
                          "example": false
                        },
                        "supportTickets": {
                          "type": "boolean",
                          "description": "Whether support tickets are on",
                          "example": false
                        },
                        "statusPage": {
                          "type": "boolean",
                          "description": "Whether the status page is on",
                          "example": false
                        },
                        "surveys": {
                          "type": "boolean",
                          "description": "Whether surveys are on",
                          "example": false
                        },
                        "ai": {
                          "type": "boolean",
                          "description": "Whether AI features are on",
                          "example": false
                        }
                      },
                      "required": [
                        "feedback",
                        "roadmap",
                        "changelog",
                        "helpCenter",
                        "supportInbox",
                        "supportTickets",
                        "statusPage",
                        "surveys",
                        "ai"
                      ],
                      "description": "Product modules and whether each is on. Turning a module off hides it; its data stays."
                    },
                    "areas": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The settings areas, each read with GET /settings/{area} and changed with PUT /settings/{area}",
                      "example": [
                        "portal",
                        "branding",
                        "widget",
                        "developer",
                        "labs"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "slug",
                    "modules",
                    "areas"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/portal": {
      "get": {
        "operationId": "getQuillsPortalSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the portal settings",
        "description": "Returns the workspace's portal settings, with the default filled in for each value that was never saved. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The portal settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the portal is on. On by default; while it is off, every portal and public route answers 404.",
                      "example": true
                    },
                    "features": {
                      "type": "object",
                      "properties": {
                        "allowAnonymous": {
                          "type": "boolean",
                          "description": "Whether visitors without sign-in may interact on boards whose rules allow it. Default false.",
                          "example": false
                        },
                        "allowEditAfterEngagement": {
                          "type": "boolean",
                          "description": "Whether an author may still edit a post after review, a merge, or votes or comments from others. Default false.",
                          "example": false
                        },
                        "allowDeleteAfterEngagement": {
                          "type": "boolean",
                          "description": "Whether an author may still delete a post after review, a merge, votes from others or any comment. Default false.",
                          "example": false
                        },
                        "showPublicEditHistory": {
                          "type": "boolean",
                          "description": "Whether the portal shows the edit history of posts. Default false.",
                          "example": false
                        }
                      },
                      "required": [
                        "allowAnonymous",
                        "allowEditAfterEngagement",
                        "allowDeleteAfterEngagement",
                        "showPublicEditHistory"
                      ],
                      "description": "Portal feature switches"
                    },
                    "openSignup": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "The stored open sign-up switch. Null when it was never set.",
                      "example": true
                    },
                    "moderationDefault": {
                      "type": "object",
                      "properties": {
                        "requireApproval": {
                          "type": "string",
                          "description": "Which new content waits for review unless a board's own rule says otherwise. none (the default): nothing. anonymous: posts by visitors without sign-in. authenticated: posts by signed-in customers. all: every post and comment.",
                          "example": "none"
                        },
                        "holdImages": {
                          "type": "boolean",
                          "description": "The stored image hold setting of the moderation defaults",
                          "example": false
                        },
                        "holdLinks": {
                          "type": "boolean",
                          "description": "Whether a post or comment with a link is held for review",
                          "example": false
                        },
                        "holdSpam": {
                          "type": "boolean",
                          "description": "Whether a post or comment that the spam rules flag is held for review",
                          "example": false
                        },
                        "holdSensitive": {
                          "type": "boolean",
                          "description": "Whether a post or comment that shows an email, a phone or card number, an IBAN or a secret key is held for review",
                          "example": false
                        }
                      },
                      "required": [
                        "requireApproval",
                        "holdImages",
                        "holdLinks",
                        "holdSpam",
                        "holdSensitive"
                      ],
                      "description": "The workspace moderation defaults. Read-only here; the moderation settings route writes them."
                    },
                    "access": {
                      "type": "object",
                      "properties": {
                        "visibility": {
                          "type": "string",
                          "description": "Who may open the portal. public: anyone. private: only workspace members and the customers that allowedDomains, allowedSegmentIds, an accepted portal invite or widget token sign-in admit.",
                          "example": "public"
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Email domains whose signed-in customers with a verified email may open a private portal",
                          "example": [
                            "example.com"
                          ]
                        },
                        "widgetSignIn": {
                          "type": "boolean",
                          "description": "The same value as signIn.widgetSignIn, kept for older clients",
                          "example": false
                        },
                        "allowedSegmentIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Customer segments whose members (with a verified email) may open a private portal",
                          "example": [
                            "segment_01m8rxxee8esga9vey4mmseay0"
                          ]
                        }
                      },
                      "required": [
                        "visibility",
                        "allowedDomains",
                        "widgetSignIn",
                        "allowedSegmentIds"
                      ],
                      "description": "Who may open the portal. Read-only here; PUT /settings/portal/access writes it."
                    },
                    "signIn": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "account",
                            "sso",
                            "disabled"
                          ],
                          "description": "account: customers sign in on the sign-in page (the default). sso: the portal's sign-in button opens ssoUrl, the host app's login page. disabled: no customer signs in to the portal. A stored sso without ssoUrl reads as account.",
                          "example": "account"
                        },
                        "widgetSignIn": {
                          "type": "boolean",
                          "description": "Whether the widget may open the portal already signed in, through widget token sign-in",
                          "example": false
                        },
                        "ssoUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The host app's login page (http or https). Null when none is set.",
                          "example": "https://app.example.com/login"
                        }
                      },
                      "required": [
                        "mode",
                        "widgetSignIn",
                        "ssoUrl"
                      ],
                      "description": "How customers sign in. Read-only here; PUT /settings/portal/sign-in writes it."
                    },
                    "nav": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The tab's ID",
                            "example": "roadmap"
                          },
                          "type": {
                            "type": "string",
                            "description": "The tab kind: feedback, roadmap, changelog, help (help center), support, status (status page), or link (a custom link tab)",
                            "example": "link"
                          },
                          "enabled": {
                            "type": "boolean",
                            "description": "Whether the tab shows",
                            "example": true
                          },
                          "label": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The tab label. Null when not set.",
                            "example": "Docs"
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The URL that a link tab opens. Null for other tab kinds.",
                            "example": "https://docs.example.com"
                          },
                          "newTab": {
                            "type": "boolean",
                            "description": "Whether a link tab opens in a new browser tab",
                            "example": true
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "enabled",
                          "label",
                          "url",
                          "newTab"
                        ]
                      },
                      "description": "The stored portal tabs, in order. A built-in tab that the list does not name shows."
                    },
                    "supportEnabled": {
                      "type": "boolean",
                      "description": "Whether portal customers can reach support (conversations and tickets) in the portal. Default true.",
                      "example": true
                    }
                  },
                  "required": [
                    "enabled",
                    "features",
                    "openSignup",
                    "moderationDefault",
                    "access",
                    "signIn",
                    "nav",
                    "supportEnabled"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateQuillsPortalSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Update the portal settings",
        "description": "Changes only the fields that the body sends; fields left out keep their value. The body must name at least one field. Requires the `manage_settings` permission. Records a `settings.portal_updated` event. When a field that undo restores changed, the response's receiptId undoes this change with POST /settings/receipts/{receiptId}/undo.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Turns the portal on or off. While it is off, every portal and public route answers 404.",
                    "example": true
                  },
                  "allowAnonymous": {
                    "type": "boolean",
                    "description": "Whether visitors without sign-in may interact on boards whose rules allow it",
                    "example": false
                  },
                  "openSignup": {
                    "type": "boolean",
                    "description": "The open sign-up switch",
                    "example": true
                  },
                  "supportEnabled": {
                    "type": "boolean",
                    "description": "Whether portal customers can reach support (conversations and tickets) in the portal",
                    "example": true
                  },
                  "nav": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "A client-chosen ID of the tab, unique in the list",
                          "example": "roadmap"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "feedback",
                            "roadmap",
                            "changelog",
                            "help",
                            "support",
                            "status",
                            "link"
                          ],
                          "description": "The tab kind: feedback, roadmap, changelog, help (help center), support, status (status page), or link (a custom link tab)",
                          "example": "link"
                        },
                        "enabled": {
                          "type": "boolean",
                          "description": "Whether the tab shows. Absent: true.",
                          "example": true
                        },
                        "label": {
                          "type": "string",
                          "maxLength": 30,
                          "description": "The tab label. A link tab shows only with a label.",
                          "example": "Docs"
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2048,
                          "format": "uri",
                          "description": "The http(s) URL that a link tab opens. Ignored for other tab kinds.",
                          "example": "https://docs.example.com"
                        },
                        "newTab": {
                          "type": "boolean",
                          "description": "Whether a link tab opens in a new browser tab. Absent: true. Ignored for other tab kinds.",
                          "example": true
                        }
                      },
                      "required": [
                        "id",
                        "type"
                      ]
                    },
                    "maxItems": 20,
                    "description": "The portal tabs in display order. Replaces the stored list whole. url and newTab are kept only for link tabs."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The portal settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the portal is on. On by default; while it is off, every portal and public route answers 404.",
                      "example": true
                    },
                    "features": {
                      "type": "object",
                      "properties": {
                        "allowAnonymous": {
                          "type": "boolean",
                          "description": "Whether visitors without sign-in may interact on boards whose rules allow it. Default false.",
                          "example": false
                        },
                        "allowEditAfterEngagement": {
                          "type": "boolean",
                          "description": "Whether an author may still edit a post after review, a merge, or votes or comments from others. Default false.",
                          "example": false
                        },
                        "allowDeleteAfterEngagement": {
                          "type": "boolean",
                          "description": "Whether an author may still delete a post after review, a merge, votes from others or any comment. Default false.",
                          "example": false
                        },
                        "showPublicEditHistory": {
                          "type": "boolean",
                          "description": "Whether the portal shows the edit history of posts. Default false.",
                          "example": false
                        }
                      },
                      "required": [
                        "allowAnonymous",
                        "allowEditAfterEngagement",
                        "allowDeleteAfterEngagement",
                        "showPublicEditHistory"
                      ],
                      "description": "Portal feature switches"
                    },
                    "openSignup": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "The stored open sign-up switch. Null when it was never set.",
                      "example": true
                    },
                    "moderationDefault": {
                      "type": "object",
                      "properties": {
                        "requireApproval": {
                          "type": "string",
                          "description": "Which new content waits for review unless a board's own rule says otherwise. none (the default): nothing. anonymous: posts by visitors without sign-in. authenticated: posts by signed-in customers. all: every post and comment.",
                          "example": "none"
                        },
                        "holdImages": {
                          "type": "boolean",
                          "description": "The stored image hold setting of the moderation defaults",
                          "example": false
                        },
                        "holdLinks": {
                          "type": "boolean",
                          "description": "Whether a post or comment with a link is held for review",
                          "example": false
                        },
                        "holdSpam": {
                          "type": "boolean",
                          "description": "Whether a post or comment that the spam rules flag is held for review",
                          "example": false
                        },
                        "holdSensitive": {
                          "type": "boolean",
                          "description": "Whether a post or comment that shows an email, a phone or card number, an IBAN or a secret key is held for review",
                          "example": false
                        }
                      },
                      "required": [
                        "requireApproval",
                        "holdImages",
                        "holdLinks",
                        "holdSpam",
                        "holdSensitive"
                      ],
                      "description": "The workspace moderation defaults. Read-only here; the moderation settings route writes them."
                    },
                    "access": {
                      "type": "object",
                      "properties": {
                        "visibility": {
                          "type": "string",
                          "description": "Who may open the portal. public: anyone. private: only workspace members and the customers that allowedDomains, allowedSegmentIds, an accepted portal invite or widget token sign-in admit.",
                          "example": "public"
                        },
                        "allowedDomains": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Email domains whose signed-in customers with a verified email may open a private portal",
                          "example": [
                            "example.com"
                          ]
                        },
                        "widgetSignIn": {
                          "type": "boolean",
                          "description": "The same value as signIn.widgetSignIn, kept for older clients",
                          "example": false
                        },
                        "allowedSegmentIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Customer segments whose members (with a verified email) may open a private portal",
                          "example": [
                            "segment_01m8rxxee8esga9vey4mmseay0"
                          ]
                        }
                      },
                      "required": [
                        "visibility",
                        "allowedDomains",
                        "widgetSignIn",
                        "allowedSegmentIds"
                      ],
                      "description": "Who may open the portal. Read-only here; PUT /settings/portal/access writes it."
                    },
                    "signIn": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "account",
                            "sso",
                            "disabled"
                          ],
                          "description": "account: customers sign in on the sign-in page (the default). sso: the portal's sign-in button opens ssoUrl, the host app's login page. disabled: no customer signs in to the portal. A stored sso without ssoUrl reads as account.",
                          "example": "account"
                        },
                        "widgetSignIn": {
                          "type": "boolean",
                          "description": "Whether the widget may open the portal already signed in, through widget token sign-in",
                          "example": false
                        },
                        "ssoUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The host app's login page (http or https). Null when none is set.",
                          "example": "https://app.example.com/login"
                        }
                      },
                      "required": [
                        "mode",
                        "widgetSignIn",
                        "ssoUrl"
                      ],
                      "description": "How customers sign in. Read-only here; PUT /settings/portal/sign-in writes it."
                    },
                    "nav": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The tab's ID",
                            "example": "roadmap"
                          },
                          "type": {
                            "type": "string",
                            "description": "The tab kind: feedback, roadmap, changelog, help (help center), support, status (status page), or link (a custom link tab)",
                            "example": "link"
                          },
                          "enabled": {
                            "type": "boolean",
                            "description": "Whether the tab shows",
                            "example": true
                          },
                          "label": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The tab label. Null when not set.",
                            "example": "Docs"
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The URL that a link tab opens. Null for other tab kinds.",
                            "example": "https://docs.example.com"
                          },
                          "newTab": {
                            "type": "boolean",
                            "description": "Whether a link tab opens in a new browser tab",
                            "example": true
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "enabled",
                          "label",
                          "url",
                          "newTab"
                        ]
                      },
                      "description": "The stored portal tabs, in order. A built-in tab that the list does not name shows."
                    },
                    "supportEnabled": {
                      "type": "boolean",
                      "description": "Whether portal customers can reach support (conversations and tickets) in the portal. Default true.",
                      "example": true
                    },
                    "receiptId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The receipt of this change, for POST /settings/receipts/{receiptId}/undo. Null when no field that undo restores changed, or when the change is too large to keep for undo.",
                      "example": "audit_01m8rxxee8esga9vd9jq97tmqv"
                    }
                  },
                  "required": [
                    "enabled",
                    "features",
                    "openSignup",
                    "moderationDefault",
                    "access",
                    "signIn",
                    "nav",
                    "supportEnabled",
                    "receiptId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/branding": {
      "get": {
        "operationId": "getQuillsBrandingSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the branding settings",
        "description": "Returns the workspace's branding settings, with the default filled in for each value that was never saved. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The branding settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "theme": {
                      "type": "object",
                      "properties": {
                        "preset": {
                          "type": "string",
                          "description": "The name of the theme preset that the theme was built from. Absent when none is recorded.",
                          "example": "default"
                        },
                        "themeMode": {
                          "type": "string",
                          "enum": [
                            "light",
                            "dark",
                            "user"
                          ],
                          "description": "light or dark: the portal always uses that theme. user: it follows the visitor's preference. Absent: user.",
                          "example": "user"
                        },
                        "light": {
                          "type": "object",
                          "properties": {
                            "background": {
                              "type": "string",
                              "description": "The CSS color of the background token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "foreground": {
                              "type": "string",
                              "description": "The CSS color of the foreground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "card": {
                              "type": "string",
                              "description": "The CSS color of the card token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "cardForeground": {
                              "type": "string",
                              "description": "The CSS color of the cardForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "popover": {
                              "type": "string",
                              "description": "The CSS color of the popover token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "popoverForeground": {
                              "type": "string",
                              "description": "The CSS color of the popoverForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "primary": {
                              "type": "string",
                              "description": "The CSS color of the primary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "primaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the primaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "secondary": {
                              "type": "string",
                              "description": "The CSS color of the secondary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "secondaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the secondaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "muted": {
                              "type": "string",
                              "description": "The CSS color of the muted token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "mutedForeground": {
                              "type": "string",
                              "description": "The CSS color of the mutedForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accent": {
                              "type": "string",
                              "description": "The CSS color of the accent token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accentForeground": {
                              "type": "string",
                              "description": "The CSS color of the accentForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accentInk": {
                              "type": "string",
                              "description": "The CSS color of the accentInk token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "destructive": {
                              "type": "string",
                              "description": "The CSS color of the destructive token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "destructiveForeground": {
                              "type": "string",
                              "description": "The CSS color of the destructiveForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "border": {
                              "type": "string",
                              "description": "The CSS color of the border token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "input": {
                              "type": "string",
                              "description": "The CSS color of the input token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "ring": {
                              "type": "string",
                              "description": "The CSS color of the ring token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "success": {
                              "type": "string",
                              "description": "The CSS color of the success token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarBackground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarBackground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarPrimary": {
                              "type": "string",
                              "description": "The CSS color of the sidebarPrimary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarPrimaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarPrimaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarAccent": {
                              "type": "string",
                              "description": "The CSS color of the sidebarAccent token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarAccentForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarAccentForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarBorder": {
                              "type": "string",
                              "description": "The CSS color of the sidebarBorder token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarRing": {
                              "type": "string",
                              "description": "The CSS color of the sidebarRing token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart1": {
                              "type": "string",
                              "description": "The CSS color of the chart1 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart2": {
                              "type": "string",
                              "description": "The CSS color of the chart2 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart3": {
                              "type": "string",
                              "description": "The CSS color of the chart3 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart4": {
                              "type": "string",
                              "description": "The CSS color of the chart4 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart5": {
                              "type": "string",
                              "description": "The CSS color of the chart5 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "fontSans": {
                              "type": "string",
                              "description": "The CSS font-family list of the sans-serif font. Absent when the theme does not set it.",
                              "example": "Inter, sans-serif"
                            },
                            "shadow2xs": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow2xs token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowXs": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowXs token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowSm": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowSm token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadow": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowMd": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowMd token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowLg": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowLg token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowXl": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowXl token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadow2xl": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow2xl token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "radius": {
                              "type": "string",
                              "description": "The base corner radius, a CSS length. Absent when the theme does not set it.",
                              "example": "0.5rem"
                            }
                          },
                          "description": "The token values of the light theme"
                        },
                        "dark": {
                          "type": "object",
                          "properties": {
                            "background": {
                              "type": "string",
                              "description": "The CSS color of the background token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "foreground": {
                              "type": "string",
                              "description": "The CSS color of the foreground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "card": {
                              "type": "string",
                              "description": "The CSS color of the card token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "cardForeground": {
                              "type": "string",
                              "description": "The CSS color of the cardForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "popover": {
                              "type": "string",
                              "description": "The CSS color of the popover token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "popoverForeground": {
                              "type": "string",
                              "description": "The CSS color of the popoverForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "primary": {
                              "type": "string",
                              "description": "The CSS color of the primary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "primaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the primaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "secondary": {
                              "type": "string",
                              "description": "The CSS color of the secondary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "secondaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the secondaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "muted": {
                              "type": "string",
                              "description": "The CSS color of the muted token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "mutedForeground": {
                              "type": "string",
                              "description": "The CSS color of the mutedForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accent": {
                              "type": "string",
                              "description": "The CSS color of the accent token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accentForeground": {
                              "type": "string",
                              "description": "The CSS color of the accentForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accentInk": {
                              "type": "string",
                              "description": "The CSS color of the accentInk token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "destructive": {
                              "type": "string",
                              "description": "The CSS color of the destructive token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "destructiveForeground": {
                              "type": "string",
                              "description": "The CSS color of the destructiveForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "border": {
                              "type": "string",
                              "description": "The CSS color of the border token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "input": {
                              "type": "string",
                              "description": "The CSS color of the input token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "ring": {
                              "type": "string",
                              "description": "The CSS color of the ring token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "success": {
                              "type": "string",
                              "description": "The CSS color of the success token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarBackground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarBackground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarPrimary": {
                              "type": "string",
                              "description": "The CSS color of the sidebarPrimary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarPrimaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarPrimaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarAccent": {
                              "type": "string",
                              "description": "The CSS color of the sidebarAccent token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarAccentForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarAccentForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarBorder": {
                              "type": "string",
                              "description": "The CSS color of the sidebarBorder token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarRing": {
                              "type": "string",
                              "description": "The CSS color of the sidebarRing token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart1": {
                              "type": "string",
                              "description": "The CSS color of the chart1 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart2": {
                              "type": "string",
                              "description": "The CSS color of the chart2 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart3": {
                              "type": "string",
                              "description": "The CSS color of the chart3 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart4": {
                              "type": "string",
                              "description": "The CSS color of the chart4 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart5": {
                              "type": "string",
                              "description": "The CSS color of the chart5 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "fontSans": {
                              "type": "string",
                              "description": "The CSS font-family list of the sans-serif font. Absent when the theme does not set it.",
                              "example": "Inter, sans-serif"
                            },
                            "shadow2xs": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow2xs token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowXs": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowXs token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowSm": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowSm token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadow": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowMd": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowMd token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowLg": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowLg token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowXl": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowXl token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadow2xl": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow2xl token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "radius": {
                              "type": "string",
                              "description": "The base corner radius, a CSS length. Absent when the theme does not set it.",
                              "example": "0.5rem"
                            }
                          },
                          "description": "The token values of the dark theme"
                        }
                      },
                      "description": "The portal theme: the preset, the theme mode and the light and dark token values"
                    },
                    "customCss": {
                      "type": "string",
                      "description": "Custom CSS for the portal, applied after the theme styles. Empty when none is set.",
                      "example": ".portal-header { letter-spacing: 0.01em; }"
                    },
                    "headerDisplayMode": {
                      "type": "string",
                      "description": "How the brand shows in the portal header. logo_and_name: the square logo and the display name (the default). logo_only: the square logo alone. custom_logo: the header logo (a horizontal wordmark).",
                      "example": "logo_and_name"
                    },
                    "headerDisplayName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The name shown next to the logo in logo_and_name mode. Null: the workspace name.",
                      "example": "Acme Feedback"
                    }
                  },
                  "required": [
                    "theme",
                    "customCss",
                    "headerDisplayMode",
                    "headerDisplayName"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateQuillsBrandingSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Update the branding settings",
        "description": "Changes only the fields that the body sends; fields left out keep their value. The body must name at least one field. Requires the `manage_settings` permission. Records a `settings.branding_updated` event. When a field that undo restores changed, the response's receiptId undoes this change with POST /settings/receipts/{receiptId}/undo.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "theme": {
                    "type": "object",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "maxLength": 64,
                        "description": "The name of the theme preset that the theme was built from. Absent when none is recorded.",
                        "example": "default"
                      },
                      "themeMode": {
                        "type": "string",
                        "enum": [
                          "light",
                          "dark",
                          "user"
                        ],
                        "description": "light or dark: the portal always uses that theme. user: it follows the visitor's preference. Absent: user.",
                        "example": "user"
                      },
                      "light": {
                        "type": "object",
                        "properties": {
                          "background": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the background token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "foreground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the foreground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "card": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the card token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "cardForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the cardForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "popover": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the popover token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "popoverForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the popoverForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "primary": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the primary token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "primaryForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the primaryForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "secondary": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the secondary token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "secondaryForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the secondaryForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "muted": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the muted token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "mutedForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the mutedForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "accent": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the accent token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "accentForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the accentForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "accentInk": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the accentInk token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "destructive": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the destructive token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "destructiveForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the destructiveForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "border": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the border token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "input": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the input token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "ring": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the ring token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "success": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the success token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarBackground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarBackground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarPrimary": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarPrimary token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarPrimaryForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarPrimaryForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarAccent": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarAccent token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarAccentForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarAccentForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarBorder": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarBorder token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarRing": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarRing token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "chart1": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the chart1 token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "chart2": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the chart2 token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "chart3": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the chart3 token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "chart4": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the chart4 token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "chart5": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the chart5 token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "fontSans": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS font-family list of the sans-serif font. Absent when the theme does not set it.",
                            "example": "Inter, sans-serif"
                          },
                          "shadow2xs": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadow2xs token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadowXs": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadowXs token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadowSm": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadowSm token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadow": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadow token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadowMd": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadowMd token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadowLg": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadowLg token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadowXl": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadowXl token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadow2xl": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadow2xl token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "radius": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The base corner radius, a CSS length. Absent when the theme does not set it.",
                            "example": "0.5rem"
                          }
                        },
                        "description": "The token values of the light theme"
                      },
                      "dark": {
                        "type": "object",
                        "properties": {
                          "background": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the background token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "foreground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the foreground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "card": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the card token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "cardForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the cardForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "popover": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the popover token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "popoverForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the popoverForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "primary": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the primary token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "primaryForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the primaryForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "secondary": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the secondary token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "secondaryForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the secondaryForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "muted": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the muted token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "mutedForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the mutedForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "accent": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the accent token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "accentForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the accentForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "accentInk": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the accentInk token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "destructive": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the destructive token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "destructiveForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the destructiveForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "border": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the border token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "input": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the input token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "ring": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the ring token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "success": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the success token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarBackground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarBackground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarPrimary": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarPrimary token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarPrimaryForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarPrimaryForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarAccent": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarAccent token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarAccentForeground": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarAccentForeground token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarBorder": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarBorder token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "sidebarRing": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the sidebarRing token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "chart1": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the chart1 token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "chart2": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the chart2 token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "chart3": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the chart3 token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "chart4": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the chart4 token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "chart5": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS color of the chart5 token. Absent when the theme does not set it.",
                            "example": "#4f46e5"
                          },
                          "fontSans": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS font-family list of the sans-serif font. Absent when the theme does not set it.",
                            "example": "Inter, sans-serif"
                          },
                          "shadow2xs": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadow2xs token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadowXs": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadowXs token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadowSm": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadowSm token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadow": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadow token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadowMd": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadowMd token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadowLg": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadowLg token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadowXl": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadowXl token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "shadow2xl": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The CSS box-shadow of the shadow2xl token. Absent when the theme does not set it.",
                            "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                          },
                          "radius": {
                            "type": "string",
                            "maxLength": 300,
                            "pattern": "^[^;{}<>]*$",
                            "description": "The base corner radius, a CSS length. Absent when the theme does not set it.",
                            "example": "0.5rem"
                          }
                        },
                        "description": "The token values of the dark theme"
                      }
                    },
                    "description": "The new theme. Replaces the stored theme whole: tokens left out are cleared, not kept. A token value cannot contain ; { } < or >."
                  },
                  "customCss": {
                    "type": "string",
                    "maxLength": 51200,
                    "description": "Custom CSS for the portal, applied after the theme styles. An empty string removes it.",
                    "example": ".portal-header { letter-spacing: 0.01em; }"
                  },
                  "headerDisplayMode": {
                    "type": "string",
                    "enum": [
                      "logo_and_name",
                      "logo_only",
                      "custom_logo"
                    ],
                    "description": "How the brand shows in the portal header. logo_and_name: the square logo and the display name. logo_only: the square logo alone. custom_logo: the header logo (a horizontal wordmark), set with PUT /settings/header-logo.",
                    "example": "logo_and_name"
                  },
                  "headerDisplayName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100,
                    "description": "The name shown next to the logo in logo_and_name mode. Null or an empty string clears it, so the workspace name shows.",
                    "example": "Acme Feedback"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The branding settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "theme": {
                      "type": "object",
                      "properties": {
                        "preset": {
                          "type": "string",
                          "description": "The name of the theme preset that the theme was built from. Absent when none is recorded.",
                          "example": "default"
                        },
                        "themeMode": {
                          "type": "string",
                          "enum": [
                            "light",
                            "dark",
                            "user"
                          ],
                          "description": "light or dark: the portal always uses that theme. user: it follows the visitor's preference. Absent: user.",
                          "example": "user"
                        },
                        "light": {
                          "type": "object",
                          "properties": {
                            "background": {
                              "type": "string",
                              "description": "The CSS color of the background token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "foreground": {
                              "type": "string",
                              "description": "The CSS color of the foreground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "card": {
                              "type": "string",
                              "description": "The CSS color of the card token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "cardForeground": {
                              "type": "string",
                              "description": "The CSS color of the cardForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "popover": {
                              "type": "string",
                              "description": "The CSS color of the popover token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "popoverForeground": {
                              "type": "string",
                              "description": "The CSS color of the popoverForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "primary": {
                              "type": "string",
                              "description": "The CSS color of the primary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "primaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the primaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "secondary": {
                              "type": "string",
                              "description": "The CSS color of the secondary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "secondaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the secondaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "muted": {
                              "type": "string",
                              "description": "The CSS color of the muted token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "mutedForeground": {
                              "type": "string",
                              "description": "The CSS color of the mutedForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accent": {
                              "type": "string",
                              "description": "The CSS color of the accent token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accentForeground": {
                              "type": "string",
                              "description": "The CSS color of the accentForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accentInk": {
                              "type": "string",
                              "description": "The CSS color of the accentInk token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "destructive": {
                              "type": "string",
                              "description": "The CSS color of the destructive token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "destructiveForeground": {
                              "type": "string",
                              "description": "The CSS color of the destructiveForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "border": {
                              "type": "string",
                              "description": "The CSS color of the border token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "input": {
                              "type": "string",
                              "description": "The CSS color of the input token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "ring": {
                              "type": "string",
                              "description": "The CSS color of the ring token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "success": {
                              "type": "string",
                              "description": "The CSS color of the success token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarBackground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarBackground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarPrimary": {
                              "type": "string",
                              "description": "The CSS color of the sidebarPrimary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarPrimaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarPrimaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarAccent": {
                              "type": "string",
                              "description": "The CSS color of the sidebarAccent token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarAccentForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarAccentForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarBorder": {
                              "type": "string",
                              "description": "The CSS color of the sidebarBorder token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarRing": {
                              "type": "string",
                              "description": "The CSS color of the sidebarRing token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart1": {
                              "type": "string",
                              "description": "The CSS color of the chart1 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart2": {
                              "type": "string",
                              "description": "The CSS color of the chart2 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart3": {
                              "type": "string",
                              "description": "The CSS color of the chart3 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart4": {
                              "type": "string",
                              "description": "The CSS color of the chart4 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart5": {
                              "type": "string",
                              "description": "The CSS color of the chart5 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "fontSans": {
                              "type": "string",
                              "description": "The CSS font-family list of the sans-serif font. Absent when the theme does not set it.",
                              "example": "Inter, sans-serif"
                            },
                            "shadow2xs": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow2xs token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowXs": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowXs token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowSm": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowSm token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadow": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowMd": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowMd token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowLg": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowLg token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowXl": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowXl token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadow2xl": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow2xl token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "radius": {
                              "type": "string",
                              "description": "The base corner radius, a CSS length. Absent when the theme does not set it.",
                              "example": "0.5rem"
                            }
                          },
                          "description": "The token values of the light theme"
                        },
                        "dark": {
                          "type": "object",
                          "properties": {
                            "background": {
                              "type": "string",
                              "description": "The CSS color of the background token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "foreground": {
                              "type": "string",
                              "description": "The CSS color of the foreground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "card": {
                              "type": "string",
                              "description": "The CSS color of the card token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "cardForeground": {
                              "type": "string",
                              "description": "The CSS color of the cardForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "popover": {
                              "type": "string",
                              "description": "The CSS color of the popover token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "popoverForeground": {
                              "type": "string",
                              "description": "The CSS color of the popoverForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "primary": {
                              "type": "string",
                              "description": "The CSS color of the primary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "primaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the primaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "secondary": {
                              "type": "string",
                              "description": "The CSS color of the secondary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "secondaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the secondaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "muted": {
                              "type": "string",
                              "description": "The CSS color of the muted token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "mutedForeground": {
                              "type": "string",
                              "description": "The CSS color of the mutedForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accent": {
                              "type": "string",
                              "description": "The CSS color of the accent token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accentForeground": {
                              "type": "string",
                              "description": "The CSS color of the accentForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "accentInk": {
                              "type": "string",
                              "description": "The CSS color of the accentInk token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "destructive": {
                              "type": "string",
                              "description": "The CSS color of the destructive token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "destructiveForeground": {
                              "type": "string",
                              "description": "The CSS color of the destructiveForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "border": {
                              "type": "string",
                              "description": "The CSS color of the border token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "input": {
                              "type": "string",
                              "description": "The CSS color of the input token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "ring": {
                              "type": "string",
                              "description": "The CSS color of the ring token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "success": {
                              "type": "string",
                              "description": "The CSS color of the success token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarBackground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarBackground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarPrimary": {
                              "type": "string",
                              "description": "The CSS color of the sidebarPrimary token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarPrimaryForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarPrimaryForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarAccent": {
                              "type": "string",
                              "description": "The CSS color of the sidebarAccent token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarAccentForeground": {
                              "type": "string",
                              "description": "The CSS color of the sidebarAccentForeground token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarBorder": {
                              "type": "string",
                              "description": "The CSS color of the sidebarBorder token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "sidebarRing": {
                              "type": "string",
                              "description": "The CSS color of the sidebarRing token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart1": {
                              "type": "string",
                              "description": "The CSS color of the chart1 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart2": {
                              "type": "string",
                              "description": "The CSS color of the chart2 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart3": {
                              "type": "string",
                              "description": "The CSS color of the chart3 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart4": {
                              "type": "string",
                              "description": "The CSS color of the chart4 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "chart5": {
                              "type": "string",
                              "description": "The CSS color of the chart5 token. Absent when the theme does not set it.",
                              "example": "#4f46e5"
                            },
                            "fontSans": {
                              "type": "string",
                              "description": "The CSS font-family list of the sans-serif font. Absent when the theme does not set it.",
                              "example": "Inter, sans-serif"
                            },
                            "shadow2xs": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow2xs token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowXs": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowXs token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowSm": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowSm token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadow": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowMd": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowMd token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowLg": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowLg token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadowXl": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadowXl token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "shadow2xl": {
                              "type": "string",
                              "description": "The CSS box-shadow of the shadow2xl token. Absent when the theme does not set it.",
                              "example": "0 1px 2px 0 rgb(0 0 0 / 0.05)"
                            },
                            "radius": {
                              "type": "string",
                              "description": "The base corner radius, a CSS length. Absent when the theme does not set it.",
                              "example": "0.5rem"
                            }
                          },
                          "description": "The token values of the dark theme"
                        }
                      },
                      "description": "The portal theme: the preset, the theme mode and the light and dark token values"
                    },
                    "customCss": {
                      "type": "string",
                      "description": "Custom CSS for the portal, applied after the theme styles. Empty when none is set.",
                      "example": ".portal-header { letter-spacing: 0.01em; }"
                    },
                    "headerDisplayMode": {
                      "type": "string",
                      "description": "How the brand shows in the portal header. logo_and_name: the square logo and the display name (the default). logo_only: the square logo alone. custom_logo: the header logo (a horizontal wordmark).",
                      "example": "logo_and_name"
                    },
                    "headerDisplayName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The name shown next to the logo in logo_and_name mode. Null: the workspace name.",
                      "example": "Acme Feedback"
                    },
                    "receiptId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The receipt of this change, for POST /settings/receipts/{receiptId}/undo. Null when no field that undo restores changed, or when the change is too large to keep for undo.",
                      "example": "audit_01m8rxxee8esga9vd9jq97tmqv"
                    }
                  },
                  "required": [
                    "theme",
                    "customCss",
                    "headerDisplayMode",
                    "headerDisplayName",
                    "receiptId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/brands": {
      "get": {
        "operationId": "listQuillsBrands",
        "tags": [
          "Settings and domains"
        ],
        "summary": "List the workspace's email brands",
        "description": "Lists the brands that branded emails can use, oldest first, at most 20. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace brands",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brands": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsBrand"
                      },
                      "description": "The brands, oldest first"
                    }
                  },
                  "required": [
                    "brands"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsBrand",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Create an email brand",
        "description": "Creates a brand with its own colors, logos and sender for branded emails. A workspace has at most 20 brands. The first brand is always the default; a new default brand takes the default from the others. The logo keys must name images uploaded to this workspace, and the domain of fromEmail must be a verified sending domain (400 otherwise). Requires the `manage_settings` permission. Records a `brand.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "The brand's display name. Branded emails use it as the default heading and the logo's alt text, and as the sender name when fromName is null.",
                    "example": "Acme Support"
                  },
                  "slug": {
                    "type": "string",
                    "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
                    "description": "The brand's URL-safe identifier: lowercase letters, digits and hyphens, unique in the workspace. Lowercased before it is checked.",
                    "example": "acme-support"
                  },
                  "isDefault": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the brand becomes the workspace's default, taking the default from the others",
                    "example": false
                  },
                  "primaryColor": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$",
                    "default": "#4f46e5",
                    "description": "The #rrggbb color of buttons in branded emails",
                    "example": "#4f46e5"
                  },
                  "accentColor": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$",
                    "default": "#111827",
                    "description": "The #rrggbb color of headings in branded emails",
                    "example": "#111827"
                  },
                  "logoKey": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "The storage key of the logo, an image uploaded to this workspace. Null: no logo."
                  },
                  "darkLogoKey": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "The storage key of the logo for dark mode, an image uploaded to this workspace. Null: the light logo only.",
                    "example": null
                  },
                  "fromName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120,
                    "description": "The sender name of the brand's emails. Null: the brand name.",
                    "example": "Acme Support"
                  },
                  "fromEmail": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 320,
                    "format": "email",
                    "description": "The sender address of the brand's emails; its domain must be a verified sending domain. Null: the instance's default sender.",
                    "example": "support@example.com"
                  },
                  "replyTo": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 320,
                    "format": "email",
                    "description": "The Reply-To address of the brand's emails. Null: none.",
                    "example": "help@example.com"
                  },
                  "footerText": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "Text in the footer of the brand's emails. Null: none.",
                    "example": "Acme Inc., 1 Example Street, Springfield"
                  },
                  "hidePoweredBy": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the brand's emails leave out the \"Powered by\" footer line",
                    "example": false
                  }
                },
                "required": [
                  "name",
                  "slug"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created brand",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brand": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsBrand"
                        },
                        {
                          "description": "The created brand"
                        }
                      ]
                    }
                  },
                  "required": [
                    "brand"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the permission, or the API key lacks the scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No brand of this workspace has the given ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another brand has this slug, the workspace has 20 brands, or another default brand was saved at the same time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/brands/{brandId}": {
      "patch": {
        "operationId": "updateQuillsBrand",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Update an email brand",
        "description": "Changes only the fields that the body sends; send at least one. The slug cannot change. isDefault true takes the default from the other brands. The logo keys must name images uploaded to this workspace, and the domain of fromEmail must be a verified sending domain (400 otherwise). Requires the `manage_settings` permission. Records a `brand.updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The brand's ID",
              "example": "brand_01m8rxxee8esga9vdmcy42kw02"
            },
            "required": true,
            "description": "The brand's ID",
            "name": "brandId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "The brand's display name. Branded emails use it as the default heading and the logo's alt text, and as the sender name when fromName is null.",
                    "example": "Acme Support"
                  },
                  "isDefault": {
                    "type": "boolean",
                    "description": "true makes the brand the workspace's default, taking the default from the others",
                    "example": true
                  },
                  "primaryColor": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$",
                    "description": "The #rrggbb color of buttons in branded emails",
                    "example": "#4f46e5"
                  },
                  "accentColor": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$",
                    "description": "The #rrggbb color of headings in branded emails",
                    "example": "#111827"
                  },
                  "logoKey": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "The storage key of the logo, an image uploaded to this workspace. Null: no logo. Send null to remove it."
                  },
                  "darkLogoKey": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "The storage key of the logo for dark mode, an image uploaded to this workspace. Null: the light logo only. Send null to remove it.",
                    "example": null
                  },
                  "fromName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120,
                    "description": "The sender name of the brand's emails. Null: the brand name.",
                    "example": "Acme Support"
                  },
                  "fromEmail": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 320,
                    "format": "email",
                    "description": "The sender address of the brand's emails; its domain must be a verified sending domain. Null: the instance's default sender.",
                    "example": "support@example.com"
                  },
                  "replyTo": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 320,
                    "format": "email",
                    "description": "The Reply-To address of the brand's emails. Null: none.",
                    "example": "help@example.com"
                  },
                  "footerText": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "Text in the footer of the brand's emails. Null: none.",
                    "example": "Acme Inc., 1 Example Street, Springfield"
                  },
                  "hidePoweredBy": {
                    "type": "boolean",
                    "description": "Whether the brand's emails leave out the \"Powered by\" footer line",
                    "example": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated brand",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brand": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsBrand"
                        },
                        {
                          "description": "The updated brand"
                        }
                      ]
                    }
                  },
                  "required": [
                    "brand"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the permission, or the API key lacks the scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No brand of this workspace has the given ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsBrand",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Delete an email brand",
        "description": "Deletes the brand. Requires the `manage_settings` permission. Records a `brand.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The brand's ID",
              "example": "brand_01m8rxxee8esga9vdmcy42kw02"
            },
            "required": true,
            "description": "The brand's ID",
            "name": "brandId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Brand deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "description": "Always true: the brand was deleted",
                      "example": true
                    }
                  },
                  "required": [
                    "deleted"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the permission, or the API key lacks the scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No brand of this workspace has the given ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/brands/{brandId}/email-templates": {
      "get": {
        "operationId": "listQuillsEmailTemplates",
        "tags": [
          "Settings and domains"
        ],
        "summary": "List a brand's email templates",
        "description": "Lists the brand's email templates, ordered by template key, then locale. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The brand's ID",
              "example": "brand_01m8rxxee8esga9vdmcy42kw02"
            },
            "required": true,
            "description": "The brand's ID",
            "name": "brandId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Brand email templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "templates": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsEmailTemplate"
                      },
                      "description": "The brand's templates, by template key, then locale"
                    }
                  },
                  "required": [
                    "templates"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the permission, or the API key lacks the scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No brand of this workspace has the given ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/brands/{brandId}/email-templates/{templateKey}": {
      "put": {
        "operationId": "upsertQuillsEmailTemplate",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Create or replace a brand's email template",
        "description": "Saves the template for the brand, key and locale: creates it, or replaces the subject, mode, blocks and HTML of the existing one. Idempotent. Requires the `manage_settings` permission. Records an `email_template.updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The brand's ID",
              "example": "brand_01m8rxxee8esga9vdmcy42kw02"
            },
            "required": true,
            "description": "The brand's ID",
            "name": "brandId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80,
              "pattern": "^[a-z0-9._-]+$",
              "description": "The template's key: lowercase letters, digits, dots, underscores and hyphens. One template exists per brand, key and locale.",
              "example": "ticket.reply"
            },
            "required": true,
            "description": "The template's key: lowercase letters, digits, dots, underscores and hyphens. One template exists per brand, key and locale.",
            "name": "templateKey",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locale": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 16,
                    "default": "en",
                    "description": "The template's language tag",
                    "example": "en"
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "The subject line. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                    "example": "We replied to your request"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "blocks",
                      "html"
                    ],
                    "default": "blocks",
                    "description": "blocks: the email is built from blocksJson. html: the email body is htmlBody, cleaned against an allowlist of tags and attributes.",
                    "example": "blocks"
                  },
                  "blocksJson": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "A client-chosen ID of the block, unique in the template",
                          "example": "intro"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "header",
                            "text",
                            "button",
                            "divider",
                            "footer"
                          ],
                          "description": "The block kind. header: a heading under the brand logo (content defaults to the brand name). text: a paragraph; line breaks are kept. button: a link button in the primary color. divider: a horizontal rule. footer: small print.",
                          "example": "text"
                        },
                        "content": {
                          "type": "string",
                          "maxLength": 5000,
                          "description": "The text of a header, text or footer block. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                          "example": "Hi {{name}}, we replied to your request."
                        },
                        "label": {
                          "type": "string",
                          "maxLength": 120,
                          "description": "The label of a button block. Absent: Open. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                          "example": "View the reply"
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2048,
                          "description": "The link of a button block. Placeholders are replaced first; a link that is not http, https or mailto renders as #.",
                          "example": "https://help.example.com/requests/{{ticketNumber}}"
                        },
                        "align": {
                          "type": "string",
                          "enum": [
                            "left",
                            "center",
                            "right"
                          ],
                          "description": "The block's alignment. Absent: left. Dividers ignore it.",
                          "example": "left"
                        }
                      },
                      "required": [
                        "id",
                        "type"
                      ]
                    },
                    "maxItems": 40,
                    "default": [],
                    "description": "The blocks of a blocks-mode template, in order"
                  },
                  "htmlBody": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100000,
                    "description": "The HTML body in html mode. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty. Absent or null: none.",
                    "example": "<p>Hi {{name}},</p><p>We replied to your request.</p>"
                  }
                },
                "required": [
                  "subject"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved email template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "template": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsEmailTemplate"
                        },
                        {
                          "description": "The saved template"
                        }
                      ]
                    }
                  },
                  "required": [
                    "template"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the permission, or the API key lacks the scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No brand of this workspace has the given ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/email-templates/preview": {
      "post": {
        "operationId": "previewQuillsEmailTemplate",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Preview a branded email",
        "description": "Renders a subject and body with a brand's style and returns the result; nothing is saved or sent. It uses the same renderer as branded emails, so the preview HTML matches what POST /settings/email-templates/send-test sends. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "brandId": {
                    "type": "string",
                    "description": "A stored brand to render with. When set, `brand` is ignored, and a test email also uses the brand's sender.",
                    "example": "brand_01m8rxxee8esga9vdmcy42kw02"
                  },
                  "brand": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "description": "The brand name",
                        "example": "Acme Support"
                      },
                      "primaryColor": {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{6}$",
                        "description": "The #rrggbb color of buttons in branded emails. Absent: #4f46e5.",
                        "example": "#4f46e5"
                      },
                      "accentColor": {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{6}$",
                        "description": "The #rrggbb color of headings in branded emails. Absent: #111827.",
                        "example": "#111827"
                      },
                      "logoUrl": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 2048,
                        "description": "An http(s) URL of the logo. Other URLs are left out of the email.",
                        "example": "https://cdn.example.com/logo.png"
                      },
                      "darkLogoUrl": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 2048,
                        "description": "An http(s) URL of the logo for dark mode. Other URLs are left out of the email.",
                        "example": null
                      },
                      "footerText": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 500,
                        "description": "Text in the email footer",
                        "example": "Acme Inc., 1 Example Street, Springfield"
                      },
                      "hidePoweredBy": {
                        "type": "boolean",
                        "description": "Whether the email leaves out the \"Powered by\" footer line",
                        "example": false
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "description": "An unsaved brand style to render with when brandId is absent. Without both, the brand name is Support and the default colors apply."
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "The subject line. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                    "example": "We replied to your request"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "blocks",
                      "html"
                    ],
                    "default": "blocks",
                    "description": "blocks: the email is built from blocksJson. html: the email body is htmlBody, cleaned against an allowlist of tags and attributes.",
                    "example": "blocks"
                  },
                  "blocksJson": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "A client-chosen ID of the block, unique in the template",
                          "example": "intro"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "header",
                            "text",
                            "button",
                            "divider",
                            "footer"
                          ],
                          "description": "The block kind. header: a heading under the brand logo (content defaults to the brand name). text: a paragraph; line breaks are kept. button: a link button in the primary color. divider: a horizontal rule. footer: small print.",
                          "example": "text"
                        },
                        "content": {
                          "type": "string",
                          "maxLength": 5000,
                          "description": "The text of a header, text or footer block. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                          "example": "Hi {{name}}, we replied to your request."
                        },
                        "label": {
                          "type": "string",
                          "maxLength": 120,
                          "description": "The label of a button block. Absent: Open. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                          "example": "View the reply"
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2048,
                          "description": "The link of a button block. Placeholders are replaced first; a link that is not http, https or mailto renders as #.",
                          "example": "https://help.example.com/requests/{{ticketNumber}}"
                        },
                        "align": {
                          "type": "string",
                          "enum": [
                            "left",
                            "center",
                            "right"
                          ],
                          "description": "The block's alignment. Absent: left. Dividers ignore it.",
                          "example": "left"
                        }
                      },
                      "required": [
                        "id",
                        "type"
                      ]
                    },
                    "maxItems": 40,
                    "default": [],
                    "description": "The blocks to render in blocks mode, in order"
                  },
                  "htmlBody": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100000,
                    "description": "The HTML body to render in html mode. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                    "example": "<p>Hi {{name}},</p><p>We replied to your request.</p>"
                  },
                  "variables": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 1000
                    },
                    "default": {},
                    "description": "The values of the {{key}} placeholders, by key. At most 100 entries.",
                    "example": {
                      "name": "Jane",
                      "ticketNumber": "1042"
                    }
                  }
                },
                "required": [
                  "subject"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rendered email subject, HTML, and plain text",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subject": {
                      "type": "string",
                      "description": "The rendered subject: placeholders replaced, line breaks removed, at most 500 characters",
                      "example": "We replied to your request"
                    },
                    "html": {
                      "type": "string",
                      "description": "The complete HTML document of the email",
                      "example": "<!doctype html><html>…</html>"
                    },
                    "text": {
                      "type": "string",
                      "description": "The plain-text version of the email",
                      "example": "Hi Jane, we replied to your request."
                    }
                  },
                  "required": [
                    "subject",
                    "html",
                    "text"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the permission, or the API key lacks the scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No brand of this workspace has the given ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/email-templates/send-test": {
      "post": {
        "operationId": "sendQuillsTestEmail",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Send a branded test email",
        "description": "Renders the email as the preview route does and sends it to one address, from the brand's sender (fromEmail, fromName, replyTo) when brandId is set, else from the instance's default sender. Limited to 10 sends per hour per workspace. Without a configured email provider nothing is sent and sent is false. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "brandId": {
                    "type": "string",
                    "description": "A stored brand to render with. When set, `brand` is ignored, and a test email also uses the brand's sender.",
                    "example": "brand_01m8rxxee8esga9vdmcy42kw02"
                  },
                  "brand": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "description": "The brand name",
                        "example": "Acme Support"
                      },
                      "primaryColor": {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{6}$",
                        "description": "The #rrggbb color of buttons in branded emails. Absent: #4f46e5.",
                        "example": "#4f46e5"
                      },
                      "accentColor": {
                        "type": "string",
                        "pattern": "^#[0-9a-fA-F]{6}$",
                        "description": "The #rrggbb color of headings in branded emails. Absent: #111827.",
                        "example": "#111827"
                      },
                      "logoUrl": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 2048,
                        "description": "An http(s) URL of the logo. Other URLs are left out of the email.",
                        "example": "https://cdn.example.com/logo.png"
                      },
                      "darkLogoUrl": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 2048,
                        "description": "An http(s) URL of the logo for dark mode. Other URLs are left out of the email.",
                        "example": null
                      },
                      "footerText": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 500,
                        "description": "Text in the email footer",
                        "example": "Acme Inc., 1 Example Street, Springfield"
                      },
                      "hidePoweredBy": {
                        "type": "boolean",
                        "description": "Whether the email leaves out the \"Powered by\" footer line",
                        "example": false
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "description": "An unsaved brand style to render with when brandId is absent. Without both, the brand name is Support and the default colors apply."
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "The subject line. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                    "example": "We replied to your request"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "blocks",
                      "html"
                    ],
                    "default": "blocks",
                    "description": "blocks: the email is built from blocksJson. html: the email body is htmlBody, cleaned against an allowlist of tags and attributes.",
                    "example": "blocks"
                  },
                  "blocksJson": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "A client-chosen ID of the block, unique in the template",
                          "example": "intro"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "header",
                            "text",
                            "button",
                            "divider",
                            "footer"
                          ],
                          "description": "The block kind. header: a heading under the brand logo (content defaults to the brand name). text: a paragraph; line breaks are kept. button: a link button in the primary color. divider: a horizontal rule. footer: small print.",
                          "example": "text"
                        },
                        "content": {
                          "type": "string",
                          "maxLength": 5000,
                          "description": "The text of a header, text or footer block. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                          "example": "Hi {{name}}, we replied to your request."
                        },
                        "label": {
                          "type": "string",
                          "maxLength": 120,
                          "description": "The label of a button block. Absent: Open. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                          "example": "View the reply"
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2048,
                          "description": "The link of a button block. Placeholders are replaced first; a link that is not http, https or mailto renders as #.",
                          "example": "https://help.example.com/requests/{{ticketNumber}}"
                        },
                        "align": {
                          "type": "string",
                          "enum": [
                            "left",
                            "center",
                            "right"
                          ],
                          "description": "The block's alignment. Absent: left. Dividers ignore it.",
                          "example": "left"
                        }
                      },
                      "required": [
                        "id",
                        "type"
                      ]
                    },
                    "maxItems": 40,
                    "default": [],
                    "description": "The blocks to render in blocks mode, in order"
                  },
                  "htmlBody": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 100000,
                    "description": "The HTML body to render in html mode. {{key}} placeholders are replaced with the matching variable, HTML-escaped; an unknown key becomes empty.",
                    "example": "<p>Hi {{name}},</p><p>We replied to your request.</p>"
                  },
                  "variables": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 1000
                    },
                    "default": {},
                    "description": "The values of the {{key}} placeholders, by key. At most 100 entries.",
                    "example": {
                      "name": "Jane",
                      "ticketNumber": "1042"
                    }
                  },
                  "to": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "description": "The address that receives the test email",
                    "example": "jane@example.com"
                  }
                },
                "required": [
                  "subject",
                  "to"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Test email dispatch outcome and exact rendered HTML",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sent": {
                      "type": "boolean",
                      "description": "Whether the email provider accepted the email",
                      "example": true
                    },
                    "reason": {
                      "type": "string",
                      "description": "Why the email was not sent, for example no_provider when no email provider is configured. Absent when it was sent.",
                      "example": "no_provider"
                    },
                    "subject": {
                      "type": "string",
                      "description": "The rendered subject",
                      "example": "We replied to your request"
                    },
                    "html": {
                      "type": "string",
                      "description": "The complete HTML document that was sent",
                      "example": "<!doctype html><html>…</html>"
                    }
                  },
                  "required": [
                    "sent",
                    "subject",
                    "html"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the permission, or the API key lacks the scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No brand of this workspace has the given ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "The workspace already sent 10 test emails in the last hour",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/widget": {
      "get": {
        "operationId": "getQuillsWidgetSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the widget settings",
        "description": "Returns the workspace's widget settings, with the default filled in for each value that was never saved. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The widget settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the widget shows on the sites that load it. On until a teammate turns it off.",
                      "example": true
                    },
                    "defaultBoard": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The stored default board of the widget's feedback views. Null when none is set.",
                      "example": "bugs"
                    },
                    "position": {
                      "type": "string",
                      "description": "Where the launcher button shows on the page: bottom-right (the default) or bottom-left",
                      "example": "bottom-right"
                    },
                    "launcherGreeting": {
                      "type": "string",
                      "description": "The greeting next to the launcher. Empty when none is set.",
                      "example": "Questions? We're here."
                    },
                    "launcherLabel": {
                      "type": "string",
                      "description": "The launcher button's label. Empty when none is set.",
                      "example": "Feedback"
                    },
                    "replyTime": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "minutes",
                        "hours",
                        "day",
                        null
                      ],
                      "description": "How soon the team usually replies, shown in the widget: minutes, hours or day. Null shows nothing.",
                      "example": "hours"
                    },
                    "tabs": {
                      "type": "object",
                      "properties": {
                        "feedback": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Feedback tab",
                          "example": true
                        },
                        "changelog": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Changelog tab",
                          "example": true
                        },
                        "help": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Help tab (help center articles)",
                          "example": true
                        },
                        "messenger": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Messages tab (live conversations)",
                          "example": true
                        },
                        "tickets": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Tickets tab",
                          "example": true
                        },
                        "home": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Home tab",
                          "example": true
                        }
                      },
                      "required": [
                        "feedback",
                        "changelog",
                        "help",
                        "messenger",
                        "tickets",
                        "home"
                      ],
                      "description": "The widget tabs and whether each shows. Before tabs are first saved: Feedback, Changelog, Messages, Tickets and Home show; Help does not."
                    },
                    "visitorAnalytics": {
                      "type": "boolean",
                      "description": "Whether the widget records the pages that visitors open. Default true.",
                      "example": true
                    },
                    "visitorDeviceTracking": {
                      "type": "boolean",
                      "description": "Whether the widget records each visitor's browser and device. Default true.",
                      "example": true
                    },
                    "allowedOrigins": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The site origins that may load the widget, lowercase. Empty: any origin.",
                      "example": [
                        "https://app.example.com",
                        "https://*.example.com"
                      ]
                    },
                    "antiSpam": {
                      "type": "object",
                      "properties": {
                        "rateLimits": {
                          "type": "object",
                          "properties": {
                            "conversationsPerIp10m": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 500,
                              "description": "New conversations allowed from one IP address in 10 minutes. One widget session may start at most this many, and never more than 10. Default 20.",
                              "example": 20
                            },
                            "sessionsPerIpHour": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 500,
                              "description": "New widget sessions allowed from one IP address in an hour. Default 10.",
                              "example": 10
                            },
                            "workspaceConversationsPer10m": {
                              "type": "integer",
                              "minimum": 5,
                              "maximum": 10000,
                              "description": "New conversations allowed across the workspace in 10 minutes. New sessions across the workspace are limited to six times this number in an hour. Default 200.",
                              "example": 200
                            }
                          },
                          "required": [
                            "conversationsPerIp10m",
                            "sessionsPerIpHour",
                            "workspaceConversationsPer10m"
                          ],
                          "description": "The widget's flood limits"
                        },
                        "challengeMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "adaptive",
                            "always"
                          ],
                          "description": "When a visitor must solve an anti-spam challenge to start a session or a conversation. off: never. adaptive (the default): when traffic passes 75% of the per-IP limit or 50% of the workspace limit. always: every time.",
                          "example": "adaptive"
                        },
                        "challengeProvider": {
                          "type": "string",
                          "enum": [
                            "pow",
                            "turnstile"
                          ],
                          "description": "The challenge kind. pow (the default): a proof-of-work puzzle that the browser solves, with no third-party service. turnstile: Cloudflare Turnstile.",
                          "example": "pow"
                        }
                      },
                      "required": [
                        "rateLimits",
                        "challengeMode",
                        "challengeProvider"
                      ],
                      "description": "The widget's flood limits and anti-spam challenge"
                    },
                    "home": {
                      "type": "object",
                      "properties": {
                        "greeting": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The greeting at the top of the Home tab. Null when not set.",
                          "example": "Hi there"
                        },
                        "subtitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The line under the greeting. Null when not set.",
                          "example": "Ask us anything or share your feedback."
                        },
                        "headerStyle": {
                          "type": "string",
                          "description": "The background of the Home header: plain (the default), gradient, pattern or image",
                          "example": "gradient"
                        },
                        "gradientFrom": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The header gradient's start color (#rrggbb). Null or empty when not set.",
                          "example": "#4f46e5"
                        },
                        "gradientTo": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The header gradient's end color (#rrggbb). Null or empty when not set.",
                          "example": "#9333ea"
                        },
                        "pattern": {
                          "type": "string",
                          "description": "The header pattern when headerStyle is pattern: dots, grid, mesh (the default) or waves",
                          "example": "mesh"
                        },
                        "showLogo": {
                          "type": "boolean",
                          "description": "Whether the header shows the workspace logo. Default true.",
                          "example": true
                        },
                        "showTeamAvatars": {
                          "type": "boolean",
                          "description": "Whether the header shows teammates' avatars. Default true.",
                          "example": true
                        },
                        "cards": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The card's ID",
                                "example": "card-docs"
                              },
                              "type": {
                                "type": "string",
                                "description": "The card kind: feedback (share feedback), new_conversation (start a conversation), article_search (search help articles), latest_updates (recent changelog entries) or link (a custom link; needs url)",
                                "example": "link"
                              },
                              "enabled": {
                                "type": "boolean",
                                "description": "Whether the card shows",
                                "example": true
                              },
                              "audience": {
                                "type": "string",
                                "description": "Who sees the card: everyone, anonymous (visitors that the host app did not identify) or identified (visitors that it identified)",
                                "example": "everyone"
                              },
                              "title": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The card title. Null when not set.",
                                "example": "Read the docs"
                              },
                              "subtitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The line under the title. Null when not set.",
                                "example": "Guides and API reference"
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The URL that a link card opens. Null for other kinds.",
                                "example": "https://docs.example.com"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "enabled",
                              "audience",
                              "title",
                              "subtitle",
                              "url"
                            ]
                          },
                          "description": "The Home cards, in display order"
                        }
                      },
                      "required": [
                        "greeting",
                        "subtitle",
                        "headerStyle",
                        "gradientFrom",
                        "gradientTo",
                        "pattern",
                        "showLogo",
                        "showTeamAvatars",
                        "cards"
                      ],
                      "description": "The widget's Home tab"
                    }
                  },
                  "required": [
                    "enabled",
                    "defaultBoard",
                    "position",
                    "launcherGreeting",
                    "launcherLabel",
                    "replyTime",
                    "tabs",
                    "visitorAnalytics",
                    "visitorDeviceTracking",
                    "allowedOrigins",
                    "antiSpam",
                    "home"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateQuillsWidgetSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Update the widget settings",
        "description": "Changes only the fields that the body sends; fields left out keep their value. The body must name at least one field. Requires the `manage_settings` permission. Records a `settings.widget_updated` event. When a field that undo restores changed, the response's receiptId undoes this change with POST /settings/receipts/{receiptId}/undo.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Turns the widget on or off. A save that leaves the widget on creates the widget signing secret when it is missing.",
                    "example": true
                  },
                  "defaultBoard": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "The default board of the widget's feedback views",
                    "example": "bugs"
                  },
                  "position": {
                    "type": "string",
                    "enum": [
                      "bottom-right",
                      "bottom-left"
                    ],
                    "description": "Where the launcher button shows on the page",
                    "example": "bottom-right"
                  },
                  "launcherGreeting": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "The greeting next to the launcher. An empty string removes it.",
                    "example": "Questions? We're here."
                  },
                  "launcherLabel": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "The launcher button's label. An empty string removes it.",
                    "example": "Feedback"
                  },
                  "replyTime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "minutes",
                      "hours",
                      "day",
                      null
                    ],
                    "description": "How soon the team usually replies: minutes, hours or day. Null hides the reply-time line.",
                    "example": "hours"
                  },
                  "visitorAnalytics": {
                    "type": "boolean",
                    "description": "Whether the widget records the pages that visitors open",
                    "example": true
                  },
                  "visitorDeviceTracking": {
                    "type": "boolean",
                    "description": "Whether the widget records each visitor's browser and device",
                    "example": true
                  },
                  "allowedOrigins": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 253,
                      "description": "An http(s) origin, or a wildcard origin for every subdomain, with no path",
                      "example": "https://*.example.com"
                    },
                    "maxItems": 50,
                    "description": "The site origins that may load the widget. Replaces the stored list; entries are lowercased and duplicates dropped. An empty list allows any origin.",
                    "example": [
                      "https://app.example.com",
                      "https://*.example.com"
                    ]
                  },
                  "antiSpam": {
                    "type": "object",
                    "properties": {
                      "rateLimits": {
                        "type": "object",
                        "properties": {
                          "conversationsPerIp10m": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 500,
                            "description": "New conversations allowed from one IP address in 10 minutes. One widget session may start at most this many, and never more than 10. Default 20.",
                            "example": 20
                          },
                          "sessionsPerIpHour": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 500,
                            "description": "New widget sessions allowed from one IP address in an hour. Default 10.",
                            "example": 10
                          },
                          "workspaceConversationsPer10m": {
                            "type": "integer",
                            "minimum": 5,
                            "maximum": 10000,
                            "description": "New conversations allowed across the workspace in 10 minutes. New sessions across the workspace are limited to six times this number in an hour. Default 200.",
                            "example": 200
                          }
                        },
                        "description": "The widget's flood limits. Merged into the stored limits: a limit left out keeps its value."
                      },
                      "challengeMode": {
                        "type": "string",
                        "enum": [
                          "off",
                          "adaptive",
                          "always"
                        ],
                        "description": "When a visitor must solve an anti-spam challenge to start a session or a conversation. off: never. adaptive (the default): when traffic passes 75% of the per-IP limit or 50% of the workspace limit. always: every time.",
                        "example": "adaptive"
                      },
                      "challengeProvider": {
                        "type": "string",
                        "enum": [
                          "pow",
                          "turnstile"
                        ],
                        "description": "The challenge kind. pow (the default): a proof-of-work puzzle that the browser solves, with no third-party service. turnstile: Cloudflare Turnstile.",
                        "example": "pow"
                      }
                    },
                    "description": "Flood limits and the anti-spam challenge. A field left out keeps its value."
                  },
                  "tabs": {
                    "type": "object",
                    "properties": {
                      "feedback": {
                        "type": "boolean",
                        "description": "Whether the widget shows the Feedback tab",
                        "example": true
                      },
                      "changelog": {
                        "type": "boolean",
                        "description": "Whether the widget shows the Changelog tab",
                        "example": true
                      },
                      "help": {
                        "type": "boolean",
                        "description": "Whether the widget shows the Help tab (help center articles)",
                        "example": true
                      },
                      "messenger": {
                        "type": "boolean",
                        "description": "Whether the widget shows the Messages tab (live conversations)",
                        "example": true
                      },
                      "tickets": {
                        "type": "boolean",
                        "description": "Whether the widget shows the Tickets tab",
                        "example": true
                      },
                      "home": {
                        "type": "boolean",
                        "description": "Whether the widget shows the Home tab",
                        "example": true
                      }
                    },
                    "description": "Tabs to show or hide. A tab left out keeps its value; the saved tabs object then names all six."
                  },
                  "home": {
                    "type": "object",
                    "properties": {
                      "greeting": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "The greeting at the top of the Home tab",
                        "example": "Hi there"
                      },
                      "subtitle": {
                        "type": "string",
                        "maxLength": 200,
                        "description": "The line under the greeting",
                        "example": "Ask us anything or share your feedback."
                      },
                      "headerStyle": {
                        "type": "string",
                        "enum": [
                          "plain",
                          "gradient",
                          "pattern",
                          "image"
                        ],
                        "description": "The background of the Home header: plain, gradient (gradient.from to gradient.to), pattern, or image (the hero image set with PUT /settings/widget/hero-image)",
                        "example": "gradient"
                      },
                      "gradient": {
                        "type": "object",
                        "properties": {
                          "from": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  ""
                                ]
                              },
                              {
                                "type": "string",
                                "pattern": "^#[0-9a-f]{6}$/i"
                              }
                            ],
                            "description": "The gradient's start color",
                            "example": "#4f46e5"
                          },
                          "to": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  ""
                                ]
                              },
                              {
                                "type": "string",
                                "pattern": "^#[0-9a-f]{6}$/i"
                              }
                            ],
                            "description": "The gradient's end color",
                            "example": "#4f46e5"
                          }
                        },
                        "description": "The header gradient colors. Merged into the stored gradient: a color left out keeps its value."
                      },
                      "pattern": {
                        "type": "string",
                        "enum": [
                          "dots",
                          "grid",
                          "mesh",
                          "waves"
                        ],
                        "description": "The header pattern when headerStyle is pattern",
                        "example": "mesh"
                      },
                      "showLogo": {
                        "type": "boolean",
                        "description": "Whether the header shows the workspace logo",
                        "example": true
                      },
                      "showTeamAvatars": {
                        "type": "boolean",
                        "description": "Whether the header shows teammates' avatars",
                        "example": true
                      },
                      "cards": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "description": "A client-chosen ID of the card, unique in the list",
                              "example": "card-docs"
                            },
                            "type": {
                              "type": "string",
                              "enum": [
                                "feedback",
                                "new_conversation",
                                "article_search",
                                "latest_updates",
                                "link"
                              ],
                              "description": "The card kind: feedback (share feedback), new_conversation (start a conversation), article_search (search help articles), latest_updates (recent changelog entries) or link (a custom link; needs url)",
                              "example": "link"
                            },
                            "enabled": {
                              "type": "boolean",
                              "description": "Whether the card shows. Absent: true.",
                              "example": true
                            },
                            "audience": {
                              "type": "string",
                              "enum": [
                                "everyone",
                                "anonymous",
                                "identified"
                              ],
                              "description": "Who sees the card: everyone, anonymous (visitors that the host app did not identify) or identified (visitors that it identified). Absent: everyone.",
                              "example": "everyone"
                            },
                            "title": {
                              "type": "string",
                              "maxLength": 80,
                              "description": "The card title",
                              "example": "Read the docs"
                            },
                            "subtitle": {
                              "type": "string",
                              "maxLength": 160,
                              "description": "The line under the title",
                              "example": "Guides and API reference"
                            },
                            "url": {
                              "type": "string",
                              "maxLength": 2000,
                              "format": "uri",
                              "description": "The http(s) URL that a link card opens. Required for link cards.",
                              "example": "https://docs.example.com"
                            }
                          },
                          "required": [
                            "id",
                            "type"
                          ]
                        },
                        "maxItems": 8,
                        "description": "The Home cards in display order. Replaces the stored list whole."
                      }
                    },
                    "description": "Home tab settings. Merged into the stored Home settings: a field left out keeps its value. The hero image has its own route."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The widget settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the widget shows on the sites that load it. On until a teammate turns it off.",
                      "example": true
                    },
                    "defaultBoard": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The stored default board of the widget's feedback views. Null when none is set.",
                      "example": "bugs"
                    },
                    "position": {
                      "type": "string",
                      "description": "Where the launcher button shows on the page: bottom-right (the default) or bottom-left",
                      "example": "bottom-right"
                    },
                    "launcherGreeting": {
                      "type": "string",
                      "description": "The greeting next to the launcher. Empty when none is set.",
                      "example": "Questions? We're here."
                    },
                    "launcherLabel": {
                      "type": "string",
                      "description": "The launcher button's label. Empty when none is set.",
                      "example": "Feedback"
                    },
                    "replyTime": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "minutes",
                        "hours",
                        "day",
                        null
                      ],
                      "description": "How soon the team usually replies, shown in the widget: minutes, hours or day. Null shows nothing.",
                      "example": "hours"
                    },
                    "tabs": {
                      "type": "object",
                      "properties": {
                        "feedback": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Feedback tab",
                          "example": true
                        },
                        "changelog": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Changelog tab",
                          "example": true
                        },
                        "help": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Help tab (help center articles)",
                          "example": true
                        },
                        "messenger": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Messages tab (live conversations)",
                          "example": true
                        },
                        "tickets": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Tickets tab",
                          "example": true
                        },
                        "home": {
                          "type": "boolean",
                          "description": "Whether the widget shows the Home tab",
                          "example": true
                        }
                      },
                      "required": [
                        "feedback",
                        "changelog",
                        "help",
                        "messenger",
                        "tickets",
                        "home"
                      ],
                      "description": "The widget tabs and whether each shows. Before tabs are first saved: Feedback, Changelog, Messages, Tickets and Home show; Help does not."
                    },
                    "visitorAnalytics": {
                      "type": "boolean",
                      "description": "Whether the widget records the pages that visitors open. Default true.",
                      "example": true
                    },
                    "visitorDeviceTracking": {
                      "type": "boolean",
                      "description": "Whether the widget records each visitor's browser and device. Default true.",
                      "example": true
                    },
                    "allowedOrigins": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The site origins that may load the widget, lowercase. Empty: any origin.",
                      "example": [
                        "https://app.example.com",
                        "https://*.example.com"
                      ]
                    },
                    "antiSpam": {
                      "type": "object",
                      "properties": {
                        "rateLimits": {
                          "type": "object",
                          "properties": {
                            "conversationsPerIp10m": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 500,
                              "description": "New conversations allowed from one IP address in 10 minutes. One widget session may start at most this many, and never more than 10. Default 20.",
                              "example": 20
                            },
                            "sessionsPerIpHour": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 500,
                              "description": "New widget sessions allowed from one IP address in an hour. Default 10.",
                              "example": 10
                            },
                            "workspaceConversationsPer10m": {
                              "type": "integer",
                              "minimum": 5,
                              "maximum": 10000,
                              "description": "New conversations allowed across the workspace in 10 minutes. New sessions across the workspace are limited to six times this number in an hour. Default 200.",
                              "example": 200
                            }
                          },
                          "required": [
                            "conversationsPerIp10m",
                            "sessionsPerIpHour",
                            "workspaceConversationsPer10m"
                          ],
                          "description": "The widget's flood limits"
                        },
                        "challengeMode": {
                          "type": "string",
                          "enum": [
                            "off",
                            "adaptive",
                            "always"
                          ],
                          "description": "When a visitor must solve an anti-spam challenge to start a session or a conversation. off: never. adaptive (the default): when traffic passes 75% of the per-IP limit or 50% of the workspace limit. always: every time.",
                          "example": "adaptive"
                        },
                        "challengeProvider": {
                          "type": "string",
                          "enum": [
                            "pow",
                            "turnstile"
                          ],
                          "description": "The challenge kind. pow (the default): a proof-of-work puzzle that the browser solves, with no third-party service. turnstile: Cloudflare Turnstile.",
                          "example": "pow"
                        }
                      },
                      "required": [
                        "rateLimits",
                        "challengeMode",
                        "challengeProvider"
                      ],
                      "description": "The widget's flood limits and anti-spam challenge"
                    },
                    "home": {
                      "type": "object",
                      "properties": {
                        "greeting": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The greeting at the top of the Home tab. Null when not set.",
                          "example": "Hi there"
                        },
                        "subtitle": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The line under the greeting. Null when not set.",
                          "example": "Ask us anything or share your feedback."
                        },
                        "headerStyle": {
                          "type": "string",
                          "description": "The background of the Home header: plain (the default), gradient, pattern or image",
                          "example": "gradient"
                        },
                        "gradientFrom": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The header gradient's start color (#rrggbb). Null or empty when not set.",
                          "example": "#4f46e5"
                        },
                        "gradientTo": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The header gradient's end color (#rrggbb). Null or empty when not set.",
                          "example": "#9333ea"
                        },
                        "pattern": {
                          "type": "string",
                          "description": "The header pattern when headerStyle is pattern: dots, grid, mesh (the default) or waves",
                          "example": "mesh"
                        },
                        "showLogo": {
                          "type": "boolean",
                          "description": "Whether the header shows the workspace logo. Default true.",
                          "example": true
                        },
                        "showTeamAvatars": {
                          "type": "boolean",
                          "description": "Whether the header shows teammates' avatars. Default true.",
                          "example": true
                        },
                        "cards": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The card's ID",
                                "example": "card-docs"
                              },
                              "type": {
                                "type": "string",
                                "description": "The card kind: feedback (share feedback), new_conversation (start a conversation), article_search (search help articles), latest_updates (recent changelog entries) or link (a custom link; needs url)",
                                "example": "link"
                              },
                              "enabled": {
                                "type": "boolean",
                                "description": "Whether the card shows",
                                "example": true
                              },
                              "audience": {
                                "type": "string",
                                "description": "Who sees the card: everyone, anonymous (visitors that the host app did not identify) or identified (visitors that it identified)",
                                "example": "everyone"
                              },
                              "title": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The card title. Null when not set.",
                                "example": "Read the docs"
                              },
                              "subtitle": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The line under the title. Null when not set.",
                                "example": "Guides and API reference"
                              },
                              "url": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The URL that a link card opens. Null for other kinds.",
                                "example": "https://docs.example.com"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "enabled",
                              "audience",
                              "title",
                              "subtitle",
                              "url"
                            ]
                          },
                          "description": "The Home cards, in display order"
                        }
                      },
                      "required": [
                        "greeting",
                        "subtitle",
                        "headerStyle",
                        "gradientFrom",
                        "gradientTo",
                        "pattern",
                        "showLogo",
                        "showTeamAvatars",
                        "cards"
                      ],
                      "description": "The widget's Home tab"
                    },
                    "receiptId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The receipt of this change, for POST /settings/receipts/{receiptId}/undo. Null when no field that undo restores changed, or when the change is too large to keep for undo.",
                      "example": "audit_01m8rxxee8esga9vd9jq97tmqv"
                    }
                  },
                  "required": [
                    "enabled",
                    "defaultBoard",
                    "position",
                    "launcherGreeting",
                    "launcherLabel",
                    "replyTime",
                    "tabs",
                    "visitorAnalytics",
                    "visitorDeviceTracking",
                    "allowedOrigins",
                    "antiSpam",
                    "home",
                    "receiptId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/widget/secret": {
      "get": {
        "operationId": "getQuillsWidgetSecret",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the widget signing secret",
        "description": "Returns the secret that the host app's server uses to sign widget identify tokens. Null until the secret is created: saving the widget settings with the widget on creates it, and POST /settings/widget/secret creates or replaces it. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The widget signing secret",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "secret": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The secret that signs the host app's widget identify tokens (ssoToken). Null until it is created.",
                      "example": "wgt_3f9c2a7d1e8b4c6a9f0e2d4b6a8c0e1f3a5b7c9d1e3f5a7b9c1d3e5f7a9b1c3d"
                    }
                  },
                  "required": [
                    "secret"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "rotateQuillsWidgetSecret",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Create or replace the widget signing secret",
        "description": "Generates a new widget signing secret and returns it. The old secret stops working at once: tokens signed with it are refused, and widget sessions that it verified end. Requires the `manage_settings` permission. Records a `settings.widget_secret_rotated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The new widget signing secret",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "secret": {
                      "type": "string",
                      "description": "The new widget signing secret",
                      "example": "wgt_3f9c2a7d1e8b4c6a9f0e2d4b6a8c0e1f3a5b7c9d1e3f5a7b9c1d3e5f7a9b1c3d"
                    }
                  },
                  "required": [
                    "secret"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/widget/install-code": {
      "post": {
        "operationId": "mintQuillsWidgetInstallCode",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Create a short-lived widget install pairing code",
        "description": "Creates a pairing code to put into an install prompt instead of the signing secret; POST /widget/install-context redeems it for the secret and setup metadata. The code is stored hashed, expires after 15 minutes and can be redeemed twice. Creates the signing secret when it is missing. Requires the `manage_settings` permission. Records a `settings.widget_install_code_minted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The pairing code",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "The pairing code. Shown only in this response.",
                      "example": "qbi_q8Xk2mZp4LrT9vWc"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the code expires, 15 minutes after it was created",
                      "example": "2026-11-30T14:20:00.000Z"
                    }
                  },
                  "required": [
                    "code",
                    "expiresAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/developer": {
      "get": {
        "operationId": "getQuillsDeveloperSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the developer settings",
        "description": "Returns the workspace's developer settings, with the default filled in for each value that was never saved. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The developer settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mcpEnabled": {
                      "type": "boolean",
                      "description": "The MCP server switch: lets MCP clients use the feedback and support data of this workspace. Default true.",
                      "example": true
                    },
                    "mcpPortalAccessEnabled": {
                      "type": "boolean",
                      "description": "The portal MCP switch: lets signed-in portal users connect an MCP client. Default false.",
                      "example": false
                    },
                    "oauthDynamicClientRegistrationEnabled": {
                      "type": "boolean",
                      "description": "The OAuth client registration switch: lets apps register themselves as OAuth clients. Default true.",
                      "example": true
                    },
                    "personalApiKeysEnabled": {
                      "type": "boolean",
                      "description": "The personal API key switch: lets people create personal API keys for this workspace. Default true.",
                      "example": true
                    }
                  },
                  "required": [
                    "mcpEnabled",
                    "mcpPortalAccessEnabled",
                    "oauthDynamicClientRegistrationEnabled",
                    "personalApiKeysEnabled"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateQuillsDeveloperSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Update the developer settings",
        "description": "Changes only the fields that the body sends; fields left out keep their value. The body must name at least one field. Requires the `manage_settings` permission. Records a `settings.developer_updated` event. When a field that undo restores changed, the response's receiptId undoes this change with POST /settings/receipts/{receiptId}/undo.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mcpEnabled": {
                    "type": "boolean",
                    "description": "The MCP server switch: lets MCP clients use the feedback and support data of this workspace. Default true.",
                    "example": true
                  },
                  "mcpPortalAccessEnabled": {
                    "type": "boolean",
                    "description": "The portal MCP switch: lets signed-in portal users connect an MCP client. Default false.",
                    "example": false
                  },
                  "oauthDynamicClientRegistrationEnabled": {
                    "type": "boolean",
                    "description": "The OAuth client registration switch: lets apps register themselves as OAuth clients. Default true.",
                    "example": true
                  },
                  "personalApiKeysEnabled": {
                    "type": "boolean",
                    "description": "The personal API key switch: lets people create personal API keys for this workspace. Default true.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The developer settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mcpEnabled": {
                      "type": "boolean",
                      "description": "The MCP server switch: lets MCP clients use the feedback and support data of this workspace. Default true.",
                      "example": true
                    },
                    "mcpPortalAccessEnabled": {
                      "type": "boolean",
                      "description": "The portal MCP switch: lets signed-in portal users connect an MCP client. Default false.",
                      "example": false
                    },
                    "oauthDynamicClientRegistrationEnabled": {
                      "type": "boolean",
                      "description": "The OAuth client registration switch: lets apps register themselves as OAuth clients. Default true.",
                      "example": true
                    },
                    "personalApiKeysEnabled": {
                      "type": "boolean",
                      "description": "The personal API key switch: lets people create personal API keys for this workspace. Default true.",
                      "example": true
                    },
                    "receiptId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The receipt of this change, for POST /settings/receipts/{receiptId}/undo. Null when no field that undo restores changed, or when the change is too large to keep for undo.",
                      "example": "audit_01m8rxxee8esga9vd9jq97tmqv"
                    }
                  },
                  "required": [
                    "mcpEnabled",
                    "mcpPortalAccessEnabled",
                    "oauthDynamicClientRegistrationEnabled",
                    "personalApiKeysEnabled",
                    "receiptId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/labs": {
      "get": {
        "operationId": "getQuillsFeatureFlagSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the feature flag settings",
        "description": "Returns the workspace's feature flag settings, with the default filled in for each value that was never saved. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The feature flag settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roadmap": {
                      "type": "boolean",
                      "description": "Whether the public roadmap is on. Default true.",
                      "example": true
                    },
                    "changelog": {
                      "type": "boolean",
                      "description": "Whether the changelog is on. Default true.",
                      "example": true
                    },
                    "helpCenter": {
                      "type": "boolean",
                      "description": "Whether the help center is on. Default false.",
                      "example": false
                    },
                    "supportInbox": {
                      "type": "boolean",
                      "description": "Whether the support inbox (customer conversations) is on. Default false.",
                      "example": false
                    },
                    "supportTickets": {
                      "type": "boolean",
                      "description": "Whether support tickets are on. Default false.",
                      "example": false
                    },
                    "statusPage": {
                      "type": "boolean",
                      "description": "Whether the status page is on. Default false.",
                      "example": false
                    },
                    "surveys": {
                      "type": "boolean",
                      "description": "Whether surveys are on. Default false.",
                      "example": false
                    },
                    "ai": {
                      "type": "boolean",
                      "description": "Whether AI features are on. Default false.",
                      "example": false
                    },
                    "feedback": {
                      "type": "boolean",
                      "description": "Whether feedback boards are on. Always true: feedback is the portal home page and cannot be turned off.",
                      "example": true
                    }
                  },
                  "required": [
                    "roadmap",
                    "changelog",
                    "helpCenter",
                    "supportInbox",
                    "supportTickets",
                    "statusPage",
                    "surveys",
                    "ai",
                    "feedback"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateQuillsFeatureFlagSettings",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Update the feature flag settings",
        "description": "Changes only the fields that the body sends; fields left out keep their value. The body must name at least one field. Requires the `manage_settings` permission. Records a `settings.labs_updated` event. When a field that undo restores changed, the response's receiptId undoes this change with POST /settings/receipts/{receiptId}/undo.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roadmap": {
                    "type": "boolean",
                    "description": "Whether the public roadmap is on. Default true.",
                    "example": true
                  },
                  "changelog": {
                    "type": "boolean",
                    "description": "Whether the changelog is on. Default true.",
                    "example": true
                  },
                  "helpCenter": {
                    "type": "boolean",
                    "description": "Whether the help center is on. Default false.",
                    "example": false
                  },
                  "supportInbox": {
                    "type": "boolean",
                    "description": "Whether the support inbox (customer conversations) is on. Default false.",
                    "example": false
                  },
                  "supportTickets": {
                    "type": "boolean",
                    "description": "Whether support tickets are on. Default false.",
                    "example": false
                  },
                  "statusPage": {
                    "type": "boolean",
                    "description": "Whether the status page is on. Default false.",
                    "example": false
                  },
                  "surveys": {
                    "type": "boolean",
                    "description": "Whether surveys are on. Default false.",
                    "example": false
                  },
                  "ai": {
                    "type": "boolean",
                    "description": "Whether AI features are on. Default false.",
                    "example": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The feature flag settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roadmap": {
                      "type": "boolean",
                      "description": "Whether the public roadmap is on. Default true.",
                      "example": true
                    },
                    "changelog": {
                      "type": "boolean",
                      "description": "Whether the changelog is on. Default true.",
                      "example": true
                    },
                    "helpCenter": {
                      "type": "boolean",
                      "description": "Whether the help center is on. Default false.",
                      "example": false
                    },
                    "supportInbox": {
                      "type": "boolean",
                      "description": "Whether the support inbox (customer conversations) is on. Default false.",
                      "example": false
                    },
                    "supportTickets": {
                      "type": "boolean",
                      "description": "Whether support tickets are on. Default false.",
                      "example": false
                    },
                    "statusPage": {
                      "type": "boolean",
                      "description": "Whether the status page is on. Default false.",
                      "example": false
                    },
                    "surveys": {
                      "type": "boolean",
                      "description": "Whether surveys are on. Default false.",
                      "example": false
                    },
                    "ai": {
                      "type": "boolean",
                      "description": "Whether AI features are on. Default false.",
                      "example": false
                    },
                    "feedback": {
                      "type": "boolean",
                      "description": "Whether feedback boards are on. Always true: feedback is the portal home page and cannot be turned off.",
                      "example": true
                    },
                    "receiptId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The receipt of this change, for POST /settings/receipts/{receiptId}/undo. Null when no field that undo restores changed, or when the change is too large to keep for undo.",
                      "example": "audit_01m8rxxee8esga9vd9jq97tmqv"
                    }
                  },
                  "required": [
                    "roadmap",
                    "changelog",
                    "helpCenter",
                    "supportInbox",
                    "supportTickets",
                    "statusPage",
                    "surveys",
                    "ai",
                    "feedback",
                    "receiptId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/preset": {
      "post": {
        "operationId": "applyQuillsWorkspacePreset",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Apply a workspace module preset",
        "description": "Sets every module switch to the preset's values and records the preset. Turning a module off hides it; no workspace data is deleted. Requires the `manage_settings` permission. Records a `settings.preset_applied` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "preset": {
                    "type": "string",
                    "enum": [
                      "solo_founder",
                      "full"
                    ],
                    "description": "solo_founder: feedback, roadmap, changelog, help center and support inbox on; tickets, status page, surveys and AI off. full: every module on.",
                    "example": "solo_founder"
                  }
                },
                "required": [
                  "preset"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Applied preset and resolved module flags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "preset": {
                      "type": "string",
                      "enum": [
                        "solo_founder",
                        "full"
                      ],
                      "description": "The applied preset",
                      "example": "solo_founder"
                    },
                    "modules": {
                      "type": "object",
                      "properties": {
                        "feedback": {
                          "type": "boolean",
                          "description": "Whether feedback boards are on. Always true.",
                          "example": true
                        },
                        "roadmap": {
                          "type": "boolean",
                          "description": "Whether the roadmap is on",
                          "example": true
                        },
                        "changelog": {
                          "type": "boolean",
                          "description": "Whether the changelog is on",
                          "example": true
                        },
                        "helpCenter": {
                          "type": "boolean",
                          "description": "Whether the help center is on",
                          "example": true
                        },
                        "supportInbox": {
                          "type": "boolean",
                          "description": "Whether the support inbox (conversations) is on",
                          "example": true
                        },
                        "supportTickets": {
                          "type": "boolean",
                          "description": "Whether support tickets are on",
                          "example": false
                        },
                        "statusPage": {
                          "type": "boolean",
                          "description": "Whether the status page is on",
                          "example": false
                        },
                        "surveys": {
                          "type": "boolean",
                          "description": "Whether surveys are on",
                          "example": false
                        },
                        "ai": {
                          "type": "boolean",
                          "description": "Whether AI features are on",
                          "example": false
                        }
                      },
                      "required": [
                        "feedback",
                        "roadmap",
                        "changelog",
                        "helpCenter",
                        "supportInbox",
                        "supportTickets",
                        "statusPage",
                        "surveys",
                        "ai"
                      ],
                      "description": "The product modules and whether each is on"
                    }
                  },
                  "required": [
                    "preset",
                    "modules"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/setup-state": {
      "get": {
        "operationId": "getQuillsSetupState",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the onboarding checklist state and active preset",
        "description": "Returns the onboarding checklist progress, the last applied preset and the module switches. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace setup state and active module flags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "preset": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "solo_founder",
                        "full",
                        null
                      ],
                      "description": "The last preset applied to the workspace. solo_founder: feedback, roadmap, changelog, help center and support inbox on; tickets, status page, surveys and AI off. full: every module on. Null when none was applied.",
                      "example": "solo_founder"
                    },
                    "completedSteps": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 30,
                      "description": "The IDs of the onboarding checklist steps marked done, chosen by the client",
                      "example": [
                        "connect-widget",
                        "invite-team"
                      ]
                    },
                    "dismissed": {
                      "type": "boolean",
                      "description": "Whether the onboarding checklist was dismissed",
                      "example": false
                    },
                    "modules": {
                      "type": "object",
                      "properties": {
                        "feedback": {
                          "type": "boolean",
                          "description": "Whether feedback boards are on. Always true.",
                          "example": true
                        },
                        "roadmap": {
                          "type": "boolean",
                          "description": "Whether the roadmap is on",
                          "example": true
                        },
                        "changelog": {
                          "type": "boolean",
                          "description": "Whether the changelog is on",
                          "example": true
                        },
                        "helpCenter": {
                          "type": "boolean",
                          "description": "Whether the help center is on",
                          "example": true
                        },
                        "supportInbox": {
                          "type": "boolean",
                          "description": "Whether the support inbox (conversations) is on",
                          "example": true
                        },
                        "supportTickets": {
                          "type": "boolean",
                          "description": "Whether support tickets are on",
                          "example": false
                        },
                        "statusPage": {
                          "type": "boolean",
                          "description": "Whether the status page is on",
                          "example": false
                        },
                        "surveys": {
                          "type": "boolean",
                          "description": "Whether surveys are on",
                          "example": false
                        },
                        "ai": {
                          "type": "boolean",
                          "description": "Whether AI features are on",
                          "example": false
                        }
                      },
                      "required": [
                        "feedback",
                        "roadmap",
                        "changelog",
                        "helpCenter",
                        "supportInbox",
                        "supportTickets",
                        "statusPage",
                        "surveys",
                        "ai"
                      ],
                      "description": "The product modules and whether each is on"
                    }
                  },
                  "required": [
                    "preset",
                    "completedSteps",
                    "dismissed",
                    "modules"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsSetupState",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Update the onboarding checklist progress or dismiss it",
        "description": "Changes the fields that the body sends; send at least one. completedSteps replaces the stored list, without duplicates. Requires the `manage_settings` permission. Records a `settings.setup_state_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "completedSteps": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "maxItems": 30,
                    "description": "Every checklist step marked done, replacing the stored list. Duplicates are dropped.",
                    "example": [
                      "connect-widget",
                      "invite-team"
                    ]
                  },
                  "dismissed": {
                    "type": "boolean",
                    "description": "Whether the onboarding checklist is dismissed",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated setup state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "preset": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "solo_founder",
                        "full",
                        null
                      ],
                      "description": "The last preset applied to the workspace. solo_founder: feedback, roadmap, changelog, help center and support inbox on; tickets, status page, surveys and AI off. full: every module on. Null when none was applied.",
                      "example": "solo_founder"
                    },
                    "completedSteps": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 30,
                      "description": "The IDs of the onboarding checklist steps marked done, chosen by the client",
                      "example": [
                        "connect-widget",
                        "invite-team"
                      ]
                    },
                    "dismissed": {
                      "type": "boolean",
                      "description": "Whether the onboarding checklist was dismissed",
                      "example": false
                    }
                  },
                  "required": [
                    "preset",
                    "completedSteps",
                    "dismissed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/notification-defaults": {
      "get": {
        "operationId": "getQuillsNotificationDefaults",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the teammate notification defaults",
        "description": "Returns the workspace-wide notification defaults. A default applies to a teammate who has not saved a personal setting for that notification type and channel. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace notification defaults",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "digestFrequency": {
                      "type": "string",
                      "enum": [
                        "off",
                        "hourly",
                        "daily"
                      ],
                      "default": "off",
                      "description": "How often a teammate without saved preferences gets an email digest of unread notifications: off, hourly or daily",
                      "example": "daily"
                    },
                    "matrix": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "description": "The notification type that the row sets defaults for",
                            "example": "ticket_assigned"
                          },
                          "inApp": {
                            "type": "boolean",
                            "description": "Whether the in-app notification is on for this notification type. Absent: no workspace default for the channel.",
                            "example": true
                          },
                          "email": {
                            "type": "boolean",
                            "description": "Whether email is on for this notification type. Absent: no workspace default for the channel.",
                            "example": true
                          },
                          "push": {
                            "type": "boolean",
                            "description": "Whether mobile push is on for this notification type. Absent: no workspace default for the channel.",
                            "example": false
                          },
                          "slackDm": {
                            "type": "boolean",
                            "description": "Whether the Slack direct message is on for this notification type. Absent: no workspace default for the channel.",
                            "example": false
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 50,
                      "default": [],
                      "description": "Per-type channel defaults, one row per notification type. A teammate's own setting for a type and channel wins over the row."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsNotificationDefaults",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Set the teammate notification defaults",
        "description": "Replaces the workspace-wide notification defaults; omitted fields reset to off and an empty matrix. Teammates' personal notification preferences are not changed. Requires the `manage_settings` permission. Records a `settings.notification_defaults_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "digestFrequency": {
                    "type": "string",
                    "enum": [
                      "off",
                      "hourly",
                      "daily"
                    ],
                    "default": "off",
                    "description": "How often a teammate without saved preferences gets an email digest of unread notifications: off, hourly or daily",
                    "example": "daily"
                  },
                  "matrix": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "The notification type that the row sets defaults for",
                          "example": "ticket_assigned"
                        },
                        "inApp": {
                          "type": "boolean",
                          "description": "Whether the in-app notification is on for this notification type. Absent: no workspace default for the channel.",
                          "example": true
                        },
                        "email": {
                          "type": "boolean",
                          "description": "Whether email is on for this notification type. Absent: no workspace default for the channel.",
                          "example": true
                        },
                        "push": {
                          "type": "boolean",
                          "description": "Whether mobile push is on for this notification type. Absent: no workspace default for the channel.",
                          "example": false
                        },
                        "slackDm": {
                          "type": "boolean",
                          "description": "Whether the Slack direct message is on for this notification type. Absent: no workspace default for the channel.",
                          "example": false
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 50,
                    "default": [],
                    "description": "Per-type channel defaults, one row per notification type. A teammate's own setting for a type and channel wins over the row."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved workspace notification defaults",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "digestFrequency": {
                      "type": "string",
                      "enum": [
                        "off",
                        "hourly",
                        "daily"
                      ],
                      "default": "off",
                      "description": "How often a teammate without saved preferences gets an email digest of unread notifications: off, hourly or daily",
                      "example": "daily"
                    },
                    "matrix": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "description": "The notification type that the row sets defaults for",
                            "example": "ticket_assigned"
                          },
                          "inApp": {
                            "type": "boolean",
                            "description": "Whether the in-app notification is on for this notification type. Absent: no workspace default for the channel.",
                            "example": true
                          },
                          "email": {
                            "type": "boolean",
                            "description": "Whether email is on for this notification type. Absent: no workspace default for the channel.",
                            "example": true
                          },
                          "push": {
                            "type": "boolean",
                            "description": "Whether mobile push is on for this notification type. Absent: no workspace default for the channel.",
                            "example": false
                          },
                          "slackDm": {
                            "type": "boolean",
                            "description": "Whether the Slack direct message is on for this notification type. Absent: no workspace default for the channel.",
                            "example": false
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 50,
                      "default": [],
                      "description": "Per-type channel defaults, one row per notification type. A teammate's own setting for a type and channel wins over the row."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/receipts/{receiptId}/undo": {
      "post": {
        "operationId": "createQuillsSettingsReceiptsUndo",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Undo a settings change",
        "description": "Restores the values that one settings update changed, from the receiptId that the update returned. Undo runs once per receipt. 409 when the change was already undone, when a later change or undo in the area touched the same field, when a field no longer holds the value the change wrote, or when the receipt came in with a workspace import. Requires the `manage_settings` permission. Records a `settings.undone` event whose receipt reverses this one.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The receiptId that the settings update returned",
              "example": "audit_01m8rxxee8esga9vd9jq97tmqv"
            },
            "required": true,
            "description": "The receiptId that the settings update returned",
            "name": "receiptId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The undone change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The receipt that was undone",
                      "example": "audit_01m8rxxee8esga9vd9jq97tmqv"
                    },
                    "area": {
                      "type": "string",
                      "description": "The settings area of the change: portal, branding, widget, developer or labs",
                      "example": "branding"
                    },
                    "undoneAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the change was undone",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "area",
                    "undoneAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No settings update has this receipt ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The change was already undone, changed since, or came with a workspace import",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/website-branding": {
      "get": {
        "operationId": "getQuillsAutomaticWebsiteBrandingStatus",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the website branding status",
        "description": "Returns the state of the website logo lookup. `eligible` when no lookup has run and POST /settings/website-branding/start would run for the caller. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The website branding status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branding": {
                      "$ref": "#/components/schemas/QuillsWebsiteBranding"
                    }
                  },
                  "required": [
                    "branding"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/website-branding/lookup": {
      "post": {
        "operationId": "lookupQuillsWebsiteBranding",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Look up the branding of a website",
        "description": "Reads the home page of the website through the public-destination guard and keeps its logo as an offer. Nothing is applied. Replaces an earlier lookup while the workspace has no logo. One lookup runs at a time for each workspace. Requires the `manage_settings` permission. Records a `branding.auto_started` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "site": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048,
                    "description": "The website to read, as a domain or a URL",
                    "example": "example.com"
                  }
                },
                "required": [
                  "site"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The recorded lookup",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branding": {
                      "$ref": "#/components/schemas/QuillsWebsiteBranding"
                    }
                  },
                  "required": [
                    "branding"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "site is not a website address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace has a logo, file storage is not configured, a lookup is running, or the stored settings are not a JSON object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/website-branding/start": {
      "post": {
        "operationId": "startQuillsAutomaticWebsiteBranding",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Look up the caller's company website once",
        "description": "Looks up the website at the domain of the caller's work email and keeps its logo as an offer. Runs once for each workspace, in the first 14 days after the workspace's settings were created, and only while file storage is configured; a personal email address starts nothing. A workspace with a logo records the lookup as skipped. Requires the `manage_settings` permission. Records a `branding.auto_started` event when this request recorded the lookup.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The recorded lookup",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branding": {
                      "$ref": "#/components/schemas/QuillsWebsiteBranding"
                    },
                    "started": {
                      "type": "boolean",
                      "description": "Whether this request recorded the lookup",
                      "example": true
                    }
                  },
                  "required": [
                    "branding",
                    "started"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A lookup is already running for the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/website-branding/accept": {
      "post": {
        "operationId": "acceptQuillsWebsiteBrandingOffer",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Use the offered website logo",
        "description": "Sets the offered logo as the workspace logo. Its color also becomes the primary color when the theme is still the default (no preset, colors or custom CSS). POST /settings/website-branding/undo restores the previous values while neither changed since. Requires the `manage_settings` permission. Records a `branding.offer_accepted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The applied branding",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branding": {
                      "$ref": "#/components/schemas/QuillsWebsiteBranding"
                    }
                  },
                  "required": [
                    "branding"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No offer is waiting, the workspace has a logo, or the offered logo is gone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/website-branding/decline": {
      "post": {
        "operationId": "declineQuillsWebsiteBrandingOffer",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Decline the offered website logo",
        "description": "Drops the offer. The stored logo is queued for cleanup. Requires the `manage_settings` permission. Records a `branding.offer_declined` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The declined lookup",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branding": {
                      "$ref": "#/components/schemas/QuillsWebsiteBranding"
                    }
                  },
                  "required": [
                    "branding"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No offer is waiting for an answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/website-branding/undo": {
      "post": {
        "operationId": "undoQuillsAutomaticWebsiteBranding",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Undo the applied website branding",
        "description": "Restores the logo and theme values from before accept, when neither changed since. The website logo is queued for cleanup. Requires the `manage_settings` permission. Records a `branding.auto_undone` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The undone lookup",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branding": {
                      "$ref": "#/components/schemas/QuillsWebsiteBranding"
                    }
                  },
                  "required": [
                    "branding"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No applied website branding to undo, or the logo or theme changed since it was applied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/boards": {
      "get": {
        "operationId": "listQuillsBoards",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the visible feedback boards",
        "description": "Lists the workspace's feedback boards that the caller can see, sorted by name. Deleted boards are left out, and a board linked to projects is listed only when the caller can open at least one of them; a board without project links is visible to every teammate. With `counts=true`, each board has `postCount`: its active posts, without deleted, merged and test-customer posts. Uses offset paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "`true` adds `postCount` to each board. `false` (the default) leaves it out."
            },
            "required": false,
            "description": "`true` adds `postCount` to each board. `false` (the default) leaves it out.",
            "name": "counts",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "Number of boards to skip before the page starts",
              "example": 0
            },
            "required": false,
            "description": "Number of boards to skip before the page starts",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "Maximum number of boards to return",
              "example": 100
            },
            "required": false,
            "description": "Maximum number of boards to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of boards",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Board ID",
                            "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "name": {
                            "type": "string",
                            "description": "Board name",
                            "example": "Feature requests"
                          },
                          "slug": {
                            "type": "string",
                            "description": "URL slug of the board, unique in the workspace",
                            "example": "feature-requests"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Board description, or null when the board has none",
                            "example": "Ideas and requests for new features"
                          },
                          "access": {
                            "type": "object",
                            "properties": {
                              "view": {
                                "type": "string",
                                "enum": [
                                  "anonymous",
                                  "authenticated",
                                  "segments",
                                  "team"
                                ],
                                "description": "Who can see the board and its posts. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                              },
                              "vote": {
                                "type": "string",
                                "enum": [
                                  "anonymous",
                                  "authenticated",
                                  "segments",
                                  "team"
                                ],
                                "description": "Who can vote on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                              },
                              "comment": {
                                "type": "string",
                                "enum": [
                                  "anonymous",
                                  "authenticated",
                                  "segments",
                                  "team"
                                ],
                                "description": "Who can comment on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                              },
                              "submit": {
                                "type": "string",
                                "enum": [
                                  "anonymous",
                                  "authenticated",
                                  "segments",
                                  "team"
                                ],
                                "description": "Who can submit new posts to the board. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                              },
                              "segments": {
                                "type": "object",
                                "properties": {
                                  "view": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "Segment IDs whose signed-in members can view when the `view` tier is `segments`. Required to be non-empty with that tier.",
                                    "example": [
                                      "segment_01jd3k8m2q5r7t9v1w3x5y7z9a"
                                    ]
                                  },
                                  "vote": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "Segment IDs whose signed-in members can vote when the `vote` tier is `segments`. Required to be non-empty with that tier."
                                  },
                                  "comment": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "Segment IDs whose signed-in members can comment when the `comment` tier is `segments`. Required to be non-empty with that tier."
                                  },
                                  "submit": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "Segment IDs whose signed-in members can submit when the `submit` tier is `segments`. Required to be non-empty with that tier."
                                  }
                                },
                                "required": [
                                  "view",
                                  "vote",
                                  "comment",
                                  "submit"
                                ],
                                "description": "Per-action segment allowlists, used where the matching tier is `segments`"
                              },
                              "moderation": {
                                "type": "object",
                                "properties": {
                                  "anonPosts": {
                                    "type": "string",
                                    "enum": [
                                      "inherit",
                                      "on",
                                      "off"
                                    ],
                                    "description": "Review rule for new posts from visitors who are not signed in. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                                  },
                                  "signedPosts": {
                                    "type": "string",
                                    "enum": [
                                      "inherit",
                                      "on",
                                      "off"
                                    ],
                                    "description": "Review rule for new posts from signed-in customers. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                                  },
                                  "comments": {
                                    "type": "string",
                                    "enum": [
                                      "inherit",
                                      "on",
                                      "off"
                                    ],
                                    "description": "Review rule for new comments. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                                  }
                                },
                                "required": [
                                  "anonPosts",
                                  "signedPosts",
                                  "comments"
                                ],
                                "description": "Board overrides of the workspace's rule for holding new posts and comments for review"
                              },
                              "replyPolicy": {
                                "type": "string",
                                "enum": [
                                  "anyone",
                                  "author-only"
                                ],
                                "description": "Who can reply on the board's threads, on top of the `comment` tier. `anyone`: the comment tier alone decides. `author-only`: only each post's author and the team can reply. Absent means `anyone`."
                              }
                            },
                            "required": [
                              "view",
                              "vote",
                              "comment",
                              "submit",
                              "segments",
                              "moderation"
                            ],
                            "description": "Who can view, vote on, comment on and submit to the board, and the board's review rules"
                          },
                          "visibleSegmentIds": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "Segment IDs whose signed-in members can see the board. Null shows the board to every customer that the `view` tier admits.",
                            "example": [
                              "segment_02k7m9p3r5t8v0w2x4y6z8a1b3"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the board was created",
                            "example": "2026-11-18T14:32:05.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the board was last changed",
                            "example": "2026-11-20T09:15:42.000Z"
                          },
                          "postCount": {
                            "type": "number",
                            "description": "Number of active posts on the board, without deleted, merged and test-customer posts. Present only when the list was requested with `counts=true`.",
                            "example": 42
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "description",
                          "access",
                          "visibleSegmentIds",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "Boards on this page, sorted by name"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset to request the next page with, or null on the last page",
                      "example": 100
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsBoard",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Create a feedback board",
        "description": "Creates a feedback board. Without a slug, the board gets a free slug made from its name: the name's slug, else that slug with `-1`, `-2` and so on (a name without Latin letters or digits gives `board`). Without `access`, anyone can view, vote, comment and submit, and review follows the workspace default. Every segment that `access` names must exist in the workspace. Records a `board.created` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Board name. Leading and trailing spaces are removed.",
                    "example": "Feature requests"
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                    "description": "URL slug of the board. Lowercase letters, digits and single hyphens, unique in the workspace. A deleted board keeps its slug. Omit it to derive a free slug from the name.",
                    "example": "feature-requests"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Board description. An empty string stores none.",
                    "example": "Ideas and requests for new features"
                  },
                  "access": {
                    "type": "object",
                    "properties": {
                      "view": {
                        "type": "string",
                        "enum": [
                          "anonymous",
                          "authenticated",
                          "segments",
                          "team"
                        ],
                        "description": "Who can see the board and its posts. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                      },
                      "vote": {
                        "type": "string",
                        "enum": [
                          "anonymous",
                          "authenticated",
                          "segments",
                          "team"
                        ],
                        "description": "Who can vote on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                      },
                      "comment": {
                        "type": "string",
                        "enum": [
                          "anonymous",
                          "authenticated",
                          "segments",
                          "team"
                        ],
                        "description": "Who can comment on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                      },
                      "submit": {
                        "type": "string",
                        "enum": [
                          "anonymous",
                          "authenticated",
                          "segments",
                          "team"
                        ],
                        "description": "Who can submit new posts to the board. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                      },
                      "segments": {
                        "type": "object",
                        "properties": {
                          "view": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                              "example": "segment_01h455vb4pex5vsknk084sn02q"
                            },
                            "maxItems": 50,
                            "description": "Segment IDs whose signed-in members can view when the `view` tier is `segments`. Required to be non-empty with that tier.",
                            "example": [
                              "segment_01jd3k8m2q5r7t9v1w3x5y7z9a"
                            ]
                          },
                          "vote": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                              "example": "segment_01h455vb4pex5vsknk084sn02q"
                            },
                            "maxItems": 50,
                            "description": "Segment IDs whose signed-in members can vote when the `vote` tier is `segments`. Required to be non-empty with that tier."
                          },
                          "comment": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                              "example": "segment_01h455vb4pex5vsknk084sn02q"
                            },
                            "maxItems": 50,
                            "description": "Segment IDs whose signed-in members can comment when the `comment` tier is `segments`. Required to be non-empty with that tier."
                          },
                          "submit": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                              "example": "segment_01h455vb4pex5vsknk084sn02q"
                            },
                            "maxItems": 50,
                            "description": "Segment IDs whose signed-in members can submit when the `submit` tier is `segments`. Required to be non-empty with that tier."
                          }
                        },
                        "required": [
                          "view",
                          "vote",
                          "comment",
                          "submit"
                        ],
                        "description": "Per-action segment allowlists, used where the matching tier is `segments`"
                      },
                      "moderation": {
                        "type": "object",
                        "properties": {
                          "anonPosts": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "on",
                              "off"
                            ],
                            "description": "Review rule for new posts from visitors who are not signed in. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                          },
                          "signedPosts": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "on",
                              "off"
                            ],
                            "description": "Review rule for new posts from signed-in customers. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                          },
                          "comments": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "on",
                              "off"
                            ],
                            "description": "Review rule for new comments. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                          }
                        },
                        "required": [
                          "anonPosts",
                          "signedPosts",
                          "comments"
                        ],
                        "description": "Board overrides of the workspace's rule for holding new posts and comments for review"
                      },
                      "replyPolicy": {
                        "type": "string",
                        "enum": [
                          "anyone",
                          "author-only"
                        ],
                        "description": "Who can reply on the board's threads, on top of the `comment` tier. `anyone`: the comment tier alone decides. `author-only`: only each post's author and the team can reply. Absent means `anyone`."
                      }
                    },
                    "required": [
                      "view",
                      "vote",
                      "comment",
                      "submit",
                      "segments",
                      "moderation"
                    ],
                    "description": "Who can view, vote on, comment on and submit to the board, and its review rules. Omit it for the default: every action open to anyone, review rules inherited."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created board",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Board ID",
                      "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "name": {
                      "type": "string",
                      "description": "Board name",
                      "example": "Feature requests"
                    },
                    "slug": {
                      "type": "string",
                      "description": "URL slug of the board, unique in the workspace",
                      "example": "feature-requests"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Board description, or null when the board has none",
                      "example": "Ideas and requests for new features"
                    },
                    "access": {
                      "type": "object",
                      "properties": {
                        "view": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can see the board and its posts. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "vote": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can vote on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "comment": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can comment on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "submit": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can submit new posts to the board. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "segments": {
                          "type": "object",
                          "properties": {
                            "view": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can view when the `view` tier is `segments`. Required to be non-empty with that tier.",
                              "example": [
                                "segment_01jd3k8m2q5r7t9v1w3x5y7z9a"
                              ]
                            },
                            "vote": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can vote when the `vote` tier is `segments`. Required to be non-empty with that tier."
                            },
                            "comment": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can comment when the `comment` tier is `segments`. Required to be non-empty with that tier."
                            },
                            "submit": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can submit when the `submit` tier is `segments`. Required to be non-empty with that tier."
                            }
                          },
                          "required": [
                            "view",
                            "vote",
                            "comment",
                            "submit"
                          ],
                          "description": "Per-action segment allowlists, used where the matching tier is `segments`"
                        },
                        "moderation": {
                          "type": "object",
                          "properties": {
                            "anonPosts": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "on",
                                "off"
                              ],
                              "description": "Review rule for new posts from visitors who are not signed in. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                            },
                            "signedPosts": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "on",
                                "off"
                              ],
                              "description": "Review rule for new posts from signed-in customers. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                            },
                            "comments": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "on",
                                "off"
                              ],
                              "description": "Review rule for new comments. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                            }
                          },
                          "required": [
                            "anonPosts",
                            "signedPosts",
                            "comments"
                          ],
                          "description": "Board overrides of the workspace's rule for holding new posts and comments for review"
                        },
                        "replyPolicy": {
                          "type": "string",
                          "enum": [
                            "anyone",
                            "author-only"
                          ],
                          "description": "Who can reply on the board's threads, on top of the `comment` tier. `anyone`: the comment tier alone decides. `author-only`: only each post's author and the team can reply. Absent means `anyone`."
                        }
                      },
                      "required": [
                        "view",
                        "vote",
                        "comment",
                        "submit",
                        "segments",
                        "moderation"
                      ],
                      "description": "Who can view, vote on, comment on and submit to the board, and the board's review rules"
                    },
                    "visibleSegmentIds": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      },
                      "description": "Segment IDs whose signed-in members can see the board. Null shows the board to every customer that the `view` tier admits.",
                      "example": [
                        "segment_02k7m9p3r5t8v0w2x4y6z8a1b3"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the board was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the board was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "postCount": {
                      "type": "number",
                      "description": "Number of active posts on the board, without deleted, merged and test-customer posts. Present only when the list was requested with `counts=true`.",
                      "example": 42
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "description",
                    "access",
                    "visibleSegmentIds",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A segment named in `access` does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Board slug is taken, or no free slug was found for the name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/boards/{boardId}": {
      "get": {
        "operationId": "getQuillsBoard",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get a feedback board",
        "description": "Gets one feedback board with its access settings and visible segments. A deleted board, or one linked only to projects the caller cannot open, answers 404. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Board ID",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Board ID",
            "name": "boardId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The board",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Board ID",
                      "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "name": {
                      "type": "string",
                      "description": "Board name",
                      "example": "Feature requests"
                    },
                    "slug": {
                      "type": "string",
                      "description": "URL slug of the board, unique in the workspace",
                      "example": "feature-requests"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Board description, or null when the board has none",
                      "example": "Ideas and requests for new features"
                    },
                    "access": {
                      "type": "object",
                      "properties": {
                        "view": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can see the board and its posts. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "vote": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can vote on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "comment": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can comment on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "submit": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can submit new posts to the board. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "segments": {
                          "type": "object",
                          "properties": {
                            "view": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can view when the `view` tier is `segments`. Required to be non-empty with that tier.",
                              "example": [
                                "segment_01jd3k8m2q5r7t9v1w3x5y7z9a"
                              ]
                            },
                            "vote": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can vote when the `vote` tier is `segments`. Required to be non-empty with that tier."
                            },
                            "comment": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can comment when the `comment` tier is `segments`. Required to be non-empty with that tier."
                            },
                            "submit": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can submit when the `submit` tier is `segments`. Required to be non-empty with that tier."
                            }
                          },
                          "required": [
                            "view",
                            "vote",
                            "comment",
                            "submit"
                          ],
                          "description": "Per-action segment allowlists, used where the matching tier is `segments`"
                        },
                        "moderation": {
                          "type": "object",
                          "properties": {
                            "anonPosts": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "on",
                                "off"
                              ],
                              "description": "Review rule for new posts from visitors who are not signed in. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                            },
                            "signedPosts": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "on",
                                "off"
                              ],
                              "description": "Review rule for new posts from signed-in customers. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                            },
                            "comments": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "on",
                                "off"
                              ],
                              "description": "Review rule for new comments. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                            }
                          },
                          "required": [
                            "anonPosts",
                            "signedPosts",
                            "comments"
                          ],
                          "description": "Board overrides of the workspace's rule for holding new posts and comments for review"
                        },
                        "replyPolicy": {
                          "type": "string",
                          "enum": [
                            "anyone",
                            "author-only"
                          ],
                          "description": "Who can reply on the board's threads, on top of the `comment` tier. `anyone`: the comment tier alone decides. `author-only`: only each post's author and the team can reply. Absent means `anyone`."
                        }
                      },
                      "required": [
                        "view",
                        "vote",
                        "comment",
                        "submit",
                        "segments",
                        "moderation"
                      ],
                      "description": "Who can view, vote on, comment on and submit to the board, and the board's review rules"
                    },
                    "visibleSegmentIds": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      },
                      "description": "Segment IDs whose signed-in members can see the board. Null shows the board to every customer that the `view` tier admits.",
                      "example": [
                        "segment_02k7m9p3r5t8v0w2x4y6z8a1b3"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the board was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the board was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "postCount": {
                      "type": "number",
                      "description": "Number of active posts on the board, without deleted, merged and test-customer posts. Present only when the list was requested with `counts=true`.",
                      "example": 42
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "description",
                    "access",
                    "visibleSegmentIds",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Board not found, deleted, or linked only to projects the caller cannot open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsBoard",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Update a feedback board, including its access settings",
        "description": "Changes the fields that the body names; at least one is required. A new name without a slug also moves the slug to the new name's slug when that slug is free; otherwise the slug stays. `access` replaces the whole access matrix. Every segment that `access` or `visibleSegmentIds` names must exist in the workspace. Records a `board.updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Board ID",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Board ID",
            "name": "boardId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "New board name. Leading and trailing spaces are removed.",
                    "example": "Feature requests"
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                    "description": "New URL slug of the board. Lowercase letters, digits and single hyphens, unique in the workspace. A deleted board keeps its slug.",
                    "example": "feature-requests"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "New board description. Null or an empty string removes it.",
                    "example": "Ideas and requests for new features"
                  },
                  "access": {
                    "type": "object",
                    "properties": {
                      "view": {
                        "type": "string",
                        "enum": [
                          "anonymous",
                          "authenticated",
                          "segments",
                          "team"
                        ],
                        "description": "Who can see the board and its posts. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                      },
                      "vote": {
                        "type": "string",
                        "enum": [
                          "anonymous",
                          "authenticated",
                          "segments",
                          "team"
                        ],
                        "description": "Who can vote on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                      },
                      "comment": {
                        "type": "string",
                        "enum": [
                          "anonymous",
                          "authenticated",
                          "segments",
                          "team"
                        ],
                        "description": "Who can comment on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                      },
                      "submit": {
                        "type": "string",
                        "enum": [
                          "anonymous",
                          "authenticated",
                          "segments",
                          "team"
                        ],
                        "description": "Who can submit new posts to the board. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                      },
                      "segments": {
                        "type": "object",
                        "properties": {
                          "view": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                              "example": "segment_01h455vb4pex5vsknk084sn02q"
                            },
                            "maxItems": 50,
                            "description": "Segment IDs whose signed-in members can view when the `view` tier is `segments`. Required to be non-empty with that tier.",
                            "example": [
                              "segment_01jd3k8m2q5r7t9v1w3x5y7z9a"
                            ]
                          },
                          "vote": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                              "example": "segment_01h455vb4pex5vsknk084sn02q"
                            },
                            "maxItems": 50,
                            "description": "Segment IDs whose signed-in members can vote when the `vote` tier is `segments`. Required to be non-empty with that tier."
                          },
                          "comment": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                              "example": "segment_01h455vb4pex5vsknk084sn02q"
                            },
                            "maxItems": 50,
                            "description": "Segment IDs whose signed-in members can comment when the `comment` tier is `segments`. Required to be non-empty with that tier."
                          },
                          "submit": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                              "example": "segment_01h455vb4pex5vsknk084sn02q"
                            },
                            "maxItems": 50,
                            "description": "Segment IDs whose signed-in members can submit when the `submit` tier is `segments`. Required to be non-empty with that tier."
                          }
                        },
                        "required": [
                          "view",
                          "vote",
                          "comment",
                          "submit"
                        ],
                        "description": "Per-action segment allowlists, used where the matching tier is `segments`"
                      },
                      "moderation": {
                        "type": "object",
                        "properties": {
                          "anonPosts": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "on",
                              "off"
                            ],
                            "description": "Review rule for new posts from visitors who are not signed in. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                          },
                          "signedPosts": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "on",
                              "off"
                            ],
                            "description": "Review rule for new posts from signed-in customers. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                          },
                          "comments": {
                            "type": "string",
                            "enum": [
                              "inherit",
                              "on",
                              "off"
                            ],
                            "description": "Review rule for new comments. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                          }
                        },
                        "required": [
                          "anonPosts",
                          "signedPosts",
                          "comments"
                        ],
                        "description": "Board overrides of the workspace's rule for holding new posts and comments for review"
                      },
                      "replyPolicy": {
                        "type": "string",
                        "enum": [
                          "anyone",
                          "author-only"
                        ],
                        "description": "Who can reply on the board's threads, on top of the `comment` tier. `anyone`: the comment tier alone decides. `author-only`: only each post's author and the team can reply. Absent means `anyone`."
                      }
                    },
                    "required": [
                      "view",
                      "vote",
                      "comment",
                      "submit",
                      "segments",
                      "moderation"
                    ],
                    "description": "The full new access matrix: who can view, vote on, comment on and submit to the board, and its review rules"
                  },
                  "visibleSegmentIds": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Show the board only to signed-in customers in one of these segments. Null or an empty list shows it to every customer that the view tier admits."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated board",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Board ID",
                      "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "name": {
                      "type": "string",
                      "description": "Board name",
                      "example": "Feature requests"
                    },
                    "slug": {
                      "type": "string",
                      "description": "URL slug of the board, unique in the workspace",
                      "example": "feature-requests"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Board description, or null when the board has none",
                      "example": "Ideas and requests for new features"
                    },
                    "access": {
                      "type": "object",
                      "properties": {
                        "view": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can see the board and its posts. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "vote": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can vote on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "comment": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can comment on the board's posts. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "submit": {
                          "type": "string",
                          "enum": [
                            "anonymous",
                            "authenticated",
                            "segments",
                            "team"
                          ],
                          "description": "Who can submit new posts to the board. It cannot be more open than `view`. `anonymous`: anyone, signed in or not. `authenticated`: signed-in customers. `segments`: signed-in customers in one of the segments listed for this action in `segments`. `team`: teammates only."
                        },
                        "segments": {
                          "type": "object",
                          "properties": {
                            "view": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can view when the `view` tier is `segments`. Required to be non-empty with that tier.",
                              "example": [
                                "segment_01jd3k8m2q5r7t9v1w3x5y7z9a"
                              ]
                            },
                            "vote": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can vote when the `vote` tier is `segments`. Required to be non-empty with that tier."
                            },
                            "comment": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can comment when the `comment` tier is `segments`. Required to be non-empty with that tier."
                            },
                            "submit": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Segment IDs whose signed-in members can submit when the `submit` tier is `segments`. Required to be non-empty with that tier."
                            }
                          },
                          "required": [
                            "view",
                            "vote",
                            "comment",
                            "submit"
                          ],
                          "description": "Per-action segment allowlists, used where the matching tier is `segments`"
                        },
                        "moderation": {
                          "type": "object",
                          "properties": {
                            "anonPosts": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "on",
                                "off"
                              ],
                              "description": "Review rule for new posts from visitors who are not signed in. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                            },
                            "signedPosts": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "on",
                                "off"
                              ],
                              "description": "Review rule for new posts from signed-in customers. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                            },
                            "comments": {
                              "type": "string",
                              "enum": [
                                "inherit",
                                "on",
                                "off"
                              ],
                              "description": "Review rule for new comments. `inherit`: follow the workspace's moderation default. `on`: hold them for review. `off`: publish them without review."
                            }
                          },
                          "required": [
                            "anonPosts",
                            "signedPosts",
                            "comments"
                          ],
                          "description": "Board overrides of the workspace's rule for holding new posts and comments for review"
                        },
                        "replyPolicy": {
                          "type": "string",
                          "enum": [
                            "anyone",
                            "author-only"
                          ],
                          "description": "Who can reply on the board's threads, on top of the `comment` tier. `anyone`: the comment tier alone decides. `author-only`: only each post's author and the team can reply. Absent means `anyone`."
                        }
                      },
                      "required": [
                        "view",
                        "vote",
                        "comment",
                        "submit",
                        "segments",
                        "moderation"
                      ],
                      "description": "Who can view, vote on, comment on and submit to the board, and the board's review rules"
                    },
                    "visibleSegmentIds": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "string"
                      },
                      "description": "Segment IDs whose signed-in members can see the board. Null shows the board to every customer that the `view` tier admits.",
                      "example": [
                        "segment_02k7m9p3r5t8v0w2x4y6z8a1b3"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the board was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the board was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "postCount": {
                      "type": "number",
                      "description": "Number of active posts on the board, without deleted, merged and test-customer posts. Present only when the list was requested with `counts=true`.",
                      "example": 42
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "description",
                    "access",
                    "visibleSegmentIds",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Board not found, deleted, or linked only to projects the caller cannot open; or a named segment does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Board slug is taken",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsBoard",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Delete a feedback board",
        "description": "Soft-deletes a feedback board. Its posts leave every list. Its project links are removed, because no route can read or unlink a deleted board. Every live post merged into a post on the board is unmerged, so it can be voted on and merged again. `unmerged` and the events name only the posts that the caller can see. Records a `board.deleted` event and one `post.unmerged` event per unmerged post. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Board ID",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Board ID",
            "name": "boardId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted board and the posts it unmerged",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted board",
                      "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "deletedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the board was deleted",
                      "example": "2026-11-21T16:04:11.000Z"
                    },
                    "unmerged": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "postId": {
                            "type": "string",
                            "description": "ID of the post that was unmerged",
                            "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
                          },
                          "canonicalPostId": {
                            "type": "string",
                            "description": "ID of the post on the deleted board that it was merged into",
                            "example": "post_04n9p1r5t7w0x2y4z6a8b0c3d5"
                          }
                        },
                        "required": [
                          "postId",
                          "canonicalPostId"
                        ]
                      },
                      "description": "Live posts that were merged into a post on this board and are now separate again. Only posts that the caller can see."
                    }
                  },
                  "required": [
                    "id",
                    "deletedAt",
                    "unmerged"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Board not found, deleted, or linked only to projects the caller cannot open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/similar": {
      "get": {
        "operationId": "findQuillsSimilarPosts",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Find posts similar to a text, without AI",
        "description": "Finds possible duplicates of a text among live, unmerged posts that the caller can see, by combining PostgreSQL full-text search (English) and trigram similarity on titles. Needs no AI provider. A post matches when the text search matches, its title contains the text, or its title similarity passes a fixed threshold. Sorted by `similarity`, then by votes. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 200,
              "description": "Text to compare, such as the title of a new request. Leading and trailing spaces are removed.",
              "example": "export reports to csv"
            },
            "required": true,
            "description": "Text to compare, such as the title of a new request. Leading and trailing spaces are removed.",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts on this board",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": false,
            "description": "Only posts on this board",
            "name": "boardId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "A post to leave out, such as the post being edited",
              "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
            },
            "required": false,
            "description": "A post to leave out, such as the post being edited",
            "name": "excludePostId",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 8,
              "description": "Maximum number of posts to return",
              "example": 8
            },
            "required": false,
            "description": "Maximum number of posts to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Candidate duplicate/similar posts ranked best first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_06q1r3t7w9y2z4a6b8c0d2e5f7"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Export reports as CSV"
                          },
                          "boardId": {
                            "type": "string",
                            "description": "ID of the post's board",
                            "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "boardName": {
                            "type": "string",
                            "description": "Name of the post's board",
                            "example": "Feature requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the post's status, or null when it has none",
                            "example": "Planned"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of votes on the post",
                            "example": 18
                          },
                          "similarity": {
                            "type": "number",
                            "description": "Relevance score, higher is closer, rounded to three decimals. It weighs the text-search rank, word similarity and title similarity; it has no fixed maximum and compares only within one response.",
                            "example": 1.284
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "boardId",
                          "boardName",
                          "statusName",
                          "voteCount",
                          "similarity"
                        ]
                      },
                      "description": "Similar posts, best match first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/hygiene": {
      "get": {
        "operationId": "getQuillsFeedbackHygiene",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get feedback hygiene queues (unacknowledged, stale, vote-burst) and fair-weighted ranking",
        "description": "Lists posts awaiting first team acknowledgement, stale open posts, vote-burst-flagged posts, and fair-weighted demand rankings that limit single-company vote brigading. Every list holds live, unmerged posts on boards that the caller can see, and has at most `limit` items. An open post has no status, or a status outside the `complete` and `closed` categories. The fair ranking scores the 100 most-voted posts and returns the best by `fairScore`, then by votes. Requires the `quills:read` permission; revenue also needs `quills:view_revenue`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts on this board",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": false,
            "description": "Only posts on this board",
            "name": "boardId",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 60,
              "description": "Days without a change after which an open post counts as stale",
              "example": 60
            },
            "required": false,
            "description": "Days without a change after which an open post counts as stale",
            "name": "staleDays",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30,
              "description": "Maximum number of posts in each list",
              "example": 30
            },
            "required": false,
            "description": "Maximum number of posts in each list",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Feedback hygiene lists and fair-weighted rankings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unacknowledged": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_06q1r3t7w9y2z4a6b8c0d2e5f7"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Export reports as CSV"
                          },
                          "boardId": {
                            "type": "string",
                            "description": "ID of the post's board",
                            "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "boardName": {
                            "type": "string",
                            "description": "Name of the post's board",
                            "example": "Feature requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the post's status, or null when it has none",
                            "example": "Under review"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of votes on the post",
                            "example": 18
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was created",
                            "example": "2026-09-02T08:12:30.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was last changed",
                            "example": "2026-09-20T17:45:00.000Z"
                          },
                          "firstTeamResponseAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When a teammate first posted a public comment on the post, or null when none has",
                            "example": "2026-03-14T09:26:53.589Z"
                          },
                          "ackDueAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the first team acknowledgement is due, or null when no deadline is set",
                            "example": "2026-03-14T09:26:53.589Z"
                          },
                          "voteBurstFlaggedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the post was first flagged for a vote burst (10 or more votes within 10 minutes, without test customers), or null when it never was",
                            "example": "2026-11-21T13:05:00.000Z"
                          },
                          "voteBurstCount": {
                            "type": "number",
                            "description": "Largest number of votes seen within one 10-minute burst window; 0 when never flagged",
                            "example": 14
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "boardId",
                          "boardName",
                          "statusName",
                          "voteCount",
                          "createdAt",
                          "updatedAt",
                          "firstTeamResponseAt",
                          "ackDueAt",
                          "voteBurstFlaggedAt",
                          "voteBurstCount"
                        ]
                      },
                      "description": "Open posts without a public teammate comment yet, oldest first"
                    },
                    "staleOpen": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_06q1r3t7w9y2z4a6b8c0d2e5f7"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Export reports as CSV"
                          },
                          "boardId": {
                            "type": "string",
                            "description": "ID of the post's board",
                            "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "boardName": {
                            "type": "string",
                            "description": "Name of the post's board",
                            "example": "Feature requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the post's status, or null when it has none",
                            "example": "Under review"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of votes on the post",
                            "example": 18
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was created",
                            "example": "2026-09-02T08:12:30.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was last changed",
                            "example": "2026-09-20T17:45:00.000Z"
                          },
                          "firstTeamResponseAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When a teammate first posted a public comment on the post, or null when none has",
                            "example": "2026-03-14T09:26:53.589Z"
                          },
                          "ackDueAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the first team acknowledgement is due, or null when no deadline is set",
                            "example": "2026-03-14T09:26:53.589Z"
                          },
                          "voteBurstFlaggedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the post was first flagged for a vote burst (10 or more votes within 10 minutes, without test customers), or null when it never was",
                            "example": "2026-11-21T13:05:00.000Z"
                          },
                          "voteBurstCount": {
                            "type": "number",
                            "description": "Largest number of votes seen within one 10-minute burst window; 0 when never flagged",
                            "example": 14
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "boardId",
                          "boardName",
                          "statusName",
                          "voteCount",
                          "createdAt",
                          "updatedAt",
                          "firstTeamResponseAt",
                          "ackDueAt",
                          "voteBurstFlaggedAt",
                          "voteBurstCount"
                        ]
                      },
                      "description": "Open posts not changed for `staleDays` days, least recently changed first"
                    },
                    "burstFlagged": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_06q1r3t7w9y2z4a6b8c0d2e5f7"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Export reports as CSV"
                          },
                          "boardId": {
                            "type": "string",
                            "description": "ID of the post's board",
                            "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "boardName": {
                            "type": "string",
                            "description": "Name of the post's board",
                            "example": "Feature requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the post's status, or null when it has none",
                            "example": "Under review"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of votes on the post",
                            "example": 18
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was created",
                            "example": "2026-09-02T08:12:30.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was last changed",
                            "example": "2026-09-20T17:45:00.000Z"
                          },
                          "firstTeamResponseAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When a teammate first posted a public comment on the post, or null when none has",
                            "example": "2026-03-14T09:26:53.589Z"
                          },
                          "ackDueAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the first team acknowledgement is due, or null when no deadline is set",
                            "example": "2026-03-14T09:26:53.589Z"
                          },
                          "voteBurstFlaggedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the post was first flagged for a vote burst (10 or more votes within 10 minutes, without test customers), or null when it never was",
                            "example": "2026-11-21T13:05:00.000Z"
                          },
                          "voteBurstCount": {
                            "type": "number",
                            "description": "Largest number of votes seen within one 10-minute burst window; 0 when never flagged",
                            "example": 14
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "boardId",
                          "boardName",
                          "statusName",
                          "voteCount",
                          "createdAt",
                          "updatedAt",
                          "firstTeamResponseAt",
                          "ackDueAt",
                          "voteBurstFlaggedAt",
                          "voteBurstCount"
                        ]
                      },
                      "description": "Posts flagged for a vote burst, in any status, most recently flagged first"
                    },
                    "fairRanked": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_06q1r3t7w9y2z4a6b8c0d2e5f7"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Export reports as CSV"
                          },
                          "boardId": {
                            "type": "string",
                            "description": "ID of the post's board",
                            "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of votes on the post",
                            "example": 18
                          },
                          "fairScore": {
                            "type": "number",
                            "description": "Demand score that limits single-company brigading, rounded to two decimals. Each company adds log2(1 + its voters), times 1.5 for a churn-risk company and times its highest voter importance (critical 1.5, important 1.2); each voter without a company adds their importance weight (1 by default). Votes on live merged posts count; test customers do not.",
                            "example": 7.42
                          },
                          "distinctCompanies": {
                            "type": "number",
                            "description": "Number of distinct companies among the voters",
                            "example": 5
                          },
                          "churnRiskCompanies": {
                            "type": "number",
                            "description": "Number of those companies marked as a churn risk",
                            "example": 1
                          },
                          "mrrCents": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Monthly revenue of the voters' companies in cents, each company once. Null without the quills:view_revenue permission.",
                            "example": 540000
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "boardId",
                          "voteCount",
                          "fairScore",
                          "distinctCompanies",
                          "churnRiskCompanies",
                          "mrrCents"
                        ]
                      },
                      "description": "Posts by fair demand score, highest first"
                    }
                  },
                  "required": [
                    "unacknowledged",
                    "staleOpen",
                    "burstFlagged",
                    "fairRanked"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts": {
      "get": {
        "operationId": "listQuillsPosts",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the visible feedback posts",
        "description": "Lists feedback posts with cursor paging, newest first by default. Leaves out merged posts, test-customer posts and posts on boards hidden by their project links (a board linked to projects needs access to one of them). showDeleted=true lists posts deleted in the last 30 days instead. Each post has its demand, as getQuillsPostDemand counts it, without segments, and its team score. authorPrincipalId keeps only the posts that one person wrote. minVotes, minMrrCents, segmentIds (a counted voter in one of the segments) and minScore filter by customer value. Requires the `quills:read` permission. Without `quills:view_revenue`, demand.mrrCents is null, and sort=mrr or minMrrCents is 403.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts on these boards: comma-separated board IDs, at most 50",
              "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j,board_01jd3kh7r9t1w3y5a7c9e1g3j5"
            },
            "required": false,
            "description": "Only posts on these boards: comma-separated board IDs, at most 50",
            "name": "boardIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts with one of these statuses: comma-separated status IDs, at most 50",
              "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
            },
            "required": false,
            "description": "Only posts with one of these statuses: comma-separated status IDs, at most 50",
            "name": "statusIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts with at least one of these active tags: comma-separated tag IDs, at most 50",
              "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
            },
            "required": false,
            "description": "Only posts with at least one of these active tags: comma-separated tag IDs, at most 50",
            "name": "tagIds",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "none"
                  ]
                },
                {
                  "type": "string",
                  "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                  "example": "principal_01h455vb4pex5vsknk084sn02q"
                }
              ],
              "description": "Only posts owned by this teammate principal ID, or `none` for unassigned posts",
              "example": "none"
            },
            "required": false,
            "description": "Only posts owned by this teammate principal ID, or `none` for unassigned posts",
            "name": "owner",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Text search over post titles and bodies, 1 to 200 characters. Supports web search syntax: \"quoted phrases\", -word to exclude and OR. Plain words also match word prefixes and close spellings in titles.",
              "example": "csv export"
            },
            "required": false,
            "description": "Text search over post titles and bodies, 1 to 200 characters. Supports web search syntax: \"quoted phrases\", -word to exclude and OR. Plain words also match word prefixes and close spellings in titles.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "string",
                  "maxLength": 64,
                  "format": "date-time"
                }
              ],
              "description": "Only posts created at or after this date (YYYY-MM-DD, from 00:00 UTC) or ISO 8601 date-time",
              "example": "2026-11-01"
            },
            "required": false,
            "description": "Only posts created at or after this date (YYYY-MM-DD, from 00:00 UTC) or ISO 8601 date-time",
            "name": "dateFrom",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "string",
                  "maxLength": 64,
                  "format": "date-time"
                }
              ],
              "description": "Only posts created at or before this date or ISO 8601 date-time. A date-only value covers the whole day in UTC.",
              "example": "2026-11-30"
            },
            "required": false,
            "description": "Only posts created at or before this date or ISO 8601 date-time. A date-only value covers the whole day in UTC.",
            "name": "dateTo",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "`true`: list only posts deleted in the last 30 days, which can still be restored. `false`: list only posts that are not deleted. Default `false`."
            },
            "required": false,
            "description": "`true`: list only posts deleted in the last 30 days, which can still be restored. `false`: list only posts that are not deleted. Default `false`.",
            "name": "showDeleted",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest",
                "votes",
                "rice",
                "mrr",
                "score",
                "trending",
                "stale"
              ],
              "default": "newest",
              "description": "Order of the list. `newest`: newest first (default). `oldest`: oldest first. `votes`: most votes first. `rice`: the RICE score, posts without one last. `mrr`: the monthly revenue of the voters' companies; needs the `quills:view_revenue` permission. `score`: the team score from the scoring factors, posts without a value last. `trending`: the most votes in the last 7 days, then the most votes. `stale`: the least recently changed first."
            },
            "required": false,
            "description": "Order of the list. `newest`: newest first (default). `oldest`: oldest first. `votes`: most votes first. `rice`: the RICE score, posts without one last. `mrr`: the monthly revenue of the voters' companies; needs the `quills:view_revenue` permission. `score`: the team score from the scoring factors, posts without a value last. `trending`: the most votes in the last 7 days, then the most votes. `stale`: the least recently changed first.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the last post of the previous page, from `nextCursor`. Omit for the first page. Use the same filters and sort for every page.",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": false,
            "description": "ID of the last post of the previous page, from `nextCursor`. Omit for the first page. Use the same filters and sort for every page.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Maximum number of posts to return in the page",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of posts to return in the page",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts written by this principal",
              "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
            },
            "required": false,
            "description": "Only posts written by this principal",
            "name": "authorPrincipalId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "Only posts changed at or after this ISO 8601 time, for an integration that syncs changes",
              "example": "2026-11-18T00:00:00Z"
            },
            "required": false,
            "description": "Only posts changed at or after this ISO 8601 time, for an integration that syncs changes",
            "name": "updatedSince",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "description": "Only posts with at least this many votes",
              "example": 10
            },
            "required": false,
            "description": "Only posts with at least this many votes",
            "name": "minVotes",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 2147483647,
              "description": "Only posts whose voters' companies pay at least this monthly revenue, in cents. Needs the `quills:view_revenue` permission.",
              "example": 500000
            },
            "required": false,
            "description": "Only posts whose voters' companies pay at least this monthly revenue, in cents. Needs the `quills:view_revenue` permission.",
            "name": "minMrrCents",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts with a counted voter in at least one of these segments: comma-separated segment IDs, at most 50",
              "example": "segment_01jd3kj9t1w3y5a7c9e1g3j5m7"
            },
            "required": false,
            "description": "Only posts with a counted voter in at least one of these segments: comma-separated segment IDs, at most 50",
            "name": "segmentIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "description": "Only posts with at least this team score, an integer from -9999 to 9999",
              "example": 5
            },
            "required": false,
            "description": "Only posts with at least this team score, an integer from -9999 to 9999",
            "name": "minScore",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "boardId": {
                            "type": "string",
                            "description": "ID of the board the post belongs to",
                            "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Export reports to CSV"
                          },
                          "content": {
                            "type": "string",
                            "description": "Post body text",
                            "example": "We need to share weekly numbers with finance in a spreadsheet."
                          },
                          "statusId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the post's status; null when the post has no status",
                            "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                          },
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                            "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                          },
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the author; null when the author has none",
                            "example": "Ada Park"
                          },
                          "authorAvatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Avatar image URL of the author; null when the author has none",
                            "example": "https://example.com/avatars/ada.png"
                          },
                          "ownerPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who owns the post; null when unassigned",
                            "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of votes on the post",
                            "example": 42
                          },
                          "commentCount": {
                            "type": "number",
                            "description": "Number of comments on the post",
                            "example": 7
                          },
                          "pinnedCommentId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the comment pinned as the official response; null when none is pinned",
                            "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                          },
                          "isCommentsLocked": {
                            "type": "boolean",
                            "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                          },
                          "isHidden": {
                            "type": "boolean",
                            "description": "Hidden from the board: only the author and the team see it"
                          },
                          "moderationState": {
                            "type": "string",
                            "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                            "example": "published"
                          },
                          "canonicalPostId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the post this post was merged into; null when the post is not merged",
                            "example": null
                          },
                          "eta": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                            "example": "2027-03-01T00:00:00.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was created",
                            "example": "2026-11-18T14:32:05.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was last changed",
                            "example": "2026-11-20T09:15:42.000Z"
                          },
                          "deletedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the post was deleted; null for a post that is not deleted",
                            "example": null
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Tag ID",
                                  "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Tag name",
                                  "example": "Reporting"
                                },
                                "color": {
                                  "type": "string",
                                  "description": "Tag color as a `#RRGGBB` hex code",
                                  "example": "#3b82f6"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "color"
                              ]
                            },
                            "description": "Active tags on the post, sorted by name; deleted tags are left out"
                          },
                          "customFields": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Key of the board's custom field",
                                  "example": "plan_tier"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                                },
                                "values": {
                                  "type": [
                                    "array",
                                    "null"
                                  ],
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "The chosen options of a multi-select field; null for other types"
                                }
                              },
                              "required": [
                                "key",
                                "value",
                                "values"
                              ]
                            },
                            "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                          },
                          "score": {
                            "type": "object",
                            "properties": {
                              "reach": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                                "example": 500
                              },
                              "impact": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                                "example": 2
                              },
                              "confidence": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                                "example": 80
                              },
                              "effort": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                                "example": 4
                              },
                              "rice": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                                "example": 200
                              }
                            },
                            "required": [
                              "reach",
                              "impact",
                              "confidence",
                              "effort",
                              "rice"
                            ],
                            "description": "RICE scoring inputs and the computed RICE score"
                          },
                          "factorValues": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "factorId": {
                                  "type": "string",
                                  "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                                  "example": "a1b2c3d4e5f6"
                                },
                                "value": {
                                  "type": "number",
                                  "description": "Stored value for the factor, 0 to 10",
                                  "example": 7
                                }
                              },
                              "required": [
                                "factorId",
                                "value"
                              ]
                            },
                            "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                          },
                          "demand": {
                            "type": "object",
                            "properties": {
                              "voters": {
                                "type": "number",
                                "description": "Number of distinct people who voted on the post or on live posts merged into it, without test customers and votes on boards the caller cannot see",
                                "example": 37
                              },
                              "companies": {
                                "type": "number",
                                "description": "Distinct voter companies",
                                "example": 12
                              },
                              "mrrCents": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "The monthly revenue of the voters' companies, in cents. Each company counts once. Null without the quills:view_revenue permission.",
                                "example": 1250000
                              },
                              "importance": {
                                "type": "object",
                                "properties": {
                                  "nice": {
                                    "type": "number",
                                    "description": "Voters who marked the post as nice to have",
                                    "example": 20
                                  },
                                  "important": {
                                    "type": "number",
                                    "description": "Voters who marked the post as important",
                                    "example": 12
                                  },
                                  "critical": {
                                    "type": "number",
                                    "description": "Voters who marked the post as critical",
                                    "example": 5
                                  }
                                },
                                "required": [
                                  "nice",
                                  "important",
                                  "critical"
                                ],
                                "description": "Number of voters per importance they gave. Voters who gave none are counted only in `voters`."
                              }
                            },
                            "required": [
                              "voters",
                              "companies",
                              "mrrCents",
                              "importance"
                            ],
                            "description": "The post's demand, as getQuillsPostDemand counts it, without segments"
                          },
                          "teamScore": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "The sum of weight × value over the team's scoring factors; null without a value.",
                            "example": 6.5
                          }
                        },
                        "required": [
                          "id",
                          "boardId",
                          "title",
                          "content",
                          "statusId",
                          "principalId",
                          "authorName",
                          "authorAvatarUrl",
                          "ownerPrincipalId",
                          "voteCount",
                          "commentCount",
                          "pinnedCommentId",
                          "isCommentsLocked",
                          "isHidden",
                          "moderationState",
                          "canonicalPostId",
                          "eta",
                          "createdAt",
                          "updatedAt",
                          "deletedAt",
                          "tags",
                          "customFields",
                          "score",
                          "factorValues",
                          "demand",
                          "teamScore"
                        ]
                      },
                      "description": "Posts of this page, in the requested order"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Value to pass as `cursor` for the next page; null when this is the last page",
                      "example": "post_01jd3kk2w4y6a8c0e2g4j6m8p0"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more posts follow this page"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The `cursor` post was not found or is on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Create a feedback post",
        "description": "Creates a published post on a board the caller can see. The author is the caller, or `authorPrincipalId` to post on behalf of a person of this workspace (that also needs the `quills:update` permission). The author is the first voter and is subscribed to the post. On behalf of a person, the post history and the audit log record you, the person and `source`. Without a status, the post gets the default status. customFields must hold a value for each required field of the board, internal fields included; 400 for a missing or wrongly typed value. Requires the `quills:create` permission. Records a `post.created` event and a `post.created` activity entry.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardId": {
                    "type": "string",
                    "description": "ID of the board to post on",
                    "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Post title, 1 to 200 characters after trimming",
                    "example": "Export reports to CSV"
                  },
                  "content": {
                    "type": "string",
                    "maxLength": 10000,
                    "default": "",
                    "description": "Post body text, up to 10,000 characters. Default empty.",
                    "example": "We need to share weekly numbers with finance in a spreadsheet."
                  },
                  "statusId": {
                    "type": "string",
                    "description": "ID of the post's status. Absent: the workspace's default status, if one is set.",
                    "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                  },
                  "tagIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post_tag` prefix. Requests also accept the bare UUID.",
                      "example": "post_tag_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "default": [],
                    "description": "IDs of active tags to add, at most 50; duplicates are ignored. Default none.",
                    "example": [
                      "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                    ]
                  },
                  "authorPrincipalId": {
                    "type": "string",
                    "description": "Principal ID of the person to post on behalf of, such as a customer; not a service principal. Absent or the caller's own ID: the caller is the author.",
                    "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "call",
                      "meeting",
                      "email",
                      "chat",
                      "other"
                    ],
                    "default": "other",
                    "description": "Where you heard it: call, meeting, email, chat or other. The post history and the audit log record it."
                  },
                  "customFields": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "maxItems": 50
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Values of the board's custom fields, keyed by field key: a string for text, select and date (YYYY-MM-DD), a number, a boolean for a checkbox, and a list of options for multi-select."
                  }
                },
                "required": [
                  "boardId",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A custom field value is missing, unknown or of the wrong type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Board, status, tag or author not found, or the board is one the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/counts": {
      "get": {
        "operationId": "getQuillsPostFilterCounts",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Count the visible posts per filter value",
        "description": "Counts the posts that listQuillsPosts would return, per status, board and tag, for building filter menus. Uses the list filters and visibility rules. Each facet leaves out its own filter, so it shows what choosing another value would return. `deleted` counts the posts deleted in the last 30 days. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts on these boards: comma-separated board IDs, at most 50",
              "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j,board_01jd3kh7r9t1w3y5a7c9e1g3j5"
            },
            "required": false,
            "description": "Only posts on these boards: comma-separated board IDs, at most 50",
            "name": "boardIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts with one of these statuses: comma-separated status IDs, at most 50",
              "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
            },
            "required": false,
            "description": "Only posts with one of these statuses: comma-separated status IDs, at most 50",
            "name": "statusIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts with at least one of these active tags: comma-separated tag IDs, at most 50",
              "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
            },
            "required": false,
            "description": "Only posts with at least one of these active tags: comma-separated tag IDs, at most 50",
            "name": "tagIds",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "none"
                  ]
                },
                {
                  "type": "string",
                  "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                  "example": "principal_01h455vb4pex5vsknk084sn02q"
                }
              ],
              "description": "Only posts owned by this teammate principal ID, or `none` for unassigned posts",
              "example": "none"
            },
            "required": false,
            "description": "Only posts owned by this teammate principal ID, or `none` for unassigned posts",
            "name": "owner",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Text search over post titles and bodies, 1 to 200 characters. Supports web search syntax: \"quoted phrases\", -word to exclude and OR. Plain words also match word prefixes and close spellings in titles.",
              "example": "csv export"
            },
            "required": false,
            "description": "Text search over post titles and bodies, 1 to 200 characters. Supports web search syntax: \"quoted phrases\", -word to exclude and OR. Plain words also match word prefixes and close spellings in titles.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "string",
                  "maxLength": 64,
                  "format": "date-time"
                }
              ],
              "description": "Only posts created at or after this date (YYYY-MM-DD, from 00:00 UTC) or ISO 8601 date-time",
              "example": "2026-11-01"
            },
            "required": false,
            "description": "Only posts created at or after this date (YYYY-MM-DD, from 00:00 UTC) or ISO 8601 date-time",
            "name": "dateFrom",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "string",
                  "maxLength": 64,
                  "format": "date-time"
                }
              ],
              "description": "Only posts created at or before this date or ISO 8601 date-time. A date-only value covers the whole day in UTC.",
              "example": "2026-11-30"
            },
            "required": false,
            "description": "Only posts created at or before this date or ISO 8601 date-time. A date-only value covers the whole day in UTC.",
            "name": "dateTo",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "`true`: list only posts deleted in the last 30 days, which can still be restored. `false`: list only posts that are not deleted. Default `false`."
            },
            "required": false,
            "description": "`true`: list only posts deleted in the last 30 days, which can still be restored. `false`: list only posts that are not deleted. Default `false`.",
            "name": "showDeleted",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Post counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statuses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Status ID",
                            "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of matching posts with this status",
                            "example": 12
                          }
                        },
                        "required": [
                          "id",
                          "count"
                        ]
                      },
                      "description": "Matching post counts per status, ignoring the status filter itself. Values without posts are left out."
                    },
                    "boards": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Board ID",
                            "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of matching posts with this board",
                            "example": 12
                          }
                        },
                        "required": [
                          "id",
                          "count"
                        ]
                      },
                      "description": "Matching post counts per board, ignoring the board filter itself. Values without posts are left out."
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of matching posts with this tag",
                            "example": 12
                          }
                        },
                        "required": [
                          "id",
                          "count"
                        ]
                      },
                      "description": "Matching post counts per tag, ignoring the tag filter itself. Values without posts are left out."
                    },
                    "deleted": {
                      "type": "number",
                      "description": "Number of matching posts deleted in the last 30 days, which can still be restored",
                      "example": 2
                    }
                  },
                  "required": [
                    "statuses",
                    "boards",
                    "tags",
                    "deleted"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/owner-candidates": {
      "get": {
        "operationId": "listQuillsPostOwnerCandidates",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the teammates who can own a post",
        "description": "Lists the current workspace members who can be set as a post's owner, sorted by display name, with offset paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. Pass the previous response's `nextOffset` to get the next page.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. Pass the previous response's `nextOffset` to get the next page.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Teammates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the teammate; pass it as `ownerPrincipalId` to setQuillsPostOwner",
                            "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name; null when the teammate has none",
                            "example": "Sam Rivera"
                          },
                          "avatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Avatar image URL; null when the teammate has none",
                            "example": "https://example.com/avatars/sam.png"
                          }
                        },
                        "required": [
                          "principalId",
                          "name",
                          "avatarUrl"
                        ]
                      },
                      "description": "Teammates of this page"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page; null when this is the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}": {
      "get": {
        "operationId": "getQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get a feedback post",
        "description": "Returns one post with its tags, custom fields and scores, whether the caller voted, the widget context it was sent with and its image attachments. A deleted post or a post on a board the caller cannot see is 404. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    },
                    "hasVoted": {
                      "type": "boolean",
                      "description": "Whether the caller has voted on the post, or on the post it was merged into or another post merged into that one"
                    },
                    "viewerPrincipalId": {
                      "type": "string",
                      "description": "The caller's principal ID, for removing the caller's vote or finding the caller's comments",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "widgetMetadata": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Host-page context that the widget sent with the post, as string key-value pairs; null when the post did not come from the widget with context",
                      "example": {
                        "pageUrl": "https://example.com/pricing",
                        "browser": "Firefox 133"
                      }
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "File ID",
                            "example": "file_01m8rxmftrfzvv1wa12f7gb5q5"
                          },
                          "name": {
                            "type": "string",
                            "description": "Original file name",
                            "example": "screenshot.png"
                          },
                          "contentType": {
                            "type": "string",
                            "description": "MIME type of the file",
                            "example": "image/png"
                          },
                          "size": {
                            "type": "number",
                            "description": "File size in bytes",
                            "example": 48213
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "contentType",
                          "size"
                        ]
                      },
                      "description": "Images the author attached; GET /files/{fileId} gives a download URL"
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues",
                    "hasVoted",
                    "viewerPrincipalId",
                    "widgetMetadata",
                    "attachments"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Edit a post's title, content, ETA, comment lock or custom fields",
        "description": "Changes the given fields of a post; at least one is required, and absent fields stay as they are. A title or content change keeps the previous version in the edit history. An ETA is stored as the first day of its UTC month. customFields changes the given fields only; null clears one, and a required field cannot be cleared. Requires the `quills:update` permission and access to the post's board. Records a `post.updated` event that names the changed fields, and a `comments.locked` or `comments.unlocked` activity entry when the lock changes.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "New title, 1 to 200 characters after trimming",
                    "example": "Export reports to CSV and Excel"
                  },
                  "content": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "New body text, up to 10,000 characters. Replaces any rich-text version of the body.",
                    "example": "Finance needs weekly numbers in a spreadsheet."
                  },
                  "eta": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "Target ship date as an ISO 8601 date-time; stored as 00:00 UTC on the first day of its UTC month. Null clears it.",
                    "example": "2027-03-15T00:00:00Z"
                  },
                  "isCommentsLocked": {
                    "type": "boolean",
                    "description": "Whether to lock the thread: customers cannot comment, teammates still can"
                  },
                  "customFields": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "maxItems": 50
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Values of the board's custom fields, keyed by field key: a string for text, select and date (YYYY-MM-DD), a number, a boolean for a checkbox, and a list of options for multi-select."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "No field given, or a custom field value is unknown, of the wrong type, or clears a required field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Delete a feedback post",
        "description": "Soft-deletes a post. A teammate with the `quills:delete` permission can restore it for 30 days. When the post was merged into another post, recounts that post's votes and comments. Records a `post.deleted` event and activity entry. Deleting an already deleted post returns 404. Requires the `quills:delete` permission and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, already deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/status": {
      "put": {
        "operationId": "setQuillsPostStatus",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Set a post's status",
        "description": "Moves a post to another status. When the status changes, records a `status.changed` activity entry. Records a `post.status_changed` event, which notifies the post's subscribers who follow status changes (in the app and by email, per their preferences) and can run the board's task rule. Setting the current status again changes nothing but still records the event. Requires the `quills:update` permission and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "statusId": {
                    "type": "string",
                    "description": "ID of the new status; must not be deleted",
                    "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                  }
                },
                "required": [
                  "statusId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see, or status not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/board": {
      "put": {
        "operationId": "setQuillsPostBoard",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Move a post to another board",
        "description": "Moves a post to another board. The caller must see both boards. The post keeps its votes, comments, status and custom field values. When the board changes, records a `post.board_changed` activity entry. Records a `post.moved` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardId": {
                    "type": "string",
                    "description": "ID of the board to move the post to",
                    "example": "board_01jd3kh7r9t1w3y5a7c9e1g3j5"
                  }
                },
                "required": [
                  "boardId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Moved post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post or target board not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/owner": {
      "put": {
        "operationId": "setQuillsPostOwner",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Assign or clear a post's owner",
        "description": "Sets the teammate who owns a post, or clears the owner with null. The owner must be a current workspace member (see listQuillsPostOwnerCandidates). When the owner changes, records an `owner.assigned` or `owner.unassigned` activity entry. Records a `post.owner_changed` event. Requires the `quills:update` permission and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ownerPrincipalId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Principal ID of the teammate to own the post; null clears the owner",
                    "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                  }
                },
                "required": [
                  "ownerPrincipalId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see, or the owner is not a current workspace member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/tags": {
      "put": {
        "operationId": "setQuillsPostTags",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Replace a post's tags",
        "description": "Replaces the post's tags with the given set; an empty list removes all tags. All or nothing: one missing, deleted or foreign tag returns 404 and leaves the tags unchanged. Records `tags.added` and `tags.removed` activity entries for the tags this request changed, and a `post.tags_changed` event. Requires the `quills:update` permission and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tagIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post_tag` prefix. Requests also accept the bare UUID.",
                      "example": "post_tag_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "IDs of the active tags the post should have, at most 50; duplicates are ignored",
                    "example": [
                      "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2",
                      "post_tag_01jd3km5y7a9c1e3g5j7m9p1r3"
                    ]
                  }
                },
                "required": [
                  "tagIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see, or a tag not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "patchQuillsPostTags",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Atomically add or remove tags on a post",
        "description": "Adds `addTagIds` and removes `removeTagIds` without replacing unrelated tags or touching soft-deleted tag history. Rejects unknown/foreign tags with 404.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "addTagIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post_tag` prefix. Requests also accept the bare UUID.",
                      "example": "post_tag_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50
                  },
                  "removeTagIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post_tag` prefix. Requests also accept the bare UUID.",
                      "example": "post_tag_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see, or a tag was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/restore": {
      "post": {
        "operationId": "restoreQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Restore a deleted feedback post",
        "description": "Restores a soft-deleted post, only within 30 days of the deletion. When the post was merged into another post, recounts that post's votes and comments. Records a `post.restored` event and activity entry. Requires the `quills:delete` permission and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Restored post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The post is not deleted, or was deleted more than 30 days ago",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/activity": {
      "get": {
        "operationId": "listQuillsPostActivity",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List a post's activity, newest first",
        "description": "Lists the post's history (creation, status, board, owner and tag changes, votes added for people, comment moderation, hiding, deletion and task creation), newest first, with offset paging. Requires the `quills:read` permission and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. Pass the previous response's `nextOffset` to get the next page.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. Pass the previous response's `nextOffset` to get the next page.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Activity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Activity entry ID",
                            "example": "post_activity_01jd3kn8a0c2e4g6j8m0p2r4t6"
                          },
                          "type": {
                            "type": "string",
                            "description": "Activity type, such as `post.created`, `status.changed`, `post.board_changed`, `owner.assigned`, `owner.unassigned`, `tags.added`, `tags.removed`, `vote.proxy`, `vote.removed`, `comments.locked`, `comment.pinned`, `post.hidden`, `post.deleted`, `post.restored`, `task.created` or `task.create_failed`",
                            "example": "status.changed"
                          },
                          "principalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the person who did it; null when not recorded",
                            "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                          },
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the person who did it; null when unknown or without a name",
                            "example": "Sam Rivera"
                          },
                          "metadata": {
                            "type": "object",
                            "properties": {
                              "boardName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`post.created`: name of the board the post was created on",
                                "example": "Feature requests"
                              },
                              "fromName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`status.changed`: name of the previous status; null when there was none",
                                "example": "Under review"
                              },
                              "fromColor": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`status.changed`: hex color of the previous status",
                                "example": "#6b7280"
                              },
                              "toName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`status.changed`: name of the new status",
                                "example": "Planned"
                              },
                              "toSlug": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`status.changed`: slug of the new status",
                                "example": "planned"
                              },
                              "toColor": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`status.changed`: hex color of the new status",
                                "example": "#3b82f6"
                              },
                              "fromBoardId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`post.board_changed`: ID of the previous board",
                                "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                              },
                              "fromBoardName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`post.board_changed`: name of the previous board",
                                "example": "Ideas"
                              },
                              "toBoardId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`post.board_changed`: ID of the new board",
                                "example": "board_01jd3kh7r9t1w3y5a7c9e1g3j5"
                              },
                              "toBoardName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`post.board_changed`: name of the new board",
                                "example": "Feature requests"
                              },
                              "ownerName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`owner.assigned`: display name of the new owner",
                                "example": "Sam Rivera"
                              },
                              "previousOwnerName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`owner.assigned` and `owner.unassigned`: display name of the previous owner",
                                "example": "Ada Park"
                              },
                              "tagNames": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "`tags.added` and `tags.removed`: names of the tags",
                                "example": [
                                  "Reporting",
                                  "Mobile"
                                ]
                              },
                              "voterPrincipalId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`vote.proxy` and `vote.removed`: principal ID of the person whose vote was added or removed",
                                "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                              },
                              "voterName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`vote.proxy` and `vote.removed`: display name of the voter",
                                "example": "Ada Park"
                              },
                              "authorPrincipalId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`post.created` on a customer's behalf: principal ID of the customer the post is attributed to",
                                "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                              },
                              "authorName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`post.created` on a customer's behalf: display name of that customer",
                                "example": "Ada Park"
                              },
                              "source": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Where the request or vote came from: `call`, `meeting`, `email`, `chat`, `other`, `conversation`, `ticket` or `app`; for `task.created`, `manual` or `rule`",
                                "example": "call"
                              },
                              "commentId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Comment activity: ID of the comment",
                                "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                              },
                              "commentAuthorPrincipalId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`comment.deleted`, `comment.removed` and `comment.restored`: principal ID of the comment's author",
                                "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "`task.create_failed`: why the board rule made no task. `forbidden`: the teammate cannot create tasks in the project. `archived`: the project is archived. `column_missing`: the target column no longer exists. `plan`: the plan does not allow it. `failed`: the task could not be created.",
                                "example": "archived"
                              }
                            },
                            "description": "Details of the activity. Which keys are present depends on `type`; others are absent."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When it happened",
                            "example": "2026-11-20T09:15:42.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "principalId",
                          "actorName",
                          "metadata",
                          "createdAt"
                        ]
                      },
                      "description": "Activity entries of this page"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page; null when this is the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/voters": {
      "get": {
        "operationId": "listQuillsPostVoters",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List a post's voters, newest first",
        "description": "Lists the votes the post's count is made of, newest first, with offset paging: for a merged post, those of the post it was merged into and of the other posts merged into it. Leaves out test customers and votes on posts the caller cannot see. Names come from the principal profile; emails are not returned. importance is how much the voter needs the post, when the voter said so. A vote that a teammate added for the voter has addedByPrincipalId, addedByName and, as sourceType, where the teammate heard it. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "Number of voters to skip before the page starts. Pass the previous response's `nextOffset` to get the next page.",
              "example": 0
            },
            "required": false,
            "description": "Number of voters to skip before the page starts. Pass the previous response's `nextOffset` to get the next page.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of voters to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of voters to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Voters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the voter",
                            "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                          },
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the voter; null for an anonymous voter or a voter without a name",
                            "example": "Ada Park"
                          },
                          "avatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Avatar image URL of the voter; null for an anonymous voter or a voter without one",
                            "example": "https://example.com/avatars/ada.png"
                          },
                          "isAnonymous": {
                            "type": "boolean",
                            "description": "Whether the voter is an anonymous visitor"
                          },
                          "sourceType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Where the teammate who added the vote heard it, such as `call`, `meeting`, `email`, `chat` or `other`; null for a vote the person cast",
                            "example": "call"
                          },
                          "addedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who added the vote for the voter; null for a vote the person cast",
                            "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                          },
                          "addedByName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the teammate who added the vote; null when none did or the teammate has no name",
                            "example": "Sam Rivera"
                          },
                          "importance": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "nice",
                              "important",
                              "critical",
                              null
                            ],
                            "description": "How much the voter needs the post: `nice`, `important` or `critical`; null when the voter did not say",
                            "example": "important"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the vote was cast",
                            "example": "2026-11-18T14:32:05.000Z"
                          }
                        },
                        "required": [
                          "principalId",
                          "displayName",
                          "avatarUrl",
                          "isAnonymous",
                          "sourceType",
                          "addedByPrincipalId",
                          "addedByName",
                          "importance",
                          "createdAt"
                        ]
                      },
                      "description": "Voters of this page"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page; null when this is the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/vote": {
      "put": {
        "operationId": "voteQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Add the caller's vote to a post",
        "description": "Adds the caller's vote. A vote on a merged post goes to the post it was merged into. Idempotent: `changed` is false when the caller had already voted on the post or its merged thread. A new vote raises the vote count and may flag the post for a vote burst. Requires the `quills:update` permission and access to the post's board. Records a `post.voted` event when a vote was added. Does not subscribe the caller to the post.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Vote result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "ID of the post that holds the vote: the requested post, or the post it was merged into",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the request added or removed a vote; false when the vote already was in the requested state"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Vote count of the post that holds the vote, after the request. A test customer's vote is stored but not counted.",
                      "example": 43
                    }
                  },
                  "required": [
                    "postId",
                    "changed",
                    "voteCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/voters/{principalId}": {
      "put": {
        "operationId": "addQuillsPostProxyVote",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Vote on a post on behalf of a person",
        "description": "Adds a vote for another person, for example a customer who asked on a call. A vote on a merged post goes to the post it was merged into. Idempotent: a person has one vote on a post, however it was added, and `changed` is false when the person had already voted. The vote and the post history record the caller as the teammate who added it, and `source`. It does not subscribe the person to the post, as a portal vote does not. Requires the `quills:update` permission and access to the post's board. Records a `post.voted` event with the person and the source when a vote was added.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the voter: a customer, visitor or teammate, not a service principal",
              "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
            },
            "required": true,
            "description": "Principal ID of the voter: a customer, visitor or teammate, not a service principal",
            "name": "principalId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "call",
                "meeting",
                "email",
                "chat",
                "other"
              ],
              "default": "other",
              "description": "Where you heard it: call, meeting, email, chat or other. The post history and the audit log record it."
            },
            "required": false,
            "description": "Where you heard it: call, meeting, email, chat or other. The post history and the audit log record it.",
            "name": "source",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Vote result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "ID of the post that holds the vote: the requested post, or the post it was merged into",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the request added or removed a vote; false when the vote already was in the requested state"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Vote count of the post that holds the vote, after the request. A test customer's vote is stored but not counted.",
                      "example": 43
                    }
                  },
                  "required": [
                    "postId",
                    "changed",
                    "voteCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see, or the voter is not a person of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsPostVote",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Remove a person's vote from a post",
        "description": "Removes the person's vote from the post's thread: the post, the post it was merged into, and the posts merged into that one. Use the caller's own principal ID to remove the caller's vote. Idempotent: `changed` is false when the person had no vote. Requires the `quills:update` permission and access to the post's board. Records a `post.unvoted` event and a `vote.removed` activity entry when a vote was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the voter: a customer, visitor or teammate, not a service principal",
              "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
            },
            "required": true,
            "description": "Principal ID of the voter: a customer, visitor or teammate, not a service principal",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Vote result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "ID of the post that holds the vote: the requested post, or the post it was merged into",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the request added or removed a vote; false when the vote already was in the requested state"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Vote count of the post that holds the vote, after the request. A test customer's vote is stored but not counted.",
                      "example": 43
                    }
                  },
                  "required": [
                    "postId",
                    "changed",
                    "voteCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see, or the voter is not a person of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/comments": {
      "get": {
        "operationId": "listQuillsPostComments",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List a post's comments, oldest first",
        "description": "Lists every comment of the post, oldest first, with offset paging: a flat list where `parentId` builds the thread. Includes internal notes (marked `isPrivate`), pending comments and deleted comments, which keep their place without their text. Requires the `quills:read` permission and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "Number of comments to skip before the page starts. Pass the previous response's `nextOffset` to get the next page.",
              "example": 0
            },
            "required": false,
            "description": "Number of comments to skip before the page starts. Pass the previous response's `nextOffset` to get the next page.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "Maximum number of comments to return in the page",
              "example": 100
            },
            "required": false,
            "description": "Maximum number of comments to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Comments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Comment ID",
                            "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                          },
                          "postId": {
                            "type": "string",
                            "description": "ID of the post the comment is on",
                            "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "parentId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the comment this one replies to; null for a root-level comment",
                            "example": null
                          },
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the author",
                            "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                          },
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the author; null when the author has none",
                            "example": "Sam Rivera"
                          },
                          "authorAvatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Avatar image URL of the author; null when the author has none",
                            "example": "https://example.com/avatars/sam.png"
                          },
                          "content": {
                            "type": "string",
                            "description": "Comment text; empty for a deleted comment",
                            "example": "Thanks! This is planned for the March release."
                          },
                          "isTeamMember": {
                            "type": "boolean",
                            "description": "Whether a teammate wrote the comment"
                          },
                          "isPrivate": {
                            "type": "boolean",
                            "description": "Whether the comment is an internal note that only teammates see"
                          },
                          "moderationState": {
                            "type": "string",
                            "description": "Moderation state. `published`: visible. `pending`: waits for review; a rejected comment stays `pending` and gets `deletedAt`.",
                            "example": "published"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the comment was created",
                            "example": "2026-11-19T08:04:11.000Z"
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the comment was last edited; null when never edited",
                            "example": null
                          },
                          "deletedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the comment was deleted; null when not deleted",
                            "example": null
                          },
                          "isRemovedByTeam": {
                            "type": "boolean",
                            "description": "Whether someone other than the author deleted the comment"
                          },
                          "reactions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "emoji": {
                                  "type": "string",
                                  "description": "The emoji",
                                  "example": "👍"
                                },
                                "count": {
                                  "type": "number",
                                  "description": "Number of people who reacted with this emoji",
                                  "example": 3
                                },
                                "reacted": {
                                  "type": "boolean",
                                  "description": "Whether the caller reacted with this emoji"
                                }
                              },
                              "required": [
                                "emoji",
                                "count",
                                "reacted"
                              ]
                            },
                            "description": "Reaction counts per emoji, sorted by emoji; test customers' reactions are left out"
                          }
                        },
                        "required": [
                          "id",
                          "postId",
                          "parentId",
                          "principalId",
                          "authorName",
                          "authorAvatarUrl",
                          "content",
                          "isTeamMember",
                          "isPrivate",
                          "moderationState",
                          "createdAt",
                          "updatedAt",
                          "deletedAt",
                          "isRemovedByTeam",
                          "reactions"
                        ]
                      },
                      "description": "Comments of this page, oldest first"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page; null when this is the last page",
                      "example": 100
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsComment",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Comment on a post",
        "description": "Adds a published teammate comment; the caller is the author. A reply to an internal comment is internal too. Customer-visible comments require `quills:create`; internal notes also accept `quills:comment_internal` (collaborators), and a collaborator's public comment is 403. The parent must be a comment of the same post. A public comment counts toward the post's comment count (and the count of the post it was merged into) and sets the post's first team response time if not set yet. Records a `comment.created` event, which notifies the post's subscribers who follow comments and may read this one (in the app and by email, per their preferences).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000,
                    "description": "Comment text, 1 to 5,000 characters after trimming",
                    "example": "Thanks! This is planned for the March release."
                  },
                  "parentId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ID of the comment to reply to, on the same post; it may be deleted. Null or absent: a root-level comment.",
                    "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                  },
                  "isPrivate": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the comment is an internal note that only teammates see. Default false; a reply to an internal note is always internal."
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Comment ID",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "postId": {
                      "type": "string",
                      "description": "ID of the post the comment is on",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment this one replies to; null for a root-level comment",
                      "example": null
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Sam Rivera"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/sam.png"
                    },
                    "content": {
                      "type": "string",
                      "description": "Comment text; empty for a deleted comment",
                      "example": "Thanks! This is planned for the March release."
                    },
                    "isTeamMember": {
                      "type": "boolean",
                      "description": "Whether a teammate wrote the comment"
                    },
                    "isPrivate": {
                      "type": "boolean",
                      "description": "Whether the comment is an internal note that only teammates see"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: visible. `pending`: waits for review; a rejected comment stays `pending` and gets `deletedAt`.",
                      "example": "published"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the comment was created",
                      "example": "2026-11-19T08:04:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was last edited; null when never edited",
                      "example": null
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was deleted; null when not deleted",
                      "example": null
                    },
                    "isRemovedByTeam": {
                      "type": "boolean",
                      "description": "Whether someone other than the author deleted the comment"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "The emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reaction counts per emoji, sorted by emoji; test customers' reactions are left out"
                    }
                  },
                  "required": [
                    "id",
                    "postId",
                    "parentId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "content",
                    "isTeamMember",
                    "isPrivate",
                    "moderationState",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "isRemovedByTeam",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see, or the parent comment is not on this post",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/comments/{commentId}": {
      "get": {
        "operationId": "getQuillsComment",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get a comment",
        "description": "Returns one comment with its reaction counts. A deleted comment is 404. Requires the `quills:read` permission and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID, as a TypeID or a UUID",
              "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
            },
            "required": true,
            "description": "Comment ID, as a TypeID or a UUID",
            "name": "commentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Comment ID",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "postId": {
                      "type": "string",
                      "description": "ID of the post the comment is on",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment this one replies to; null for a root-level comment",
                      "example": null
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Sam Rivera"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/sam.png"
                    },
                    "content": {
                      "type": "string",
                      "description": "Comment text; empty for a deleted comment",
                      "example": "Thanks! This is planned for the March release."
                    },
                    "isTeamMember": {
                      "type": "boolean",
                      "description": "Whether a teammate wrote the comment"
                    },
                    "isPrivate": {
                      "type": "boolean",
                      "description": "Whether the comment is an internal note that only teammates see"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: visible. `pending`: waits for review; a rejected comment stays `pending` and gets `deletedAt`.",
                      "example": "published"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the comment was created",
                      "example": "2026-11-19T08:04:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was last edited; null when never edited",
                      "example": null
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was deleted; null when not deleted",
                      "example": null
                    },
                    "isRemovedByTeam": {
                      "type": "boolean",
                      "description": "Whether someone other than the author deleted the comment"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "The emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reaction counts per emoji, sorted by emoji; test customers' reactions are left out"
                    }
                  },
                  "required": [
                    "id",
                    "postId",
                    "parentId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "content",
                    "isTeamMember",
                    "isPrivate",
                    "moderationState",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "isRemovedByTeam",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found or deleted, or its post is deleted or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsComment",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Edit a comment",
        "description": "Replaces a comment's text, including another author's comment. Keeps the previous text in the edit history with the editor, so an edit of another author's comment is recorded as a moderation edit. Replaces any rich-text version of the comment. Requires the `quills:update` permission and access to the post's board. Records a `comment.updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID, as a TypeID or a UUID",
              "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
            },
            "required": true,
            "description": "Comment ID, as a TypeID or a UUID",
            "name": "commentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000,
                    "description": "Comment text, 1 to 5,000 characters after trimming",
                    "example": "Thanks! This is planned for the March release."
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Comment ID",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "postId": {
                      "type": "string",
                      "description": "ID of the post the comment is on",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment this one replies to; null for a root-level comment",
                      "example": null
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Sam Rivera"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/sam.png"
                    },
                    "content": {
                      "type": "string",
                      "description": "Comment text; empty for a deleted comment",
                      "example": "Thanks! This is planned for the March release."
                    },
                    "isTeamMember": {
                      "type": "boolean",
                      "description": "Whether a teammate wrote the comment"
                    },
                    "isPrivate": {
                      "type": "boolean",
                      "description": "Whether the comment is an internal note that only teammates see"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: visible. `pending`: waits for review; a rejected comment stays `pending` and gets `deletedAt`.",
                      "example": "published"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the comment was created",
                      "example": "2026-11-19T08:04:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was last edited; null when never edited",
                      "example": null
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was deleted; null when not deleted",
                      "example": null
                    },
                    "isRemovedByTeam": {
                      "type": "boolean",
                      "description": "Whether someone other than the author deleted the comment"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "The emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reaction counts per emoji, sorted by emoji; test customers' reactions are left out"
                    }
                  },
                  "required": [
                    "id",
                    "postId",
                    "parentId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "content",
                    "isTeamMember",
                    "isPrivate",
                    "moderationState",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "isRemovedByTeam",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found or deleted, or its post is deleted or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsComment",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Delete a comment",
        "description": "Soft-deletes a comment; it keeps its place in the thread without its text. Requires the `quills:update` permission and access to the post's board; another person's comment also needs `quills:delete` (403 otherwise). A pinned comment is unpinned. A counted comment is taken off the post's comment count. Records a `comment.deleted` event and a `comment.deleted` (own comment) or `comment.removed` (another person's) activity entry. Deleting an already deleted comment returns 404.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID, as a TypeID or a UUID",
              "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
            },
            "required": true,
            "description": "Comment ID, as a TypeID or a UUID",
            "name": "commentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Comment ID",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "postId": {
                      "type": "string",
                      "description": "ID of the post the comment is on",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment this one replies to; null for a root-level comment",
                      "example": null
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Sam Rivera"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/sam.png"
                    },
                    "content": {
                      "type": "string",
                      "description": "Comment text; empty for a deleted comment",
                      "example": "Thanks! This is planned for the March release."
                    },
                    "isTeamMember": {
                      "type": "boolean",
                      "description": "Whether a teammate wrote the comment"
                    },
                    "isPrivate": {
                      "type": "boolean",
                      "description": "Whether the comment is an internal note that only teammates see"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: visible. `pending`: waits for review; a rejected comment stays `pending` and gets `deletedAt`.",
                      "example": "published"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the comment was created",
                      "example": "2026-11-19T08:04:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was last edited; null when never edited",
                      "example": null
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was deleted; null when not deleted",
                      "example": null
                    },
                    "isRemovedByTeam": {
                      "type": "boolean",
                      "description": "Whether someone other than the author deleted the comment"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "The emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reaction counts per emoji, sorted by emoji; test customers' reactions are left out"
                    }
                  },
                  "required": [
                    "id",
                    "postId",
                    "parentId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "content",
                    "isTeamMember",
                    "isPrivate",
                    "moderationState",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "isRemovedByTeam",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found or already deleted, or its post is deleted or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/comments/{commentId}/restore": {
      "post": {
        "operationId": "restoreQuillsComment",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Restore a deleted comment",
        "description": "Restores a soft-deleted comment and its text. A counted comment is added back to the post's comment count. It is not pinned again. Requires the `quills:delete` permission and access to the post's board. Records a `comment.restored` event and activity entry.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID, as a TypeID or a UUID",
              "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
            },
            "required": true,
            "description": "Comment ID, as a TypeID or a UUID",
            "name": "commentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Restored comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Comment ID",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "postId": {
                      "type": "string",
                      "description": "ID of the post the comment is on",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "parentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment this one replies to; null for a root-level comment",
                      "example": null
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Sam Rivera"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/sam.png"
                    },
                    "content": {
                      "type": "string",
                      "description": "Comment text; empty for a deleted comment",
                      "example": "Thanks! This is planned for the March release."
                    },
                    "isTeamMember": {
                      "type": "boolean",
                      "description": "Whether a teammate wrote the comment"
                    },
                    "isPrivate": {
                      "type": "boolean",
                      "description": "Whether the comment is an internal note that only teammates see"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: visible. `pending`: waits for review; a rejected comment stays `pending` and gets `deletedAt`.",
                      "example": "published"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the comment was created",
                      "example": "2026-11-19T08:04:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was last edited; null when never edited",
                      "example": null
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the comment was deleted; null when not deleted",
                      "example": null
                    },
                    "isRemovedByTeam": {
                      "type": "boolean",
                      "description": "Whether someone other than the author deleted the comment"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "The emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reaction counts per emoji, sorted by emoji; test customers' reactions are left out"
                    }
                  },
                  "required": [
                    "id",
                    "postId",
                    "parentId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "content",
                    "isTeamMember",
                    "isPrivate",
                    "moderationState",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "isRemovedByTeam",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found, or its post is deleted or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The comment is not deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/pinned-comment/{commentId}": {
      "put": {
        "operationId": "setQuillsCommentPin",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Pin a comment as the post's official response",
        "description": "Pins a comment as the post's official response, replacing the current pin. Only a public, root-level teammate comment can be pinned (409 otherwise). Idempotent: `changed` is false when the comment is already pinned. Requires the `quills:update` permission and access to the post's board. Records a `comment.pinned` event and activity entry when the pin changes.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID, as a TypeID or a UUID",
              "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
            },
            "required": true,
            "description": "Comment ID, as a TypeID or a UUID",
            "name": "commentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Pin result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the request changed the post's pinned comment"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post or comment not found, deleted, or on a board the caller cannot see, or the comment is not on this post",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The comment is a reply, an internal note or not a teammate's comment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsCommentPin",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Unpin a post's pinned comment",
        "description": "Unpins the comment if it is the post's pinned comment; a deleted comment can still be unpinned. Idempotent: `changed` is false when this comment is not the pinned one. Requires the `quills:update` permission and access to the post's board. Records a `comment.unpinned` event and activity entry when the pin changes.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID, as a TypeID or a UUID",
              "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
            },
            "required": true,
            "description": "Comment ID, as a TypeID or a UUID",
            "name": "commentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Pin result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the request changed the post's pinned comment"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post or comment not found, deleted, or on a board the caller cannot see, or the comment is not on this post",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/comments/{commentId}/reactions": {
      "put": {
        "operationId": "setQuillsCommentReaction",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Add the caller's emoji reaction to a comment",
        "description": "Adds the caller's reaction with one emoji. Idempotent: `changed` is false when the caller already reacted with it. Requires the `quills:update` permission and access to the post's board. Records a `comment.reacted` event when a reaction was added.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID, as a TypeID or a UUID",
              "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
            },
            "required": true,
            "description": "Comment ID, as a TypeID or a UUID",
            "name": "commentId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32,
              "description": "A single emoji, including skin-tone, ZWJ, flag and keycap sequences; never free text",
              "example": "👍"
            },
            "required": true,
            "description": "A single emoji, including skin-tone, ZWJ, flag and keycap sequences; never free text",
            "name": "emoji",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Reaction result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the request added or removed a reaction"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "The emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reaction counts per emoji, sorted by emoji; test customers' reactions are left out"
                    }
                  },
                  "required": [
                    "changed",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found or deleted, or its post is deleted or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsCommentReaction",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Remove the caller's emoji reaction from a comment",
        "description": "Removes the caller's reaction with this emoji. Accepts any stored value, so older reactions can be removed. Idempotent: `changed` is false when the caller had no such reaction. Requires the `quills:update` permission and access to the post's board. Records a `comment.unreacted` event when a reaction was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID, as a TypeID or a UUID",
              "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
            },
            "required": true,
            "description": "Comment ID, as a TypeID or a UUID",
            "name": "commentId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32,
              "description": "The emoji of the reaction to remove, as stored",
              "example": "👍"
            },
            "required": true,
            "description": "The emoji of the reaction to remove, as stored",
            "name": "emoji",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Reaction result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the request added or removed a reaction"
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "The emoji",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of people who reacted with this emoji",
                            "example": 3
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller reacted with this emoji"
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Reaction counts per emoji, sorted by emoji; test customers' reactions are left out"
                    }
                  },
                  "required": [
                    "changed",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found or deleted, or its post is deleted or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/feedback/insights": {
      "get": {
        "operationId": "getQuillsFeedbackInsights",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Get topic and sentiment insights for a date range",
        "description": "Returns topic and sentiment insights for posts created in a date range: the most used tags, the sentiment of new posts, weekly post and vote counts, and the posts with the most new votes. Counts only the posts on boards you can see, without deleted posts and test customers. `from` and `to` are UTC days, both included, at most 180 days apart; the default is the last 30 days. Weeks start on Monday (UTC). Tags are the 20 most used on new posts; top posts are the 10 with the most new votes. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "description": "First UTC day of the range, `YYYY-MM-DD`, included. Defaults to 30 days before the day after `to`.",
              "example": "2026-10-01"
            },
            "required": false,
            "description": "First UTC day of the range, `YYYY-MM-DD`, included. Defaults to 30 days before the day after `to`.",
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Last UTC day of the range, `YYYY-MM-DD`, included. Defaults to today.",
              "example": "2026-10-31"
            },
            "required": false,
            "description": "Last UTC day of the range, `YYYY-MM-DD`, included. Defaults to today.",
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts on this board. The caller must be able to see it (404 otherwise).",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9b"
            },
            "required": false,
            "description": "Only posts on this board. The caller must be able to see it (404 otherwise).",
            "name": "boardId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Insights for the range",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "from": {
                      "type": "string",
                      "description": "First UTC day of the range used, `YYYY-MM-DD`",
                      "example": "2026-10-01"
                    },
                    "to": {
                      "type": "string",
                      "description": "Last UTC day of the range used, `YYYY-MM-DD`",
                      "example": "2026-10-31"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3k8m2q5r7t9v1w3x5y7z9e"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Integrations"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code",
                            "example": "#8b5cf6"
                          },
                          "count": {
                            "type": "number",
                            "description": "Posts created in the range with this tag",
                            "example": 14
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "count"
                        ]
                      },
                      "description": "Up to 20 tags most used on posts created in the range, most used first, then by name. Deleted tags are left out."
                    },
                    "sentiment": {
                      "type": "object",
                      "properties": {
                        "positive": {
                          "type": "number",
                          "description": "New posts classified as positive",
                          "example": 9
                        },
                        "neutral": {
                          "type": "number",
                          "description": "New posts classified as neutral",
                          "example": 22
                        },
                        "negative": {
                          "type": "number",
                          "description": "New posts classified as negative",
                          "example": 6
                        }
                      },
                      "required": [
                        "positive",
                        "neutral",
                        "negative"
                      ],
                      "description": "Sentiment of posts created in the range. Posts without a sentiment analysis are not counted."
                    },
                    "weeks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "week": {
                            "type": "string",
                            "description": "UTC Monday that starts the week, `YYYY-MM-DD`",
                            "example": "2026-09-29"
                          },
                          "posts": {
                            "type": "number",
                            "description": "Posts created that week, inside the range",
                            "example": 8
                          },
                          "votes": {
                            "type": "number",
                            "description": "Votes cast that week, inside the range, including votes on merged duplicates",
                            "example": 41
                          }
                        },
                        "required": [
                          "week",
                          "posts",
                          "votes"
                        ]
                      },
                      "description": "One row per week that overlaps the range, oldest first; weeks with no activity have zeros"
                    },
                    "topPosts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Export boards to CSV"
                          },
                          "boardName": {
                            "type": "string",
                            "description": "Name of the post's board",
                            "example": "Feature requests"
                          },
                          "newVotes": {
                            "type": "number",
                            "description": "Votes cast on the post in the range",
                            "example": 17
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "boardName",
                          "newVotes"
                        ]
                      },
                      "description": "Up to 10 posts with the most votes in the range, most first. Merged duplicates are left out."
                    }
                  },
                  "required": [
                    "from",
                    "to",
                    "tags",
                    "sentiment",
                    "weeks",
                    "topPosts"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The range is not valid: `from` is after `to`, or the range is longer than 180 days",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No board with this ID that the caller can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/feedback-signals": {
      "get": {
        "operationId": "listQuillsFeedbackSignals",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the feedback signals",
        "description": "Lists feature requests and bug reports that the autopilot found in closed conversations and resolved tickets, newest first. A signal of a deleted ticket or a test customer is left out. A matched or resulting post is null when its board is not visible to you. Uses offset paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "accepted",
                "dismissed"
              ],
              "default": "pending",
              "description": "Only signals in this status; defaults to `pending`. `pending`: waiting for review. `accepted`: turned into a post or a vote. `dismissed`: rejected; it can be restored to pending."
            },
            "required": false,
            "description": "Only signals in this status; defaults to `pending`. `pending`: waiting for review. `accepted`: turned into a post or a vote. `dismissed`: rejected; it can be restored to pending.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "conversation",
                "ticket"
              ],
              "description": "Only signals found in conversations, or only those found in tickets. Omit it for both."
            },
            "required": false,
            "description": "Only signals found in conversations, or only those found in tickets. Omit it for both.",
            "name": "source",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of signals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Feedback signal ID",
                            "example": "feedback_signal_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "dismissed"
                            ],
                            "description": "`pending`: waiting for review. `accepted`: turned into a post or a vote. `dismissed`: rejected; it can be restored to pending."
                          },
                          "source": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "conversation",
                                  "ticket"
                                ],
                                "description": "`conversation`: found in a closed conversation. `ticket`: found in a resolved ticket."
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the conversation or ticket",
                                "example": "ticket_02k7m9p3r5t8v0w2x4y6z8a1b3"
                              },
                              "title": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The conversation subject or the ticket title, or null when it has none",
                                "example": "Can I export my reports?"
                              },
                              "number": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "The ticket number. Null for a conversation.",
                                "example": 1042
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title",
                              "number"
                            ],
                            "description": "Where the signal was found"
                          },
                          "customer": {
                            "type": "object",
                            "properties": {
                              "principalId": {
                                "type": "string",
                                "description": "Principal ID of the customer",
                                "example": "principal_04n9p1r5t7w0x2y4z6a8b0c3d5"
                              },
                              "displayName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Display name of the customer. Null for an anonymous visitor or when none is known.",
                                "example": "Ada Park"
                              }
                            },
                            "required": [
                              "principalId",
                              "displayName"
                            ],
                            "description": "The customer who made the request"
                          },
                          "excerpt": {
                            "type": "string",
                            "description": "The customer's words that the signal was found in; accepting it as a post makes this the post content",
                            "example": "It would really help if I could export the monthly report to CSV."
                          },
                          "suggestedTitle": {
                            "type": "string",
                            "description": "Suggested title for a new post",
                            "example": "Export reports to CSV"
                          },
                          "matchedPost": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Post ID",
                                "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
                              },
                              "title": {
                                "type": "string",
                                "description": "Post title",
                                "example": "Export to CSV"
                              },
                              "voteCount": {
                                "type": "number",
                                "description": "Number of votes on the post",
                                "example": 18
                              },
                              "boardName": {
                                "type": "string",
                                "description": "Name of the post's board",
                                "example": "Feature requests"
                              },
                              "statusName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Name of the post's status, or null when it has none",
                                "example": "Planned"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "voteCount",
                              "boardName",
                              "statusName"
                            ],
                            "description": "An existing post that the request seems to match. Null when none matched or its board is not visible to the caller."
                          },
                          "resultingPost": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Post ID",
                                "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
                              },
                              "title": {
                                "type": "string",
                                "description": "Post title",
                                "example": "Export to CSV"
                              },
                              "voteCount": {
                                "type": "number",
                                "description": "Number of votes on the post",
                                "example": 18
                              },
                              "boardName": {
                                "type": "string",
                                "description": "Name of the post's board",
                                "example": "Feature requests"
                              },
                              "statusName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Name of the post's status, or null when it has none",
                                "example": "Planned"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "voteCount",
                              "boardName",
                              "statusName"
                            ],
                            "description": "The post that the accepted signal created or voted on. Null before acceptance or when its board is not visible to the caller."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the signal was found",
                            "example": "2026-11-18T14:32:05.000Z"
                          },
                          "decidedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the signal was accepted or dismissed, or null while it is pending",
                            "example": "2026-11-19T10:02:44.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "source",
                          "customer",
                          "excerpt",
                          "suggestedTitle",
                          "matchedPost",
                          "resultingPost",
                          "createdAt",
                          "decidedAt"
                        ]
                      },
                      "description": "Signals on this page, newest first"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset to request the next page with, or null on the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/feedback-signals/{signalId}/post": {
      "post": {
        "operationId": "acceptQuillsFeedbackSignalAsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Accept a signal as a new post",
        "description": "Creates a post on a board that you can see, as createQuillsPost does: the customer is its author and first voter, you are the teammate who tracks it, and the excerpt is its content. The board's custom fields are checked as on createQuillsPost, so a required field needs a value. The post and the decision commit together. 409 when the signal is not pending. Records a `post.created` event that names the customer and the source, and a `signal.accepted` event. Requires the `quills:create` and `quills:update` permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Feedback signal ID",
              "example": "feedback_signal_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Feedback signal ID",
            "name": "signalId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardId": {
                    "type": "string",
                    "description": "ID of a board that the caller can see, for the new post",
                    "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Title of the new post, often the signal's `suggestedTitle`. Leading and trailing spaces are removed.",
                    "example": "Export reports to CSV"
                  },
                  "customFields": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "maxItems": 50
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Values of the board's custom fields, keyed by field key: a string for text, select and date (YYYY-MM-DD), a number, a boolean for a checkbox, and a list of options for multi-select."
                  }
                },
                "required": [
                  "boardId",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The accepted signal and its new post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Feedback signal ID",
                      "example": "feedback_signal_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "dismissed"
                      ],
                      "description": "The signal's new status. `pending`: waiting for review. `accepted`: turned into a post or a vote. `dismissed`: rejected; it can be restored to pending."
                    },
                    "resultingPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post that the signal created or voted on. Null unless the signal was accepted.",
                      "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "resultingPostId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A custom field value is missing, unknown or of the wrong type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Signal not found, its ticket deleted or its customer a test customer; or the board or post not found or not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The signal is not pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/feedback-signals/{signalId}/vote": {
      "post": {
        "operationId": "acceptQuillsFeedbackSignalAsVote",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Accept a signal as a vote on a post",
        "description": "Adds the customer's vote to a post that you can see, usually the matched post, as addQuillsPostProxyVote does: a merged post's vote counts on the post it was merged into, and a vote that exists already is kept (`voteAdded` false). The vote and the decision commit together. 409 when the signal is not pending. Records a `post.voted` event when the vote is new, and a `signal.accepted` event. Requires the `quills:create` and `quills:update` permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Feedback signal ID",
              "example": "feedback_signal_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Feedback signal ID",
            "name": "signalId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postId": {
                    "type": "string",
                    "description": "ID of a post that the caller can see, usually the signal's matched post",
                    "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
                  }
                },
                "required": [
                  "postId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The accepted signal and the post that holds the vote",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Feedback signal ID",
                      "example": "feedback_signal_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "dismissed"
                      ],
                      "description": "The signal's new status. `pending`: waiting for review. `accepted`: turned into a post or a vote. `dismissed`: rejected; it can be restored to pending."
                    },
                    "resultingPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post that the signal created or voted on. Null unless the signal was accepted.",
                      "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
                    },
                    "voteAdded": {
                      "type": "boolean",
                      "description": "True when a new vote was added; false when the customer had already voted"
                    },
                    "voterPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the customer whose vote it is",
                      "example": "principal_04n9p1r5t7w0x2y4z6a8b0c3d5"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "resultingPostId",
                    "voteAdded",
                    "voterPrincipalId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Signal not found, its ticket deleted or its customer a test customer; or the board or post not found or not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The signal is not pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/feedback-signals/{signalId}/dismiss": {
      "post": {
        "operationId": "dismissQuillsFeedbackSignal",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Dismiss a feedback signal",
        "description": "Dismisses a pending signal, recording who decided and when. 409 for a signal that is not pending. Records a `signal.dismissed` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Feedback signal ID",
              "example": "feedback_signal_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Feedback signal ID",
            "name": "signalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The signal's new status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Feedback signal ID",
                      "example": "feedback_signal_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "dismissed"
                      ],
                      "description": "The signal's new status. `pending`: waiting for review. `accepted`: turned into a post or a vote. `dismissed`: rejected; it can be restored to pending."
                    },
                    "resultingPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post that the signal created or voted on. Null unless the signal was accepted.",
                      "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "resultingPostId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Signal not found, its ticket deleted or its customer a test customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The signal is not pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/feedback-signals/{signalId}/restore": {
      "post": {
        "operationId": "restoreQuillsFeedbackSignal",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Restore a dismissed feedback signal",
        "description": "Puts a dismissed signal back in the pending queue and clears its decision time and decider. 409 for a signal that is not dismissed. Records a `signal.restored` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Feedback signal ID",
              "example": "feedback_signal_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Feedback signal ID",
            "name": "signalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The signal's new status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Feedback signal ID",
                      "example": "feedback_signal_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "dismissed"
                      ],
                      "description": "The signal's new status. `pending`: waiting for review. `accepted`: turned into a post or a vote. `dismissed`: rejected; it can be restored to pending."
                    },
                    "resultingPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post that the signal created or voted on. Null unless the signal was accepted.",
                      "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "resultingPostId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Signal not found, its ticket deleted or its customer a test customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The signal is not dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/webhooks": {
      "get": {
        "operationId": "listQuillsWebhooks",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "List Albus webhooks",
        "description": "Lists the workspace's webhooks that aren't deleted, newest first, up to 25 (the most a workspace can have). Signing secrets are never returned. Requires the `manage_settings` permission, because a target URL can carry the receiver's credentials.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhooks without their signing secrets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhooks": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsWebhook"
                      },
                      "description": "The webhooks, newest first."
                    }
                  },
                  "required": [
                    "webhooks"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsWebhook",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Create an Albus webhook",
        "description": "Creates an active webhook for the listed event types and returns its signing secret, which is shown only in this response. The webhook receives only events that occur after it's created. A URL that isn't HTTPS, carries credentials or a fragment, or doesn't resolve to a public address answers 400. A workspace can have at most 25 webhooks. After an event commits, a worker POSTs JSON `{ id, type, createdAt, data }` to the URL: `id` is the event ID, `createdAt` the time it occurred, and `data` holds the event's payload strings plus `entityType` and `entityId`. Headers: `x-kaneo-event` (event type), `x-kaneo-delivery` (delivery ID, the same for every retry of one event; a replay gets a new one), `x-kaneo-timestamp` (Unix seconds) and `x-kaneo-signature` (`sha256=` followed by the hex HMAC-SHA256 of `{timestamp}.{body}`, keyed with the signing secret). A 2xx response counts as delivered. A 408, 429 or 5xx response, or a host that can't be resolved, is retried, for up to 10 attempts over about a day; other HTTP statuses and private addresses fail at once. A timeout (5 seconds) or a dropped connection is not retried, because the receiver may have processed the request. Private comments are never delivered. After 10 failed attempts in a row, a `webhook.failing` event is recorded, at most once a day. Records a `webhook.created` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "URL that receives the deliveries, up to 2,048 characters. Must use HTTPS (plain HTTP is accepted only outside production), carry no user name, password or fragment, and resolve to a public address.",
                    "example": "https://hooks.example.com/support"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "board.project_linked",
                        "board.project_unlinked",
                        "post.task_linked",
                        "post.task_unlinked",
                        "post.task_create_failed",
                        "post.update_sent",
                        "team.bound",
                        "team.unbound",
                        "workspace.imported",
                        "user.created",
                        "user.identified",
                        "user.contact_email_code_requested",
                        "user.updated",
                        "user.deleted",
                        "user.lead_merged",
                        "user.merged",
                        "user.merge_undone",
                        "contact_identity.added",
                        "contact_identity.removed",
                        "user.tagged",
                        "user.untagged",
                        "user.blocked",
                        "conversation.ip_blocked",
                        "conversation.ip_unblocked",
                        "spam_block.created",
                        "spam_block.deleted",
                        "conversation.requester_changed",
                        "conversation.breach_update_sent",
                        "conversation.solution_offered",
                        "request_link.revoked",
                        "settings.reopen_policy_updated",
                        "settings.csat_updated",
                        "settings.notification_defaults_updated",
                        "csat.low",
                        "webhook.failing",
                        "webhook.replay_requested",
                        "brand.created",
                        "brand.updated",
                        "brand.deleted",
                        "email_template.updated",
                        "notification.digest_sent",
                        "user.unblocked",
                        "user.company_set",
                        "user.company_removed",
                        "company.created",
                        "company.updated",
                        "company.deleted",
                        "company.imported",
                        "user_attribute.created",
                        "user_attribute.updated",
                        "user_attribute.deleted",
                        "company_attribute.created",
                        "company_attribute.updated",
                        "company_attribute.deleted",
                        "segment.created",
                        "segment.updated",
                        "segment.deleted",
                        "segment.members_added",
                        "segment.members_removed",
                        "segment.evaluated",
                        "segment.evaluated_all",
                        "team.updated",
                        "team.deleted",
                        "settings.portal_updated",
                        "settings.branding_updated",
                        "settings.widget_updated",
                        "settings.widget_secret_rotated",
                        "settings.widget_install_code_minted",
                        "settings.developer_updated",
                        "settings.labs_updated",
                        "file.created",
                        "file.deleted",
                        "settings.logo_updated",
                        "settings.logo_removed",
                        "settings.favicon_updated",
                        "settings.favicon_removed",
                        "settings.header_logo_updated",
                        "settings.header_logo_removed",
                        "board.created",
                        "board.updated",
                        "board.deleted",
                        "post.created",
                        "post.updated",
                        "post.status_changed",
                        "post.moved",
                        "post.owner_changed",
                        "post.tags_changed",
                        "post.deleted",
                        "post.restored",
                        "post.voted",
                        "post.unvoted",
                        "comment.created",
                        "comment.updated",
                        "comment.deleted",
                        "comment.restored",
                        "comment.pinned",
                        "comment.unpinned",
                        "comment.reacted",
                        "comment.unreacted",
                        "webhook.created",
                        "webhook.updated",
                        "webhook.deleted",
                        "webhook.secret_rotated",
                        "post.subscription_changed",
                        "changelog.subscription_changed",
                        "changelog.subscribers_imported",
                        "tag.created",
                        "tag.updated",
                        "tag.deleted",
                        "status.created",
                        "status.updated",
                        "status.deleted",
                        "status.reordered",
                        "roadmap.created",
                        "roadmap.updated",
                        "roadmap.deleted",
                        "roadmap.reordered",
                        "roadmap.column_created",
                        "roadmap.column_updated",
                        "roadmap.column_deleted",
                        "changelog.created",
                        "changelog.updated",
                        "changelog.published",
                        "changelog.deleted",
                        "changelog.translation_saved",
                        "changelog.translation_deleted",
                        "changelog.category_created",
                        "changelog.category_updated",
                        "changelog.category_deleted",
                        "changelog.category_reordered",
                        "settings.changelog_updated",
                        "settings.moderation_updated",
                        "post.approved",
                        "post.rejected",
                        "comment.approved",
                        "comment.rejected",
                        "post.merged",
                        "post.unmerged",
                        "post_view.created",
                        "post_view.deleted",
                        "settings.portal_access_updated",
                        "settings.portal_sign_in_updated",
                        "settings.widget_install_code_redeemed",
                        "portal.access_denied",
                        "customer.profile_updated",
                        "customer.profile_unlinked",
                        "help_center.category_created",
                        "help_center.category_updated",
                        "help_center.category_deleted",
                        "help_center.category_restored",
                        "help_center.categories_reordered",
                        "help_center.category_translation_saved",
                        "help_center.category_translation_deleted",
                        "help_center.article_created",
                        "help_center.article_updated",
                        "help_center.article_published",
                        "help_center.article_unpublished",
                        "help_center.article_deleted",
                        "help_center.article_restored",
                        "help_center.articles_reordered",
                        "help_center.article_feedback_recorded",
                        "help_center.article_feedback_reason_added",
                        "help_center.article_translation_saved",
                        "help_center.article_translation_status_changed",
                        "help_center.article_translation_deleted",
                        "help_center.redirect_rule_created",
                        "help_center.redirect_rule_deleted",
                        "settings.help_center_updated",
                        "settings.status_updated",
                        "status.component_created",
                        "status.component_updated",
                        "status.component_changed",
                        "status.component_deleted",
                        "status.components_reordered",
                        "status.group_created",
                        "status.group_updated",
                        "status.group_deleted",
                        "status.groups_reordered",
                        "status.history_cleared",
                        "status.incident_published",
                        "status.incident_created",
                        "status.incident_updated",
                        "status.incident_update_posted",
                        "status.incident_resolved",
                        "status.incident_deleted",
                        "status.maintenance_started",
                        "status.template_created",
                        "status.template_updated",
                        "status.template_deleted",
                        "status.subscriber_added",
                        "status.subscribers_imported",
                        "status.subscriber_removed",
                        "status.subscribed",
                        "status.unsubscribed",
                        "integration.connected",
                        "integration.updated",
                        "integration.deleted",
                        "integration.channel_added",
                        "integration.channel_updated",
                        "integration.channel_removed",
                        "integration_sync.recovered",
                        "post.integration_sync_requested",
                        "custom_domain.set",
                        "custom_domain.removed",
                        "custom_domain.verification_requested",
                        "settings.powered_by_updated",
                        "custom_domain.checked",
                        "workspace.wipe_requested",
                        "workspace.wiped",
                        "ticket.created",
                        "ticket.status_changed",
                        "ticket.priority_changed",
                        "ticket.assigned",
                        "ticket.bulk_updated",
                        "ticket.note_added",
                        "ticket.replied",
                        "ticket.watcher_added",
                        "ticket.watcher_removed",
                        "ticket.tracker_linked",
                        "ticket.tracker_unlinked",
                        "ticket.conversation_linked",
                        "ticket.external_linked",
                        "ticket.external_unlinked",
                        "ticket.issue_requested",
                        "ticket_status.created",
                        "ticket_status.updated",
                        "ticket_status.deleted",
                        "ticket_status.reordered",
                        "ticket_type.created",
                        "ticket_type.updated",
                        "ticket_type.archived",
                        "ticket_type.restored",
                        "macro.created",
                        "macro.updated",
                        "macro.deleted",
                        "macro.applied",
                        "sla_policy.created",
                        "sla_policy.updated",
                        "sla_policy.archived",
                        "sla_policy.restored",
                        "settings.ticket_stage_labels_updated",
                        "settings.default_sla_policy_updated",
                        "settings.office_hours_updated",
                        "settings.conversation_routing_updated",
                        "settings.email_auto_ack_updated",
                        "settings.away_reply_updated",
                        "settings.spam_filter_updated",
                        "settings.undo_send_updated",
                        "channel_account.inbound_updated",
                        "channel_account.sending_address_saved",
                        "channel_account.smtp_updated",
                        "channel_account.deleted",
                        "sending_domain.deleted",
                        "sending_domain.checks_restarted",
                        "conversation.status_changed",
                        "conversation.assigned",
                        "conversation.priority_changed",
                        "conversation.attribute_changed",
                        "conversation.tags_changed",
                        "conversation.read",
                        "conversation.updated",
                        "conversation.participant_added",
                        "conversation.participant_removed",
                        "conversation.bulk_updated",
                        "conversation.merged",
                        "conversation.merge_undone",
                        "conversation.deleted",
                        "ticket.merged",
                        "ticket.merge_undone",
                        "message.created",
                        "message.send_scheduled",
                        "message.send_recalled",
                        "message.note_created",
                        "message.updated",
                        "message.note_updated",
                        "message.deleted",
                        "message.note_deleted",
                        "message.reacted",
                        "message.unreacted",
                        "conversation_tag.created",
                        "conversation_tag.updated",
                        "conversation_tag.archived",
                        "conversation_tag.restored",
                        "conversation_tag.deleted",
                        "conversation_attribute.created",
                        "conversation_attribute.updated",
                        "conversation_attribute.archived",
                        "conversation_attribute.restored",
                        "conversation_view.created",
                        "conversation_view.updated",
                        "conversation_view.deleted",
                        "agent.availability_changed",
                        "portal.invite_sent",
                        "portal.invite_resent",
                        "portal.invite_canceled",
                        "portal.invite_link_created",
                        "portal.invite_accepted",
                        "settings.widget_hero_image_updated",
                        "settings.widget_hero_image_removed",
                        "export.requested",
                        "export.finished",
                        "import.requested",
                        "import.finished",
                        "workflow.created",
                        "workflow.updated",
                        "workflow.deleted",
                        "workflow.reordered",
                        "workflow.published",
                        "workflow.paused",
                        "workflow.version_restored",
                        "workflow.run_requested",
                        "settings.workflow_abandoned_auto_close_updated",
                        "settings.workflow_close_spam_updated",
                        "settings.assistant_updated",
                        "assistant_guidance.created",
                        "assistant_guidance.updated",
                        "assistant_guidance.deleted",
                        "assistant_guidance.reordered",
                        "assistant_snippet.created",
                        "assistant_snippet.updated",
                        "assistant_snippet.deleted",
                        "assistant_skill.created",
                        "assistant_skill.updated",
                        "assistant_skill.deleted",
                        "assistant_web_source.added",
                        "assistant_web_source.updated",
                        "assistant_web_source.deleted",
                        "assistant_web_source.fetched",
                        "assistant_document.created",
                        "assistant_document.deleted",
                        "assistant_connector.deleted",
                        "assistant_run.requested",
                        "assistant_run.completed",
                        "assistant_action.proposed",
                        "assistant_action.approved",
                        "assistant_action.rejected",
                        "assistant_action.completed",
                        "assistant.embeddings_requested",
                        "merge_suggestion.dismissed",
                        "merge_suggestion.restored",
                        "knowledge_suggestion.created",
                        "knowledge_suggestion.attached",
                        "knowledge_suggestion.answered",
                        "knowledge_suggestion.drafted",
                        "knowledge_suggestion.updated",
                        "knowledge_suggestion.approved",
                        "knowledge_suggestion.dismissed",
                        "post.merge_check_requested",
                        "post.sentiment_requested",
                        "post.tags_backfill_requested",
                        "conversation.summary_requested",
                        "conversation.summarized",
                        "conversation.post_unlinked",
                        "ticket.summary_requested",
                        "ticket.summarized",
                        "help_center.article_translation_requested",
                        "conversation.created",
                        "conversation.csat_submitted",
                        "integration.platform_credentials_saved",
                        "integration.platform_credentials_deleted",
                        "integration.status_sync_enabled",
                        "integration.status_sync_disabled",
                        "integration.status_mappings_updated",
                        "conversation.email_received",
                        "assistant_connector.created",
                        "assistant_connector.updated",
                        "assistant_connector.refreshed",
                        "assistant_connector.connected",
                        "slack_agent.settings_updated",
                        "github_inbox.settings_updated",
                        "github_inbox.message_retried",
                        "integration.hook_received",
                        "conversation.agent_started",
                        "app.post_linked",
                        "app.post_unlinked",
                        "app.post_created",
                        "app.registered",
                        "app.updated",
                        "branding.auto_started",
                        "branding.offer_accepted",
                        "branding.offer_declined",
                        "branding.auto_undone",
                        "settings.undone",
                        "conversation.test_deleted",
                        "signal.created",
                        "signal.accepted",
                        "signal.dismissed",
                        "signal.restored",
                        "survey.created",
                        "survey.updated",
                        "survey.closed",
                        "survey.responded",
                        "post.scored",
                        "settings.scoring_updated",
                        "post.vote_importance_set",
                        "changelog.reacted",
                        "changelog.unreacted",
                        "board.settings_updated",
                        "survey.deleted",
                        "settings.ai_budget_updated",
                        "settings.ai_provider_keys_updated",
                        "assistant.resolution_feedback_recorded",
                        "help_center.article_freshness_updated",
                        "help_center.article_reviewed",
                        "help_center.article_stale_flagged",
                        "help_center.search_synonym_created",
                        "help_center.search_synonym_deleted",
                        "export_schedule.updated",
                        "export_schedule.deleted",
                        "settings.preset_applied",
                        "settings.setup_state_updated",
                        "privacy.customer_erased",
                        "privacy.access_requested",
                        "privacy.access_completed",
                        "privacy.retention_updated",
                        "message.redacted",
                        "assistant_decline_topic.created",
                        "assistant_decline_topic.updated",
                        "assistant_decline_topic.deleted",
                        "assistant_eval.recorded",
                        "assistant_draft.created",
                        "assistant_draft.sent",
                        "assistant_draft.dismissed",
                        "conversation.handed_off",
                        "release.verified",
                        "release.shipped",
                        "ticket.post_linked"
                      ],
                      "description": "An event type that a webhook can subscribe to.",
                      "example": "conversation.created"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Event types the webhook receives, from 1 to 50. Duplicates are removed. Internal types such as `webhook.failing`, `webhook.replay_requested` and `notification.digest_sent` are refused.",
                    "example": [
                      "post.created",
                      "post.status_changed",
                      "comment.created"
                    ]
                  },
                  "boardIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
                      "example": "board_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Board filter, up to 50 board IDs (TypeIDs or UUIDs). Each must be a live board of the workspace. When set, events about posts and comments on other boards are not delivered; events that aren't about a board are always delivered. An empty list means no filter.",
                    "example": [
                      "board_01m8rz8mp3eshrhd0rsxjkejgn"
                    ]
                  }
                },
                "required": [
                  "url",
                  "events"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The webhook and its signing secret, shown only here",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhook": {
                      "$ref": "#/components/schemas/QuillsWebhook"
                    },
                    "secret": {
                      "type": "string",
                      "description": "Signing secret of the webhook: 32 random bytes, base64url-encoded. Shown only in this response and stored encrypted. Verify each delivery by computing the hex HMAC-SHA256 of `{x-kaneo-timestamp}.{raw body}` with this secret and comparing it to the `x-kaneo-signature` header after its `sha256=` prefix.",
                      "example": "ZXhhbXBsZS1zaWduaW5nLXNlY3JldC1ub3QtcmVhbCE"
                    }
                  },
                  "required": [
                    "webhook",
                    "secret"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A `boardIds` entry is not a live board of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "NOTIFICATION_SECRET_ENCRYPTION_KEY is not set, so no signing secret can be stored, or the workspace already has 25 webhooks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/webhooks/{webhookId}": {
      "get": {
        "operationId": "getQuillsWebhook",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Get an Albus webhook",
        "description": "Returns one webhook without its signing secret. A deleted webhook answers 404. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Webhook ID. Accepts the TypeID or its UUID.",
              "example": "webhook_01m8rz8mp2eshrhd0a8nhmyenk"
            },
            "required": true,
            "description": "Webhook ID. Accepts the TypeID or its UUID.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The webhook without its signing secret",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhook": {
                      "$ref": "#/components/schemas/QuillsWebhook"
                    }
                  },
                  "required": [
                    "webhook"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No webhook with this ID in the workspace, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsWebhook",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Update an Albus webhook",
        "description": "Changes the fields that the request sends and keeps the others; at least one is required. A new URL is checked as on create and answers 400 when refused. `boardIds` set to null or an empty list removes the board filter. A disabled webhook gets no new deliveries, and its queued deliveries are skipped. Setting `status` to `active` also resets `failureCount` to 0 and clears `lastError`. Records a `webhook.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Webhook ID. Accepts the TypeID or its UUID.",
              "example": "webhook_01m8rz8mp2eshrhd0a8nhmyenk"
            },
            "required": true,
            "description": "Webhook ID. Accepts the TypeID or its UUID.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "URL that receives the deliveries, up to 2,048 characters. Must use HTTPS (plain HTTP is accepted only outside production), carry no user name, password or fragment, and resolve to a public address.",
                    "example": "https://hooks.example.com/support"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "board.project_linked",
                        "board.project_unlinked",
                        "post.task_linked",
                        "post.task_unlinked",
                        "post.task_create_failed",
                        "post.update_sent",
                        "team.bound",
                        "team.unbound",
                        "workspace.imported",
                        "user.created",
                        "user.identified",
                        "user.contact_email_code_requested",
                        "user.updated",
                        "user.deleted",
                        "user.lead_merged",
                        "user.merged",
                        "user.merge_undone",
                        "contact_identity.added",
                        "contact_identity.removed",
                        "user.tagged",
                        "user.untagged",
                        "user.blocked",
                        "conversation.ip_blocked",
                        "conversation.ip_unblocked",
                        "spam_block.created",
                        "spam_block.deleted",
                        "conversation.requester_changed",
                        "conversation.breach_update_sent",
                        "conversation.solution_offered",
                        "request_link.revoked",
                        "settings.reopen_policy_updated",
                        "settings.csat_updated",
                        "settings.notification_defaults_updated",
                        "csat.low",
                        "webhook.failing",
                        "webhook.replay_requested",
                        "brand.created",
                        "brand.updated",
                        "brand.deleted",
                        "email_template.updated",
                        "notification.digest_sent",
                        "user.unblocked",
                        "user.company_set",
                        "user.company_removed",
                        "company.created",
                        "company.updated",
                        "company.deleted",
                        "company.imported",
                        "user_attribute.created",
                        "user_attribute.updated",
                        "user_attribute.deleted",
                        "company_attribute.created",
                        "company_attribute.updated",
                        "company_attribute.deleted",
                        "segment.created",
                        "segment.updated",
                        "segment.deleted",
                        "segment.members_added",
                        "segment.members_removed",
                        "segment.evaluated",
                        "segment.evaluated_all",
                        "team.updated",
                        "team.deleted",
                        "settings.portal_updated",
                        "settings.branding_updated",
                        "settings.widget_updated",
                        "settings.widget_secret_rotated",
                        "settings.widget_install_code_minted",
                        "settings.developer_updated",
                        "settings.labs_updated",
                        "file.created",
                        "file.deleted",
                        "settings.logo_updated",
                        "settings.logo_removed",
                        "settings.favicon_updated",
                        "settings.favicon_removed",
                        "settings.header_logo_updated",
                        "settings.header_logo_removed",
                        "board.created",
                        "board.updated",
                        "board.deleted",
                        "post.created",
                        "post.updated",
                        "post.status_changed",
                        "post.moved",
                        "post.owner_changed",
                        "post.tags_changed",
                        "post.deleted",
                        "post.restored",
                        "post.voted",
                        "post.unvoted",
                        "comment.created",
                        "comment.updated",
                        "comment.deleted",
                        "comment.restored",
                        "comment.pinned",
                        "comment.unpinned",
                        "comment.reacted",
                        "comment.unreacted",
                        "webhook.created",
                        "webhook.updated",
                        "webhook.deleted",
                        "webhook.secret_rotated",
                        "post.subscription_changed",
                        "changelog.subscription_changed",
                        "changelog.subscribers_imported",
                        "tag.created",
                        "tag.updated",
                        "tag.deleted",
                        "status.created",
                        "status.updated",
                        "status.deleted",
                        "status.reordered",
                        "roadmap.created",
                        "roadmap.updated",
                        "roadmap.deleted",
                        "roadmap.reordered",
                        "roadmap.column_created",
                        "roadmap.column_updated",
                        "roadmap.column_deleted",
                        "changelog.created",
                        "changelog.updated",
                        "changelog.published",
                        "changelog.deleted",
                        "changelog.translation_saved",
                        "changelog.translation_deleted",
                        "changelog.category_created",
                        "changelog.category_updated",
                        "changelog.category_deleted",
                        "changelog.category_reordered",
                        "settings.changelog_updated",
                        "settings.moderation_updated",
                        "post.approved",
                        "post.rejected",
                        "comment.approved",
                        "comment.rejected",
                        "post.merged",
                        "post.unmerged",
                        "post_view.created",
                        "post_view.deleted",
                        "settings.portal_access_updated",
                        "settings.portal_sign_in_updated",
                        "settings.widget_install_code_redeemed",
                        "portal.access_denied",
                        "customer.profile_updated",
                        "customer.profile_unlinked",
                        "help_center.category_created",
                        "help_center.category_updated",
                        "help_center.category_deleted",
                        "help_center.category_restored",
                        "help_center.categories_reordered",
                        "help_center.category_translation_saved",
                        "help_center.category_translation_deleted",
                        "help_center.article_created",
                        "help_center.article_updated",
                        "help_center.article_published",
                        "help_center.article_unpublished",
                        "help_center.article_deleted",
                        "help_center.article_restored",
                        "help_center.articles_reordered",
                        "help_center.article_feedback_recorded",
                        "help_center.article_feedback_reason_added",
                        "help_center.article_translation_saved",
                        "help_center.article_translation_status_changed",
                        "help_center.article_translation_deleted",
                        "help_center.redirect_rule_created",
                        "help_center.redirect_rule_deleted",
                        "settings.help_center_updated",
                        "settings.status_updated",
                        "status.component_created",
                        "status.component_updated",
                        "status.component_changed",
                        "status.component_deleted",
                        "status.components_reordered",
                        "status.group_created",
                        "status.group_updated",
                        "status.group_deleted",
                        "status.groups_reordered",
                        "status.history_cleared",
                        "status.incident_published",
                        "status.incident_created",
                        "status.incident_updated",
                        "status.incident_update_posted",
                        "status.incident_resolved",
                        "status.incident_deleted",
                        "status.maintenance_started",
                        "status.template_created",
                        "status.template_updated",
                        "status.template_deleted",
                        "status.subscriber_added",
                        "status.subscribers_imported",
                        "status.subscriber_removed",
                        "status.subscribed",
                        "status.unsubscribed",
                        "integration.connected",
                        "integration.updated",
                        "integration.deleted",
                        "integration.channel_added",
                        "integration.channel_updated",
                        "integration.channel_removed",
                        "integration_sync.recovered",
                        "post.integration_sync_requested",
                        "custom_domain.set",
                        "custom_domain.removed",
                        "custom_domain.verification_requested",
                        "settings.powered_by_updated",
                        "custom_domain.checked",
                        "workspace.wipe_requested",
                        "workspace.wiped",
                        "ticket.created",
                        "ticket.status_changed",
                        "ticket.priority_changed",
                        "ticket.assigned",
                        "ticket.bulk_updated",
                        "ticket.note_added",
                        "ticket.replied",
                        "ticket.watcher_added",
                        "ticket.watcher_removed",
                        "ticket.tracker_linked",
                        "ticket.tracker_unlinked",
                        "ticket.conversation_linked",
                        "ticket.external_linked",
                        "ticket.external_unlinked",
                        "ticket.issue_requested",
                        "ticket_status.created",
                        "ticket_status.updated",
                        "ticket_status.deleted",
                        "ticket_status.reordered",
                        "ticket_type.created",
                        "ticket_type.updated",
                        "ticket_type.archived",
                        "ticket_type.restored",
                        "macro.created",
                        "macro.updated",
                        "macro.deleted",
                        "macro.applied",
                        "sla_policy.created",
                        "sla_policy.updated",
                        "sla_policy.archived",
                        "sla_policy.restored",
                        "settings.ticket_stage_labels_updated",
                        "settings.default_sla_policy_updated",
                        "settings.office_hours_updated",
                        "settings.conversation_routing_updated",
                        "settings.email_auto_ack_updated",
                        "settings.away_reply_updated",
                        "settings.spam_filter_updated",
                        "settings.undo_send_updated",
                        "channel_account.inbound_updated",
                        "channel_account.sending_address_saved",
                        "channel_account.smtp_updated",
                        "channel_account.deleted",
                        "sending_domain.deleted",
                        "sending_domain.checks_restarted",
                        "conversation.status_changed",
                        "conversation.assigned",
                        "conversation.priority_changed",
                        "conversation.attribute_changed",
                        "conversation.tags_changed",
                        "conversation.read",
                        "conversation.updated",
                        "conversation.participant_added",
                        "conversation.participant_removed",
                        "conversation.bulk_updated",
                        "conversation.merged",
                        "conversation.merge_undone",
                        "conversation.deleted",
                        "ticket.merged",
                        "ticket.merge_undone",
                        "message.created",
                        "message.send_scheduled",
                        "message.send_recalled",
                        "message.note_created",
                        "message.updated",
                        "message.note_updated",
                        "message.deleted",
                        "message.note_deleted",
                        "message.reacted",
                        "message.unreacted",
                        "conversation_tag.created",
                        "conversation_tag.updated",
                        "conversation_tag.archived",
                        "conversation_tag.restored",
                        "conversation_tag.deleted",
                        "conversation_attribute.created",
                        "conversation_attribute.updated",
                        "conversation_attribute.archived",
                        "conversation_attribute.restored",
                        "conversation_view.created",
                        "conversation_view.updated",
                        "conversation_view.deleted",
                        "agent.availability_changed",
                        "portal.invite_sent",
                        "portal.invite_resent",
                        "portal.invite_canceled",
                        "portal.invite_link_created",
                        "portal.invite_accepted",
                        "settings.widget_hero_image_updated",
                        "settings.widget_hero_image_removed",
                        "export.requested",
                        "export.finished",
                        "import.requested",
                        "import.finished",
                        "workflow.created",
                        "workflow.updated",
                        "workflow.deleted",
                        "workflow.reordered",
                        "workflow.published",
                        "workflow.paused",
                        "workflow.version_restored",
                        "workflow.run_requested",
                        "settings.workflow_abandoned_auto_close_updated",
                        "settings.workflow_close_spam_updated",
                        "settings.assistant_updated",
                        "assistant_guidance.created",
                        "assistant_guidance.updated",
                        "assistant_guidance.deleted",
                        "assistant_guidance.reordered",
                        "assistant_snippet.created",
                        "assistant_snippet.updated",
                        "assistant_snippet.deleted",
                        "assistant_skill.created",
                        "assistant_skill.updated",
                        "assistant_skill.deleted",
                        "assistant_web_source.added",
                        "assistant_web_source.updated",
                        "assistant_web_source.deleted",
                        "assistant_web_source.fetched",
                        "assistant_document.created",
                        "assistant_document.deleted",
                        "assistant_connector.deleted",
                        "assistant_run.requested",
                        "assistant_run.completed",
                        "assistant_action.proposed",
                        "assistant_action.approved",
                        "assistant_action.rejected",
                        "assistant_action.completed",
                        "assistant.embeddings_requested",
                        "merge_suggestion.dismissed",
                        "merge_suggestion.restored",
                        "knowledge_suggestion.created",
                        "knowledge_suggestion.attached",
                        "knowledge_suggestion.answered",
                        "knowledge_suggestion.drafted",
                        "knowledge_suggestion.updated",
                        "knowledge_suggestion.approved",
                        "knowledge_suggestion.dismissed",
                        "post.merge_check_requested",
                        "post.sentiment_requested",
                        "post.tags_backfill_requested",
                        "conversation.summary_requested",
                        "conversation.summarized",
                        "conversation.post_unlinked",
                        "ticket.summary_requested",
                        "ticket.summarized",
                        "help_center.article_translation_requested",
                        "conversation.created",
                        "conversation.csat_submitted",
                        "integration.platform_credentials_saved",
                        "integration.platform_credentials_deleted",
                        "integration.status_sync_enabled",
                        "integration.status_sync_disabled",
                        "integration.status_mappings_updated",
                        "conversation.email_received",
                        "assistant_connector.created",
                        "assistant_connector.updated",
                        "assistant_connector.refreshed",
                        "assistant_connector.connected",
                        "slack_agent.settings_updated",
                        "github_inbox.settings_updated",
                        "github_inbox.message_retried",
                        "integration.hook_received",
                        "conversation.agent_started",
                        "app.post_linked",
                        "app.post_unlinked",
                        "app.post_created",
                        "app.registered",
                        "app.updated",
                        "branding.auto_started",
                        "branding.offer_accepted",
                        "branding.offer_declined",
                        "branding.auto_undone",
                        "settings.undone",
                        "conversation.test_deleted",
                        "signal.created",
                        "signal.accepted",
                        "signal.dismissed",
                        "signal.restored",
                        "survey.created",
                        "survey.updated",
                        "survey.closed",
                        "survey.responded",
                        "post.scored",
                        "settings.scoring_updated",
                        "post.vote_importance_set",
                        "changelog.reacted",
                        "changelog.unreacted",
                        "board.settings_updated",
                        "survey.deleted",
                        "settings.ai_budget_updated",
                        "settings.ai_provider_keys_updated",
                        "assistant.resolution_feedback_recorded",
                        "help_center.article_freshness_updated",
                        "help_center.article_reviewed",
                        "help_center.article_stale_flagged",
                        "help_center.search_synonym_created",
                        "help_center.search_synonym_deleted",
                        "export_schedule.updated",
                        "export_schedule.deleted",
                        "settings.preset_applied",
                        "settings.setup_state_updated",
                        "privacy.customer_erased",
                        "privacy.access_requested",
                        "privacy.access_completed",
                        "privacy.retention_updated",
                        "message.redacted",
                        "assistant_decline_topic.created",
                        "assistant_decline_topic.updated",
                        "assistant_decline_topic.deleted",
                        "assistant_eval.recorded",
                        "assistant_draft.created",
                        "assistant_draft.sent",
                        "assistant_draft.dismissed",
                        "conversation.handed_off",
                        "release.verified",
                        "release.shipped",
                        "ticket.post_linked"
                      ],
                      "description": "An event type that a webhook can subscribe to.",
                      "example": "conversation.created"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Event types the webhook receives, from 1 to 50. Duplicates are removed. Internal types such as `webhook.failing`, `webhook.replay_requested` and `notification.digest_sent` are refused.",
                    "example": [
                      "post.created",
                      "post.status_changed",
                      "comment.created"
                    ]
                  },
                  "boardIds": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
                      "example": "board_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Board filter, up to 50 board IDs (TypeIDs or UUIDs). Each must be a live board of the workspace. When set, events about posts and comments on other boards are not delivered; events that aren't about a board are always delivered. An empty list means no filter.",
                    "example": [
                      "board_01m8rz8mp3eshrhd0rsxjkejgn"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "disabled"
                    ],
                    "description": "New delivery state. `active`: turns deliveries on and resets the failure count; `disabled`: stops deliveries.",
                    "example": "active"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated webhook",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhook": {
                      "$ref": "#/components/schemas/QuillsWebhook"
                    }
                  },
                  "required": [
                    "webhook"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No webhook with this ID in the workspace, or it was deleted; or a `boardIds` entry is not a live board of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsWebhook",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Delete an Albus webhook",
        "description": "Soft-deletes the webhook: it no longer appears in the API, gets no new deliveries, and its queued deliveries are skipped. Deleting it again answers 404. Records a `webhook.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Webhook ID. Accepts the TypeID or its UUID.",
              "example": "webhook_01m8rz8mp2eshrhd0a8nhmyenk"
            },
            "required": true,
            "description": "Webhook ID. Accepts the TypeID or its UUID.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "description": "Always `true` when the webhook was deleted.",
                      "example": true
                    }
                  },
                  "required": [
                    "deleted"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No webhook with this ID in the workspace, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/webhooks/{webhookId}/rotate": {
      "post": {
        "operationId": "rotateQuillsWebhookSecret",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Rotate an Albus webhook signing secret",
        "description": "Replaces the webhook's signing secret and returns the new one, which is shown only in this response. Every delivery sent after this, including queued retries, is signed with the new secret, so update the receiver right away. Works for a disabled webhook too. Records a `webhook.secret_rotated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Webhook ID. Accepts the TypeID or its UUID.",
              "example": "webhook_01m8rz8mp2eshrhd0a8nhmyenk"
            },
            "required": true,
            "description": "Webhook ID. Accepts the TypeID or its UUID.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The webhook and its new signing secret, shown only here",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhook": {
                      "$ref": "#/components/schemas/QuillsWebhook"
                    },
                    "secret": {
                      "type": "string",
                      "description": "Signing secret of the webhook: 32 random bytes, base64url-encoded. Shown only in this response and stored encrypted. Verify each delivery by computing the hex HMAC-SHA256 of `{x-kaneo-timestamp}.{raw body}` with this secret and comparing it to the `x-kaneo-signature` header after its `sha256=` prefix.",
                      "example": "ZXhhbXBsZS1zaWduaW5nLXNlY3JldC1ub3QtcmVhbCE"
                    }
                  },
                  "required": [
                    "webhook",
                    "secret"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No webhook with this ID in the workspace, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "NOTIFICATION_SECRET_ENCRYPTION_KEY is not set, so no signing secret can be stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/webhooks/{webhookId}/deliveries": {
      "get": {
        "operationId": "listQuillsWebhookDeliveries",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "List recent delivery attempts for a webhook",
        "description": "Lists the webhook's delivery attempts, test sends included, newest first; each retry is its own row. Filter by `status` and page with `limit` and `offset`; `total` counts every matching attempt. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Webhook ID. Accepts the TypeID or its UUID.",
              "example": "webhook_01m8rz8mp2eshrhd0a8nhmyenk"
            },
            "required": true,
            "description": "Webhook ID. Accepts the TypeID or its UUID.",
            "name": "webhookId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "succeeded",
                "failed",
                "retrying"
              ],
              "description": "Only attempts with this outcome. `succeeded`: the receiver answered 2xx; `failed`: the attempt failed and won't be retried; `retrying`: the attempt failed and another is scheduled. Omit for all.",
              "example": "failed"
            },
            "required": false,
            "description": "Only attempts with this outcome. `succeeded`: the receiver answered 2xx; `failed`: the attempt failed and won't be retried; `retrying`: the attempt failed and another is scheduled. Omit for all.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25,
              "description": "Maximum number of attempts to return, from 1 to 100. Defaults to 25.",
              "example": 25
            },
            "required": false,
            "description": "Maximum number of attempts to return, from 1 to 100. Defaults to 25.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000,
              "default": 0,
              "description": "Number of attempts to skip, from 0 to 10,000. Defaults to 0.",
              "example": 0
            },
            "required": false,
            "description": "Number of attempts to skip, from 0 to 10,000. Defaults to 0.",
            "name": "offset",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Recent delivery attempts, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliveries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsWebhookDelivery"
                      },
                      "description": "One page of delivery attempts, newest first."
                    },
                    "total": {
                      "type": "number",
                      "description": "Number of attempts that match the filter, across all pages.",
                      "example": 42
                    }
                  },
                  "required": [
                    "deliveries",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No webhook with this ID in the workspace, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/webhooks/{webhookId}/test": {
      "post": {
        "operationId": "testQuillsWebhook",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Send a signed test event to a webhook",
        "description": "Sends one signed `webhook.test` event to the webhook's URL right away, outside the delivery queue, and logs the attempt as a delivery. The body is `{ id, type: \"webhook.test\", createdAt, data: { entityType: \"webhook\", entityId, test: \"true\" } }`, with the same headers and signature as a real delivery. Works for a disabled webhook too. The send is never retried and doesn't change `failureCount`, `lastError` or `lastTriggeredAt`. At most 30 test sends per webhook in a 10-minute window; more answer 429. Records no event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Webhook ID. Accepts the TypeID or its UUID.",
              "example": "webhook_01m8rz8mp2eshrhd0a8nhmyenk"
            },
            "required": true,
            "description": "Webhook ID. Accepts the TypeID or its UUID.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The test delivery result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "delivery": {
                      "$ref": "#/components/schemas/QuillsWebhookDelivery"
                    },
                    "ok": {
                      "type": "boolean",
                      "description": "Whether the receiver answered with a 2xx status. False also when the signing secret can't be decrypted or the URL isn't a public address.",
                      "example": true
                    }
                  },
                  "required": [
                    "delivery",
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No webhook with this ID in the workspace, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/webhooks/{webhookId}/deliveries/{deliveryId}/replay": {
      "post": {
        "operationId": "replayQuillsWebhookDelivery",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Replay one webhook delivery",
        "description": "Queues the event of an earlier delivery attempt to be sent to this webhook again, even when the webhook no longer subscribes to that event type. The worker sends it with the webhook's current URL and secret, under a new `x-kaneo-delivery` ID, with the same retry rules as other deliveries. The webhook must be active. Test sends can't be replayed. At most 60 replay requests per webhook in a 10-minute window; more answer 429. Records a `webhook.replay_requested` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Webhook ID. Accepts the TypeID or its UUID.",
              "example": "webhook_01m8rz8mp2eshrhd0a8nhmyenk"
            },
            "required": true,
            "description": "Webhook ID. Accepts the TypeID or its UUID.",
            "name": "webhookId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the delivery attempt whose event to send again. Accepts the TypeID or its UUID. Must belong to this webhook.",
              "example": "webhook_delivery_01m8rz8mp3eshrhd0kwm636acn"
            },
            "required": true,
            "description": "ID of the delivery attempt whose event to send again. Accepts the TypeID or its UUID. Must belong to this webhook.",
            "name": "deliveryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Queued replay job ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "queued": {
                      "type": "boolean",
                      "description": "Always `true` when the replay was queued.",
                      "example": true
                    },
                    "jobId": {
                      "type": "string",
                      "description": "ID of the queued replay job (TypeID). The attempt appears in the delivery list once the worker sends it.",
                      "example": "job_01m8rz8mp3eshrhd2jnjxw0t47"
                    }
                  },
                  "required": [
                    "queued",
                    "jobId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The delivery is a test send, which can't be replayed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No live webhook with this ID, or no delivery attempt with this ID for the webhook",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The webhook is disabled; enable it before replaying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/webhooks/{webhookId}/deliveries/replay-failed": {
      "post": {
        "operationId": "replayQuillsFailedWebhookDeliveries",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Replay a webhook's recent failed deliveries",
        "description": "Queues a replay for each event whose latest attempt to this webhook failed and that was never delivered, taken from the 50 most recent such attempts. Test sends are skipped. Each replay is sent like a single replay: current URL and secret, a new `x-kaneo-delivery` ID, the usual retry rules. The webhook must be active. At most 10 requests per webhook in a 10-minute window; more answer 429. Records a `webhook.replay_requested` event with the count. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Webhook ID. Accepts the TypeID or its UUID.",
              "example": "webhook_01m8rz8mp2eshrhd0a8nhmyenk"
            },
            "required": true,
            "description": "Webhook ID. Accepts the TypeID or its UUID.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Number of failed events re-queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "queuedCount": {
                      "type": "number",
                      "description": "Number of events queued for replay, from 0 to 50. 0 when no failed delivery needs a replay.",
                      "example": 3
                    }
                  },
                  "required": [
                    "queuedCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No webhook with this ID in the workspace, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The webhook is disabled; enable it before replaying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/events": {
      "get": {
        "operationId": "listQuillsEvents",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "List workspace events for webhook catch-up",
        "description": "Lists the workspace's recorded events in the order they were recorded, so a webhook consumer can catch up after downtime. Internal event types (such as internal notes, `webhook.failing`, `webhook.secret_rotated` and `notification.digest_sent`), events recorded as not deliverable and events about private comments are left out. Board filters of webhooks don't apply. Filter with `since`, `afterId` and `type`; pass `nextCursor` as `afterId` for the next page. Private-comment events are removed after paging, so a page can hold fewer than `limit` events while `nextCursor` is set. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "Only events that occurred at or after this time, in ISO 8601 UTC.",
              "example": "2026-03-14T00:00:00.000Z"
            },
            "required": false,
            "description": "Only events that occurred at or after this time, in ISO 8601 UTC.",
            "name": "since",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 19,
              "pattern": "^\\d+$",
              "description": "Only events after this cursor: a decimal string, as returned in `cursor` or `nextCursor`. Omit to start from the oldest event.",
              "example": "18234"
            },
            "required": false,
            "description": "Only events after this cursor: a decimal string, as returned in `cursor` or `nextCursor`. Omit to start from the oldest event.",
            "name": "afterId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "description": "Only events of this exact type.",
              "example": "post.status_changed"
            },
            "required": false,
            "description": "Only events of this exact type.",
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of events to return, from 1 to 100. Defaults to 50.",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of events to return, from 1 to 100. Defaults to 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Chronological page of outbox events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cursor": {
                            "type": "string",
                            "description": "Position of the event in the workspace's event log, as a decimal string. Pass it as `afterId` to read the events after it.",
                            "example": "18234"
                          },
                          "id": {
                            "type": "string",
                            "description": "Event ID, the same `id` that webhook deliveries of this event carry.",
                            "example": "evt_01m8rzadndf21vwmg1q6myz3ar"
                          },
                          "type": {
                            "type": "string",
                            "description": "Event type.",
                            "example": "post.status_changed"
                          },
                          "entityType": {
                            "type": "string",
                            "description": "Kind of record the event is about.",
                            "example": "post"
                          },
                          "entityId": {
                            "type": "string",
                            "description": "ID of the record the event is about.",
                            "example": "post_01m8rz8mp3eshrhd1nt2x5sfqm"
                          },
                          "payload": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "string",
                              "maxLength": 500
                            },
                            "default": {},
                            "description": "The event's details as string values, for example the IDs of the records it names. The keys depend on the event type.",
                            "example": {
                              "messageId": "conversation_msg_01h455vb4pex5vsknk084sn02q"
                            }
                          },
                          "occurredAt": {
                            "type": "string",
                            "description": "Time the event occurred, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "cursor",
                          "id",
                          "type",
                          "entityType",
                          "entityId",
                          "occurredAt"
                        ],
                        "description": "A recorded workspace event."
                      },
                      "description": "One page of events, oldest first."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor to pass as `afterId` for the next page. Null when there are no more events.",
                      "example": "18284"
                    }
                  },
                  "required": [
                    "events",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/notifications": {
      "get": {
        "operationId": "listQuillsNotifications",
        "tags": [
          "Support notifications"
        ],
        "summary": "List the caller's Albus notifications",
        "description": "Lists the caller's own in-app notifications that aren't archived, newest first, one page at a time with `limit` and `offset`. A notification about a post that was deleted, or whose board the caller can no longer see, keeps its row but shows the title `Notification`, the body `This activity is no longer visible to you.` and no post or comment. Nobody can read another teammate's notifications. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Maximum number of notifications to return, from 1 to 100. Defaults to 20.",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of notifications to return, from 1 to 100. Defaults to 20.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 100000,
              "default": 0,
              "description": "Number of notifications to skip, from 0 to 100,000. Defaults to 0.",
              "example": 0
            },
            "required": false,
            "description": "Number of notifications to skip, from 0 to 100,000. Defaults to 0.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "`true` returns only unread notifications; `false` returns read and unread ones. Defaults to `false`.",
              "example": "true"
            },
            "required": false,
            "description": "`true` returns only unread notifications; `false` returns read and unread ones. Defaults to `false`.",
            "name": "unreadOnly",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of notifications, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "notifications": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsNotification"
                      },
                      "description": "One page of notifications, newest first."
                    },
                    "total": {
                      "type": "number",
                      "description": "Number of notifications that match the filter, across all pages. Archived ones aren't counted.",
                      "example": 37
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of the caller's unread notifications that aren't archived, whatever the filter.",
                      "example": 4
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more notifications follow this page.",
                      "example": true
                    }
                  },
                  "required": [
                    "notifications",
                    "total",
                    "unreadCount",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/notifications/unread-count": {
      "get": {
        "operationId": "getQuillsNotificationUnreadCount",
        "tags": [
          "Support notifications"
        ],
        "summary": "Count the caller's unread Albus notifications",
        "description": "Returns how many of the caller's notifications are unread and not archived, for a badge. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Unread notifications that are not archived",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "number",
                      "description": "Number of the caller's unread notifications that aren't archived.",
                      "example": 4
                    }
                  },
                  "required": [
                    "count"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/notifications/{notificationId}/read": {
      "post": {
        "operationId": "markQuillsNotificationRead",
        "tags": [
          "Support notifications"
        ],
        "summary": "Mark one of the caller's Albus notifications as read",
        "description": "Marks one of the caller's notifications as read, archived or not. Idempotent: a notification that's already read keeps its `readAt` and returns `changed: false`. Records no event, since it's the caller's own inbox state. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of one of the caller's notifications. Accepts the TypeID or its UUID.",
              "example": "notification_01m8rz8mp3eshrhd1cxk5hp2pk"
            },
            "required": true,
            "description": "ID of one of the caller's notifications. Accepts the TypeID or its UUID.",
            "name": "notificationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the notification changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request changed the notification. False when it was already in that state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No notification with this ID belongs to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/notifications/{notificationId}/archive": {
      "post": {
        "operationId": "archiveQuillsNotification",
        "tags": [
          "Support notifications"
        ],
        "summary": "Archive one of the caller's Albus notifications",
        "description": "Archives one of the caller's notifications: it leaves the list and the counts but isn't marked as read. There's no route to unarchive it. Idempotent: a notification that's already archived returns `changed: false`. Records no event, since it's the caller's own inbox state. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of one of the caller's notifications. Accepts the TypeID or its UUID.",
              "example": "notification_01m8rz8mp3eshrhd1cxk5hp2pk"
            },
            "required": true,
            "description": "ID of one of the caller's notifications. Accepts the TypeID or its UUID.",
            "name": "notificationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the notification changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request changed the notification. False when it was already in that state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No notification with this ID belongs to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/notifications/read-all": {
      "post": {
        "operationId": "markQuillsAllNotificationsRead",
        "tags": [
          "Support notifications"
        ],
        "summary": "Mark all of the caller's Albus notifications as read",
        "description": "Marks every unread notification of the caller that isn't archived as read. Records no event, since it's the caller's own inbox state. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Notifications marked as read",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "number",
                      "description": "Number of notifications this request marked as read.",
                      "example": 4
                    }
                  },
                  "required": [
                    "count"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/notifications/archive-read": {
      "post": {
        "operationId": "archiveQuillsReadNotifications",
        "tags": [
          "Support notifications"
        ],
        "summary": "Archive the caller's read Albus notifications",
        "description": "Archives every notification of the caller that's read and not yet archived; unread ones stay. Records no event, since it's the caller's own inbox state. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Notifications archived",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "number",
                      "description": "Number of notifications this request archived.",
                      "example": 4
                    }
                  },
                  "required": [
                    "count"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/notification-preferences": {
      "get": {
        "operationId": "getQuillsNotificationPreferences",
        "tags": [
          "Support notifications"
        ],
        "summary": "Get the caller's Albus notification preferences",
        "description": "Returns the caller's saved notification preferences. Before the caller saves any, returns defaults without saving them: both email flags on, email not muted, the workspace's default digest frequency (else `off`) and an empty matrix. Per-type workspace and built-in defaults apply when notifications are sent and aren't listed in `matrix`. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsNotificationPreferences"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsNotificationPreferences",
        "tags": [
          "Support notifications"
        ],
        "summary": "Update the caller's Albus notification preferences",
        "description": "Saves the caller's notification preferences; at least one field is required. Fields left out keep their saved value. On the first save they take the stored defaults instead: email flags on, email not muted, `digestFrequency` `off` (even when GET showed a workspace default) and no overrides. `matrix` replaces every saved override, so send all the types and channels to keep. Records no event, since these are the caller's own settings. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emailStatusChange": {
                    "type": "boolean",
                    "description": "Whether to email the caller when a followed post's status changes, when no override or workspace default decides. Omit to keep.",
                    "example": true
                  },
                  "emailNewComment": {
                    "type": "boolean",
                    "description": "Whether to email the caller about new comments on followed posts, when no override or workspace default decides. Omit to keep.",
                    "example": false
                  },
                  "emailMuted": {
                    "type": "boolean",
                    "description": "`true` turns off every notification email and the digest. Omit to keep.",
                    "example": false
                  },
                  "digestFrequency": {
                    "type": "string",
                    "enum": [
                      "off",
                      "hourly",
                      "daily"
                    ],
                    "description": "How often the caller's unread in-app notifications are summarized in a digest. `off`: no digest; `hourly`: at most once an hour; `daily`: at most once a day. A digest covers up to 25 unread, unarchived notifications created since the previous one, and is skipped when there are none or `emailMuted` is true.",
                    "example": "daily"
                  },
                  "matrix": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "Notification type the override applies to, the same key as a notification's `type`, for example `comment_created`, `post_status_changed`, `conversation_assigned`, `ticket_assigned`, `note_mention` or `ticket_watch`. Up to 64 characters.",
                          "example": "comment_created"
                        },
                        "inApp": {
                          "type": "boolean",
                          "description": "Whether the caller gets this type in the in-app inbox. Omit to use the default.",
                          "example": true
                        },
                        "email": {
                          "type": "boolean",
                          "description": "Whether the caller gets this type by email. Omit to use the default.",
                          "example": false
                        },
                        "push": {
                          "type": "boolean",
                          "description": "Whether the caller gets this type as a mobile push notification. Omit to use the default.",
                          "example": false
                        },
                        "slackDm": {
                          "type": "boolean",
                          "description": "Whether the caller gets this type as a Slack direct message. Omit to use the default.",
                          "example": false
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": false,
                      "description": "The caller's channel choices for one notification type. Other keys are refused."
                    },
                    "maxItems": 50,
                    "description": "Per-type channel overrides, up to 50. Replaces every saved override: types and channels left out go back to the defaults, and an empty list removes all overrides. When a type appears twice, the last entry wins."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsNotificationPreferences"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/subscription": {
      "get": {
        "operationId": "getQuillsPostSubscription",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get the caller's subscription to an Albus post",
        "description": "Returns the caller's subscription level for a feedback post and why they were subscribed. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Feedback post ID. Accepts the TypeID or its UUID. The post must not be deleted and its board must be visible to the caller.",
              "example": "post_01m8rz8mp3eshrhd1nt2x5sfqm"
            },
            "required": true,
            "description": "Feedback post ID. Accepts the TypeID or its UUID. The post must not be deleted and its board must be visible to the caller.",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's subscription level",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "level": {
                      "type": "string",
                      "enum": [
                        "all",
                        "status_only",
                        "none"
                      ],
                      "description": "The caller's subscription level. `all`: notified of new comments and status changes; `status_only`: notified of status changes only; `none`: not subscribed, or unsubscribed.",
                      "example": "status_only"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the subscription was created: `author` (wrote the post), `vote` (voted on it), `comment` (commented on it) or `manual` (subscribed on purpose). Changing the level keeps it. Null when the caller never had a subscription to the post.",
                      "example": "manual"
                    }
                  },
                  "required": [
                    "level",
                    "reason"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post doesn't exist, was deleted, or is on a board the caller can't see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsPostSubscription",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Subscribe the caller to an Albus post or change the level",
        "description": "Subscribes the caller to a feedback post at the given level, or changes the level of an existing subscription. A new subscription gets the reason `manual`; an existing one keeps its reason. Idempotent. The caller is then notified of the chosen events, as their notification preferences allow, but never of their own actions. Records no event, since it's the caller's own subscription. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Feedback post ID. Accepts the TypeID or its UUID. The post must not be deleted and its board must be visible to the caller.",
              "example": "post_01m8rz8mp3eshrhd1nt2x5sfqm"
            },
            "required": true,
            "description": "Feedback post ID. Accepts the TypeID or its UUID. The post must not be deleted and its board must be visible to the caller.",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "level": {
                    "type": "string",
                    "enum": [
                      "all",
                      "status_only"
                    ],
                    "description": "Subscription level. `all`: notified of new comments and status changes; `status_only`: notified of status changes only.",
                    "example": "all"
                  }
                },
                "required": [
                  "level"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The caller's subscription level",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "level": {
                      "type": "string",
                      "enum": [
                        "all",
                        "status_only"
                      ],
                      "description": "Subscription level. `all`: notified of new comments and status changes; `status_only`: notified of status changes only.",
                      "example": "all"
                    }
                  },
                  "required": [
                    "level"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post doesn't exist, was deleted, or is on a board the caller can't see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsPostSubscription",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Unsubscribe the caller from an Albus post",
        "description": "Stops every notice about the feedback post for the caller. The subscription is kept with both events turned off, which also stops the notice a voter gets when the post ships. Idempotent. Records no event, since it's the caller's own subscription. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Feedback post ID. Accepts the TypeID or its UUID. The post must not be deleted and its board must be visible to the caller.",
              "example": "post_01m8rz8mp3eshrhd1nt2x5sfqm"
            },
            "required": true,
            "description": "Feedback post ID. Accepts the TypeID or its UUID. The post must not be deleted and its board must be visible to the caller.",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the caller followed the post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the caller was subscribed to status changes before this request.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post doesn't exist, was deleted, or is on a board the caller can't see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/subscribers/{principalId}": {
      "put": {
        "operationId": "setQuillsVoterSubscription",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Set a voter's subscription to an Albus post",
        "description": "Sets the subscription level of a person who voted on the feedback post, on their behalf. Only a vote on this post itself counts; votes on posts merged into it don't. `none` stops every notice, as the unsubscribe route does. A new subscription gets the reason `vote`; an existing one keeps its reason. Records a `post.subscription_changed` event with the person and the level. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Feedback post ID. Accepts the TypeID or its UUID. The post must not be deleted and its board must be visible to the caller.",
              "example": "post_01m8rz8mp3eshrhd1nt2x5sfqm"
            },
            "required": true,
            "description": "Feedback post ID. Accepts the TypeID or its UUID. The post must not be deleted and its board must be visible to the caller.",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the person who voted on the post. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz8mp3eshrhd27p9wemqky"
            },
            "required": true,
            "description": "ID of the person who voted on the post. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "level": {
                    "type": "string",
                    "enum": [
                      "all",
                      "status_only",
                      "none"
                    ],
                    "description": "New subscription level of the voter. `all`: notified of new comments and status changes; `status_only`: notified of status changes only; `none`: no notices.",
                    "example": "status_only"
                  }
                },
                "required": [
                  "level"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The voter's subscription level",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "level": {
                      "type": "string",
                      "enum": [
                        "all",
                        "status_only",
                        "none"
                      ],
                      "description": "The voter's subscription level. `all`: notified of new comments and status changes; `status_only`: notified of status changes only; `none`: no notices.",
                      "example": "status_only"
                    }
                  },
                  "required": [
                    "level"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `update` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post doesn't exist, was deleted, or is on a board the caller can't see; or the person hasn't voted on this post",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog-subscribers/{principalId}": {
      "get": {
        "operationId": "getQuillsChangelogSubscriber",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Get a person's changelog subscription",
        "description": "Returns whether a person is subscribed to changelog updates, how the subscription was created and when they unsubscribed. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the person (a customer or teammate principal of this workspace). Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz8mp3eshrhd27p9wemqky"
            },
            "required": true,
            "description": "ID of the person (a customer or teammate principal of this workspace). Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The person's changelog subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "ID of the person (TypeID).",
                      "example": "principal_01m8rz8mp3eshrhd27p9wemqky"
                    },
                    "subscribed": {
                      "type": "boolean",
                      "description": "Whether the person is subscribed to changelog updates: a subscription exists and wasn't cancelled.",
                      "example": true
                    },
                    "source": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "How the subscription was first created: `auto` (subscribed automatically), `self_serve` (the person subscribed), `csv_import` (an email import) or `admin` (a teammate added them). Kept after an unsubscribe as the record of the opt-in. Null when the person never had a subscription.",
                      "example": "admin"
                    },
                    "unsubscribedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Time the person was unsubscribed, in ISO 8601 UTC. Null while subscribed or when they never had a subscription.",
                      "example": null
                    }
                  },
                  "required": [
                    "principalId",
                    "subscribed",
                    "source",
                    "unsubscribedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `read` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No person with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsChangelogSubscriber",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Subscribe or unsubscribe a person from the changelog",
        "description": "Subscribes a person to changelog updates or unsubscribes them. A new subscription gets the source `admin`; subscribing again after an unsubscribe keeps the original source. An unsubscribe keeps the subscription and its source as the record of the opt-out and sets `unsubscribedAt`. Idempotent, except that repeating an unsubscribe moves `unsubscribedAt` to now. Records a `changelog.subscription_changed` event. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the person (a customer or teammate principal of this workspace). Accepts the TypeID or its UUID.",
              "example": "principal_01m8rz8mp3eshrhd27p9wemqky"
            },
            "required": true,
            "description": "ID of the person (a customer or teammate principal of this workspace). Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subscribed": {
                    "type": "boolean",
                    "description": "`true` subscribes the person; `false` unsubscribes them.",
                    "example": false
                  }
                },
                "required": [
                  "subscribed"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The person's changelog subscription",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "ID of the person (TypeID).",
                      "example": "principal_01m8rz8mp3eshrhd27p9wemqky"
                    },
                    "subscribed": {
                      "type": "boolean",
                      "description": "Whether the person is subscribed to changelog updates: a subscription exists and wasn't cancelled.",
                      "example": true
                    },
                    "source": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "How the subscription was first created: `auto` (subscribed automatically), `self_serve` (the person subscribed), `csv_import` (an email import) or `admin` (a teammate added them). Kept after an unsubscribe as the record of the opt-in. Null when the person never had a subscription.",
                      "example": "admin"
                    },
                    "unsubscribedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Time the person was unsubscribed, in ISO 8601 UTC. Null while subscribed or when they never had a subscription.",
                      "example": null
                    }
                  },
                  "required": [
                    "principalId",
                    "subscribed",
                    "source",
                    "unsubscribedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `update` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No person with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog-subscribers/import": {
      "post": {
        "operationId": "importQuillsChangelogSubscribers",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Subscribe existing people to the changelog by email",
        "description": "Subscribes the existing customers whose account email matches one of the addresses, with the source `csv_import`. Addresses are trimmed, compared without case and deduplicated; blank ones are dropped. Never creates an account. A person who already has a subscription is skipped, so someone who unsubscribed stays unsubscribed. Send only addresses of people who agreed to receive changelog updates. Records a `changelog.subscribers_imported` event with the number imported. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 320,
                      "description": "Email address, up to 320 characters.",
                      "example": "jordan.lee@example.com"
                    },
                    "minItems": 1,
                    "maxItems": 5000,
                    "description": "Email addresses to subscribe, from 1 to 5,000.",
                    "example": [
                      "jordan.lee@example.com",
                      "sam.rivera@example.com"
                    ]
                  }
                },
                "required": [
                  "emails"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "imported": {
                      "type": "number",
                      "description": "Number of people this import subscribed.",
                      "example": 1
                    },
                    "skipped": {
                      "type": "number",
                      "description": "Number of unique addresses that subscribed nobody: no matching customer, or the customer already had a subscription.",
                      "example": 1
                    },
                    "total": {
                      "type": "number",
                      "description": "Number of unique, non-blank addresses in the request.",
                      "example": 2
                    }
                  },
                  "required": [
                    "imported",
                    "skipped",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `manage_settings` permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/devices": {
      "post": {
        "operationId": "registerQuillsPushDevice",
        "tags": [
          "Support notifications"
        ],
        "summary": "Register the caller's push device",
        "description": "Registers a mobile device's push token for the caller. Idempotent. A token already registered in the workspace, by anyone, moves to the caller with the new platform: holding the token proves the device. The token is stored as a SHA-256 hash for lookup and, when NOTIFICATION_SECRET_ENCRYPTION_KEY is set, encrypted with AES-256-GCM for delivery; without that key the device gets no push. When the server has a push gateway (PUSH_GATEWAY_URL), notifications that the caller wants by push go to each of their devices. Records no event, since it's the caller's own device. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096,
                    "description": "Push registration token of the device from APNs (iOS) or FCM (Android), up to 4,096 characters. Surrounding whitespace is removed.",
                    "example": "fcm-registration-token-example-not-real"
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "ios",
                      "android"
                    ],
                    "description": "Platform of the device. `ios`: APNs token; `android`: FCM token.",
                    "example": "ios"
                  }
                },
                "required": [
                  "token",
                  "platform"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The device is registered",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "registered": {
                      "type": "boolean",
                      "description": "Always `true` when the device was registered.",
                      "example": true
                    }
                  },
                  "required": [
                    "registered"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "unregisterQuillsPushDevice",
        "tags": [
          "Support notifications"
        ],
        "summary": "Unregister the caller's push device",
        "description": "Removes the caller's registration of the token, so the device gets no more push notifications for the caller. A registration that belongs to someone else isn't touched. Idempotent. Records no event, since it's the caller's own device. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096,
                    "description": "Push registration token of the device from APNs (iOS) or FCM (Android), up to 4,096 characters. Surrounding whitespace is removed.",
                    "example": "fcm-registration-token-example-not-real"
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Whether a device was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether a registration was removed. False when the caller had no device with this token.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tags": {
      "get": {
        "operationId": "listQuillsTags",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List post tags",
        "description": "Lists the workspace's live post tags, public and internal, sorted by name. Uses offset paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Tags ordered by name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsTag"
                      },
                      "description": "Tags on this page, sorted by name"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset to request the next page with, or null on the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "tags",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsTag",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Create a post tag",
        "description": "Creates a post tag. Names are unique without regard to case, also against deleted tags. Records a `tag.created` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Tag name, unique in the workspace without regard to case. Leading and trailing spaces are removed.",
                    "example": "Integrations"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "default": "#6b7280",
                    "description": "Color as a six-digit hex code in `#RRGGBB` form",
                    "example": "#6b7280"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Tag description. An empty string stores none.",
                    "example": "Requests about third-party integrations"
                  },
                  "aiPrompt": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Matching rule for AI auto-tagging: a plain-language description of the posts that this tag fits. An empty string stores none.",
                    "example": "Posts that ask for a connection to another tool"
                  },
                  "isPublic": {
                    "type": "boolean",
                    "description": "Whether customers see the tag. False makes it internal: portal and widget viewers never see it in filter lists or on posts, while teammates see every tag. Defaults to true."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsTag"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A tag with this name exists, including a deleted one, ignoring case",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tags/{tagId}": {
      "get": {
        "operationId": "getQuillsTag",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get a post tag",
        "description": "Gets one live post tag. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post tag ID",
              "example": "post_tag_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post tag ID",
            "name": "tagId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsTag"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Tag not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsTag",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Update a post tag",
        "description": "Changes the fields that the body names; at least one is required. Records a `tag.updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post tag ID",
              "example": "post_tag_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post tag ID",
            "name": "tagId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "New tag name, unique in the workspace without regard to case. Leading and trailing spaces are removed.",
                    "example": "Integrations"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "description": "Color as a six-digit hex code in `#RRGGBB` form",
                    "example": "#6b7280"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 200,
                    "description": "New tag description. Null or an empty string removes it.",
                    "example": "Requests about third-party integrations"
                  },
                  "aiPrompt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "Matching rule for AI auto-tagging: a plain-language description of the posts that this tag fits. Null or an empty string removes it.",
                    "example": "Posts that ask for a connection to another tool"
                  },
                  "isPublic": {
                    "type": "boolean",
                    "description": "Whether customers see the tag. False makes it internal: portal and widget viewers never see it in filter lists or on posts, while teammates see every tag."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsTag"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Tag not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another tag has this name, including a deleted one, ignoring case",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsTag",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Delete a post tag",
        "description": "Soft-deletes a post tag. Posts keep their assignments, so a post's history still shows the tag, and the name stays reserved. Records a `tag.deleted` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post tag ID",
              "example": "post_tag_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post tag ID",
            "name": "tagId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted tag",
                      "example": "post_tag_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Tag not found or already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/statuses/order": {
      "put": {
        "operationId": "reorderQuillsStatuses",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Reorder all post statuses",
        "description": "Sets the position of every live post status: each status's position becomes its 0-based index in `statusIds`. Send every live status ID once, in the new order. A partial or stale list changes nothing. Records a `status.reordered` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "statusIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post_status` prefix. Requests also accept the bare UUID.",
                      "example": "post_status_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Every live post status ID exactly once, in the new order",
                    "example": [
                      "post_status_01jd3k8m2q5r7t9v1w3x5y7z9a",
                      "post_status_02k7m9p3r5t8v0w2x4y6z8a1b3"
                    ]
                  }
                },
                "required": [
                  "statusIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The status IDs in their new order",
                      "example": [
                        "post_status_01jd3k8m2q5r7t9v1w3x5y7z9a",
                        "post_status_02k7m9p3r5t8v0w2x4y6z8a1b3"
                      ]
                    }
                  },
                  "required": [
                    "statusIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A status ID is unknown or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The list leaves out a live status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/statuses": {
      "get": {
        "operationId": "listQuillsStatuses",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List post statuses",
        "description": "Lists the workspace's live post statuses, sorted by category (`active`, then `complete`, then `closed`), then by position. Uses offset paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Statuses by category, then position",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statuses": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsStatus"
                      },
                      "description": "Statuses on this page, by category, then position"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset to request the next page with, or null on the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "statuses",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsStatus",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Create a post status",
        "description": "Creates a post status. With `isDefault: true`, it becomes the default and the previous default loses that flag. Records a `status.created` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Status name. Leading and trailing spaces are removed.",
                    "example": "In progress"
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "pattern": "^[a-z0-9_]+$",
                    "description": "Stable key of the status: lowercase letters, digits and underscores. Must be unique in the workspace, including deleted statuses. It cannot be changed later.",
                    "example": "in_progress"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "description": "Color as a six-digit hex code in `#RRGGBB` form",
                    "example": "#6b7280"
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "active",
                      "complete",
                      "closed"
                    ],
                    "description": "Status group. `active`: open work. `complete`: shipped. `closed`: no longer pursued, for example declined."
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000,
                    "description": "Sort position within the category, lowest first. Defaults to 0.",
                    "example": 2
                  },
                  "showOnRoadmap": {
                    "type": "boolean",
                    "description": "Whether posts in this status show on the public roadmap. A new column roadmap also starts with one column per status that has it. Defaults to false."
                  },
                  "isDefault": {
                    "type": "boolean",
                    "description": "Whether the new status becomes the default status for new posts. Defaults to false."
                  }
                },
                "required": [
                  "name",
                  "slug",
                  "color",
                  "category"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatus"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A status with this slug exists, including a deleted one",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/statuses/{statusId}": {
      "get": {
        "operationId": "getQuillsStatus",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get a post status",
        "description": "Gets one live post status. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post status ID",
              "example": "post_status_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post status ID",
            "name": "statusId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatus"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Status not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsStatus",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Update a post status",
        "description": "Changes the fields that the body names; at least one is required. The slug and category cannot be changed. `isDefault: true` makes this the default status and clears the flag on the previous default; `isDefault: false` clears it, leaving no default. Records a `status.updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post status ID",
              "example": "post_status_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post status ID",
            "name": "statusId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "New status name. Leading and trailing spaces are removed.",
                    "example": "In progress"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "description": "Color as a six-digit hex code in `#RRGGBB` form",
                    "example": "#6b7280"
                  },
                  "showOnRoadmap": {
                    "type": "boolean",
                    "description": "Whether posts in this status show on the public roadmap. A new column roadmap also starts with one column per status that has it."
                  },
                  "isDefault": {
                    "type": "boolean",
                    "description": "True makes this the default status for new posts; false removes the default flag from it"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatus"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Status not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsStatus",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Delete a post status that no post uses",
        "description": "Soft-deletes a post status. The default status cannot be deleted, nor a status that a live post still uses; move those posts first. The slug stays reserved. Records a `status.deleted` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post status ID",
              "example": "post_status_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post status ID",
            "name": "statusId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted status",
                      "example": "post_status_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Status not found or already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The status is the default, or live posts still use it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/roadmaps/order": {
      "put": {
        "operationId": "reorderQuillsRoadmaps",
        "tags": [
          "Roadmaps"
        ],
        "summary": "Reorder all roadmaps",
        "description": "Sets the position of every live roadmap: each roadmap's position becomes its 0-based index in `roadmapIds`. Send every live roadmap ID once, in the new order. A partial or stale list changes nothing. Records a `roadmap.reordered` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roadmapIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `roadmap` prefix. Requests also accept the bare UUID.",
                      "example": "roadmap_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Every live roadmap ID exactly once, in the new order",
                    "example": [
                      "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3",
                      "roadmap_06q1r3t7w9y2z4a6b8c0d2e5f7"
                    ]
                  }
                },
                "required": [
                  "roadmapIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roadmapIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The roadmap IDs in their new order",
                      "example": [
                        "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3",
                        "roadmap_06q1r3t7w9y2z4a6b8c0d2e5f7"
                      ]
                    }
                  },
                  "required": [
                    "roadmapIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A roadmap ID is unknown or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The list leaves out a live roadmap",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/roadmaps": {
      "get": {
        "operationId": "listQuillsRoadmaps",
        "tags": [
          "Roadmaps"
        ],
        "summary": "List roadmaps",
        "description": "Lists the workspace's live roadmaps with their columns, sorted by position. Includes roadmaps of every visibility. Uses offset paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Roadmaps in position order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roadmaps": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsRoadmap"
                      },
                      "description": "Roadmaps on this page, sorted by position"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset to request the next page with, or null on the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "roadmaps",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsRoadmap",
        "tags": [
          "Roadmaps"
        ],
        "summary": "Create a roadmap",
        "description": "Creates a roadmap at the end of the roadmap order. A column roadmap without `columns` starts with one column per live status marked to show on the roadmap, by category, then position. A date roadmap gets no columns and buckets posts by ETA. Every status, board, tag and segment that the body names must be live in the workspace. Records a `roadmap.created` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Roadmap name. Leading and trailing spaces are removed.",
                    "example": "Product roadmap"
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[a-z0-9-]+$",
                    "description": "URL slug of the roadmap: lowercase letters, digits and hyphens, unique in the workspace. It cannot be changed later.",
                    "example": "product-roadmap"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Roadmap description. An empty string stores none.",
                    "example": "What we are working on next"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "column",
                      "date"
                    ],
                    "description": "`column`: one column per chosen post status. `date`: posts grouped into date buckets by their ETA; no columns. A new roadmap defaults to `column`; changing a roadmap to `date` removes its columns."
                  },
                  "baseFilter": {
                    "type": "object",
                    "properties": {
                      "statusIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "TypeID with the `post_status` prefix. Requests also accept the bare UUID.",
                          "example": "post_status_01h455vb4pex5vsknk084sn02q"
                        },
                        "maxItems": 50,
                        "description": "Only posts in one of these post statuses. Each must be a live status.",
                        "example": [
                          "post_status_03m8n0q4s6v9w1x3y5z7a9b2c4"
                        ]
                      },
                      "boardIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
                          "example": "board_01h455vb4pex5vsknk084sn02q"
                        },
                        "maxItems": 50,
                        "description": "Only posts on one of these boards. Each must be a live board.",
                        "example": [
                          "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                        ]
                      },
                      "tagIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "TypeID with the `post_tag` prefix. Requests also accept the bare UUID.",
                          "example": "post_tag_01h455vb4pex5vsknk084sn02q"
                        },
                        "maxItems": 50,
                        "description": "Only posts with at least one of these tags. Each must be a live tag.",
                        "example": [
                          "post_tag_04n9p1r5t7w0x2y4z6a8b0c3d5"
                        ]
                      },
                      "segmentIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                          "example": "segment_01h455vb4pex5vsknk084sn02q"
                        },
                        "maxItems": 50,
                        "description": "Only posts whose author is in one of these segments. Each must be a live segment.",
                        "example": [
                          "segment_05p0q2s6v8x1y3z5a7b9c1d4e6"
                        ]
                      }
                    },
                    "additionalProperties": false,
                    "description": "Stored filter that limits which posts the roadmap shows. Every list that is present and not empty must match; a post matches a list when it matches any ID in it. It can name internal tags. Replaces the stored filter as a whole; no other keys are allowed."
                  },
                  "frequency": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "monthly",
                      "quarterly",
                      "semiannual",
                      null
                    ],
                    "description": "Bucket size of a date roadmap. `monthly`: calendar months. `quarterly`: three-month quarters. `semiannual`: half years. Only for a date roadmap: a column roadmap with a frequency is rejected. Null or absent keeps the stored value, or `monthly` for a new date roadmap."
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "team",
                      "segment"
                    ],
                    "description": "Who sees the roadmap on the portal. `public`: every portal viewer. `team`: teammates only; it never shows on the portal. `segment`: signed-in customers in one of `visibleSegmentIds`. A new roadmap defaults to `public`."
                  },
                  "visibleSegmentIds": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Segment IDs whose signed-in members see a `segment` roadmap. That visibility needs at least one live segment; other visibilities ignore the list and store null. Absent keeps the stored list.",
                    "example": [
                      "segment_05p0q2s6v8x1y3z5a7b9c1d4e6"
                    ]
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "statusId": {
                          "type": "string",
                          "description": "ID of a live post status whose posts the column shows. A roadmap has at most one column per status.",
                          "example": "post_status_03m8n0q4s6v9w1x3y5z7a9b2c4"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "Column name. Leading and trailing spaces are removed.",
                          "example": "In progress"
                        },
                        "icon": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 50,
                          "description": "Short icon identifier of the column. Null or an empty string means no icon."
                        },
                        "color": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 50,
                          "description": "Column color, such as a hex code",
                          "example": "#3b82f6"
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000,
                          "description": "Sort position of the column, lowest first. Defaults to the column's index in a roadmap's `columns` list, or to the end when one column is added.",
                          "example": 1
                        }
                      },
                      "required": [
                        "statusId",
                        "name",
                        "color"
                      ]
                    },
                    "maxItems": 50,
                    "description": "The columns of a column roadmap, replacing every existing column; each status at most once. A date roadmap ignores it. A new column roadmap without it starts with one column per status marked to show on the roadmap."
                  }
                },
                "required": [
                  "name",
                  "slug"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created roadmap",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsRoadmap"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A status, board, tag or segment in the body was not found or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A roadmap with this slug exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/roadmaps/{roadmapId}": {
      "get": {
        "operationId": "getQuillsRoadmap",
        "tags": [
          "Roadmaps"
        ],
        "summary": "Get a roadmap",
        "description": "Gets one live roadmap with its settings and columns in position order. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap ID",
              "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
            },
            "required": true,
            "description": "Roadmap ID",
            "name": "roadmapId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The roadmap and its columns",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsRoadmap"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Roadmap not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsRoadmap",
        "tags": [
          "Roadmaps"
        ],
        "summary": "Update a roadmap",
        "description": "Changes the fields that the body names; at least one is required. The slug cannot be changed. A `columns` list replaces every column; without it, a column roadmap keeps its columns. A date roadmap has no columns, so changing the type to `date` removes them. Every status, board, tag and segment that the body names must be live in the workspace. Records a `roadmap.updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap ID",
              "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
            },
            "required": true,
            "description": "Roadmap ID",
            "name": "roadmapId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "New roadmap name. Leading and trailing spaces are removed.",
                    "example": "Product roadmap"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "New roadmap description. Null or an empty string removes it.",
                    "example": "What we are working on next"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "column",
                      "date"
                    ],
                    "description": "`column`: one column per chosen post status. `date`: posts grouped into date buckets by their ETA; no columns. A new roadmap defaults to `column`; changing a roadmap to `date` removes its columns."
                  },
                  "baseFilter": {
                    "type": "object",
                    "properties": {
                      "statusIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "TypeID with the `post_status` prefix. Requests also accept the bare UUID.",
                          "example": "post_status_01h455vb4pex5vsknk084sn02q"
                        },
                        "maxItems": 50,
                        "description": "Only posts in one of these post statuses. Each must be a live status.",
                        "example": [
                          "post_status_03m8n0q4s6v9w1x3y5z7a9b2c4"
                        ]
                      },
                      "boardIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
                          "example": "board_01h455vb4pex5vsknk084sn02q"
                        },
                        "maxItems": 50,
                        "description": "Only posts on one of these boards. Each must be a live board.",
                        "example": [
                          "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                        ]
                      },
                      "tagIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "TypeID with the `post_tag` prefix. Requests also accept the bare UUID.",
                          "example": "post_tag_01h455vb4pex5vsknk084sn02q"
                        },
                        "maxItems": 50,
                        "description": "Only posts with at least one of these tags. Each must be a live tag.",
                        "example": [
                          "post_tag_04n9p1r5t7w0x2y4z6a8b0c3d5"
                        ]
                      },
                      "segmentIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                          "example": "segment_01h455vb4pex5vsknk084sn02q"
                        },
                        "maxItems": 50,
                        "description": "Only posts whose author is in one of these segments. Each must be a live segment.",
                        "example": [
                          "segment_05p0q2s6v8x1y3z5a7b9c1d4e6"
                        ]
                      }
                    },
                    "additionalProperties": false,
                    "description": "Stored filter that limits which posts the roadmap shows. Every list that is present and not empty must match; a post matches a list when it matches any ID in it. It can name internal tags. Replaces the stored filter as a whole; no other keys are allowed."
                  },
                  "frequency": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "monthly",
                      "quarterly",
                      "semiannual",
                      null
                    ],
                    "description": "Bucket size of a date roadmap. `monthly`: calendar months. `quarterly`: three-month quarters. `semiannual`: half years. Only for a date roadmap: a column roadmap with a frequency is rejected. Null or absent keeps the stored value, or `monthly` for a new date roadmap."
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "team",
                      "segment"
                    ],
                    "description": "Who sees the roadmap on the portal. `public`: every portal viewer. `team`: teammates only; it never shows on the portal. `segment`: signed-in customers in one of `visibleSegmentIds`. A new roadmap defaults to `public`."
                  },
                  "visibleSegmentIds": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Segment IDs whose signed-in members see a `segment` roadmap. That visibility needs at least one live segment; other visibilities ignore the list and store null. Absent keeps the stored list.",
                    "example": [
                      "segment_05p0q2s6v8x1y3z5a7b9c1d4e6"
                    ]
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "statusId": {
                          "type": "string",
                          "description": "ID of a live post status whose posts the column shows. A roadmap has at most one column per status.",
                          "example": "post_status_03m8n0q4s6v9w1x3y5z7a9b2c4"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "Column name. Leading and trailing spaces are removed.",
                          "example": "In progress"
                        },
                        "icon": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 50,
                          "description": "Short icon identifier of the column. Null or an empty string means no icon."
                        },
                        "color": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 50,
                          "description": "Column color, such as a hex code",
                          "example": "#3b82f6"
                        },
                        "position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000,
                          "description": "Sort position of the column, lowest first. Defaults to the column's index in a roadmap's `columns` list, or to the end when one column is added.",
                          "example": 1
                        }
                      },
                      "required": [
                        "statusId",
                        "name",
                        "color"
                      ]
                    },
                    "maxItems": 50,
                    "description": "The columns of a column roadmap, replacing every existing column; each status at most once. A date roadmap ignores it. A new column roadmap without it starts with one column per status marked to show on the roadmap."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated roadmap",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsRoadmap"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Roadmap not found or deleted, or a status, board, tag or segment in the body was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsRoadmap",
        "tags": [
          "Roadmaps"
        ],
        "summary": "Delete a roadmap",
        "description": "Soft-deletes a roadmap. Its posts are not changed. Records a `roadmap.deleted` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap ID",
              "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
            },
            "required": true,
            "description": "Roadmap ID",
            "name": "roadmapId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted roadmap",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted roadmap",
                      "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Roadmap not found or already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/roadmaps/{roadmapId}/columns": {
      "get": {
        "operationId": "listQuillsRoadmapColumns",
        "tags": [
          "Roadmaps"
        ],
        "summary": "List the columns of a roadmap",
        "description": "Lists every column of a live roadmap in position order. A date roadmap has none. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap ID",
              "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
            },
            "required": true,
            "description": "Roadmap ID",
            "name": "roadmapId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Columns in position order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "columns": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsRoadmapColumn"
                      },
                      "description": "The roadmap's columns in position order"
                    }
                  },
                  "required": [
                    "columns"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Roadmap not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsRoadmapColumn",
        "tags": [
          "Roadmaps"
        ],
        "summary": "Add a status column to a roadmap",
        "description": "Adds a column for one post status to a column roadmap. Without a position, the column goes after the existing ones. Records a `roadmap.column_created` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap ID",
              "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
            },
            "required": true,
            "description": "Roadmap ID",
            "name": "roadmapId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "statusId": {
                    "type": "string",
                    "description": "ID of a live post status whose posts the column shows. A roadmap has at most one column per status.",
                    "example": "post_status_03m8n0q4s6v9w1x3y5z7a9b2c4"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Column name. Leading and trailing spaces are removed.",
                    "example": "In progress"
                  },
                  "icon": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 50,
                    "description": "Short icon identifier of the column. Null or an empty string means no icon."
                  },
                  "color": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Column color, such as a hex code",
                    "example": "#3b82f6"
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000,
                    "description": "Sort position of the column, lowest first. Defaults to the column's index in a roadmap's `columns` list, or to the end when one column is added.",
                    "example": 1
                  }
                },
                "required": [
                  "statusId",
                  "name",
                  "color"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created column",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsRoadmapColumn"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Roadmap not found or deleted, or the status not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The roadmap is a date roadmap, or the status already has a column on it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/roadmaps/{roadmapId}/columns/{columnId}": {
      "patch": {
        "operationId": "updateQuillsRoadmapColumn",
        "tags": [
          "Roadmaps"
        ],
        "summary": "Update a roadmap column",
        "description": "Changes the fields that the body names; at least one is required. The column's status cannot be changed. Other columns keep their positions. Records a `roadmap.column_updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap ID",
              "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
            },
            "required": true,
            "description": "Roadmap ID",
            "name": "roadmapId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap column ID. A column of another roadmap is not found.",
              "example": "roadmap_col_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Roadmap column ID. A column of another roadmap is not found.",
            "name": "columnId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "New column name. Leading and trailing spaces are removed.",
                    "example": "In progress"
                  },
                  "icon": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 50,
                    "description": "New short icon identifier. Null or an empty string removes the icon."
                  },
                  "color": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "New column color, such as a hex code",
                    "example": "#3b82f6"
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000,
                    "description": "New sort position of the column, lowest first",
                    "example": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated column",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsRoadmapColumn"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Roadmap not found or deleted, or the column is not on this roadmap",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsRoadmapColumn",
        "tags": [
          "Roadmaps"
        ],
        "summary": "Delete a roadmap column",
        "description": "Removes a column from a roadmap. The posts in its status are not changed; they stop showing on the roadmap unless another column shows that status. Records a `roadmap.column_deleted` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap ID",
              "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
            },
            "required": true,
            "description": "Roadmap ID",
            "name": "roadmapId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap column ID. A column of another roadmap is not found.",
              "example": "roadmap_col_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Roadmap column ID. A column of another roadmap is not found.",
            "name": "columnId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted column",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted column",
                      "example": "roadmap_col_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Roadmap not found or deleted, or the column is not on this roadmap",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/roadmaps/{roadmapId}/posts": {
      "get": {
        "operationId": "listQuillsRoadmapPosts",
        "tags": [
          "Roadmaps"
        ],
        "summary": "List the posts of a roadmap column or date bucket",
        "description": "Lists the posts that a roadmap shows, filtered by its stored base filter. On a column roadmap, posts in the statuses of its columns, or of one column with `statusId`; on a date roadmap, every matching post, or one date bucket with `bucketId`. Only posts that the caller may see: boards linked to projects need access to one of them, and deleted, merged and test-customer posts are left out. A date roadmap returns its buckets on the first page without bucketId; other pages return null. The bucket list runs from the earliest to the latest ETA, always includes the current period, stops 50 periods either side of now, and ends with `no-eta`. A bucket ID that does not fit the roadmap's frequency answers 400. Uses offset paging with `hasMore`. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Roadmap ID",
              "example": "roadmap_02k7m9p3r5t8v0w2x4y6z8a1b3"
            },
            "required": true,
            "description": "Roadmap ID",
            "name": "roadmapId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Column roadmap: only posts in this status. A status without a column on the roadmap gives an empty list.",
              "example": "post_status_03m8n0q4s6v9w1x3y5z7a9b2c4"
            },
            "required": false,
            "description": "Column roadmap: only posts in this status. A status without a column on the roadmap gives an empty list.",
            "name": "statusId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 20,
              "description": "Date roadmap: only posts whose ETA falls in this bucket, by its `id` from `buckets` (`YYYY-MM`, `YYYY-Qn`, `YYYY-Hn` or `no-eta`). Ignored on a column roadmap.",
              "example": "2026-Q4"
            },
            "required": false,
            "description": "Date roadmap: only posts whose ETA falls in this bucket, by its `id` from `buckets` (`YYYY-MM`, `YYYY-Qn`, `YYYY-Hn` or `no-eta`). Ignored on a column roadmap.",
            "name": "bucketId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Only posts that match this text search",
              "example": "dark mode"
            },
            "required": false,
            "description": "Only posts that match this text search",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "votes",
                "newest",
                "oldest"
              ],
              "default": "votes",
              "description": "Order of the posts. `votes` (the default): most votes first. `newest`: newest first. `oldest`: oldest first. With `votes`, posts with the same count are newest first."
            },
            "required": false,
            "description": "Order of the posts. `votes` (the default): most votes first. `newest`: newest first. `oldest`: oldest first. With `votes`, posts with the same count are newest first.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of visible roadmap posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Dark mode"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of votes on the post",
                            "example": 37
                          },
                          "commentCount": {
                            "type": "number",
                            "description": "Number of comments on the post",
                            "example": 5
                          },
                          "statusId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the post's status, or null when it has none",
                            "example": "post_status_03m8n0q4s6v9w1x3y5z7a9b2c4"
                          },
                          "eta": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Expected delivery date of the post, or null when none is set",
                            "example": "2026-12-15T00:00:00.000Z"
                          },
                          "board": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Board ID",
                                "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                              },
                              "name": {
                                "type": "string",
                                "description": "Board name",
                                "example": "Feature requests"
                              },
                              "slug": {
                                "type": "string",
                                "description": "URL slug of the board",
                                "example": "feature-requests"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug"
                            ],
                            "description": "The board that the post is on"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "voteCount",
                          "commentCount",
                          "statusId",
                          "eta",
                          "board"
                        ]
                      },
                      "description": "Posts on this page, in the requested order"
                    },
                    "total": {
                      "type": "number",
                      "description": "Number of posts that match the roadmap, column or bucket, and search, across all pages",
                      "example": 128
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether another page follows; request it with a larger `offset`"
                    },
                    "buckets": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Bucket ID to pass as `bucketId`: `YYYY-MM` for monthly, `YYYY-Qn` for quarterly, `YYYY-Hn` for semiannual roadmaps, or `no-eta` for posts without an ETA",
                            "example": "2026-Q4"
                          },
                          "label": {
                            "type": "string",
                            "description": "Display label of the bucket, in English",
                            "example": "Q4 2026"
                          },
                          "start": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Start of the bucket, inclusive, as an ISO 8601 UTC timestamp. Null for the `no-eta` bucket.",
                            "example": "2026-10-01T00:00:00.000Z"
                          },
                          "end": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "End of the bucket, exclusive, as an ISO 8601 UTC timestamp. Null for the `no-eta` bucket.",
                            "example": "2027-01-01T00:00:00.000Z"
                          },
                          "targetMonth": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "First day of the bucket's last month, as an ISO 8601 UTC timestamp. Null for the `no-eta` bucket.",
                            "example": "2026-12-01T00:00:00.000Z"
                          },
                          "noEta": {
                            "type": "boolean",
                            "description": "True only for the `no-eta` bucket of posts without an ETA"
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "start",
                          "end",
                          "targetMonth",
                          "noEta"
                        ]
                      },
                      "description": "Date roadmap, first page without `bucketId`: the date buckets in time order, ending with `no-eta`. Null otherwise."
                    }
                  },
                  "required": [
                    "items",
                    "total",
                    "hasMore",
                    "buckets"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Roadmap not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog/categories/order": {
      "put": {
        "operationId": "reorderQuillsChangelogCategories",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Reorder all changelog categories",
        "description": "Sets the order of all changelog categories. Send every category ID exactly once, in the new order; positions become 0, 1, 2 and so on. A partial or stale list changes nothing. Requires the `quills:manage_settings` permission. Records a `changelog.category_reordered` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "categoryIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `changelog_category` prefix. Requests also accept the bare UUID.",
                      "example": "changelog_category_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Every category ID once, first to last. Up to 50 IDs.",
                    "example": [
                      "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9e",
                      "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9f"
                    ]
                  }
                },
                "required": [
                  "categoryIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "categoryIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Category IDs in their new order",
                      "example": [
                        "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9e",
                        "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9f"
                      ]
                    }
                  },
                  "required": [
                    "categoryIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "An ID in `categoryIds` is not a category of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The list leaves out a category or is otherwise stale",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog/categories": {
      "get": {
        "operationId": "listQuillsChangelogCategories",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "List changelog categories",
        "description": "Lists changelog categories in position order (then creation time and ID), with offset paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Categories in position order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "categories": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsChangelogCategory"
                      },
                      "description": "One page of categories in position order"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "`offset` value for the next page. Null on the last page.",
                      "example": 50
                    }
                  },
                  "required": [
                    "categories",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsChangelogCategory",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Create a changelog category",
        "description": "Creates a changelog category at the end of the order. Requires the `quills:manage_settings` permission. Records a `changelog.category_created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Category name, 1 to 50 characters after trimming. Must be unique in the workspace regardless of case.",
                    "example": "Improvement"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "default": "#6b7280",
                    "description": "Category color as a `#RRGGBB` hex code. Defaults to gray.",
                    "example": "#3b82f6"
                  },
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "IDs of the customer segments that may see entries in this category. Empty: no restriction. Otherwise an entry in the category shows only to signed-in members of one of these segments. Up to 50 IDs, each once; every ID must be a segment that is not deleted.",
                    "example": [
                      "segment_01jd3k8m2q5r7t9v1w3x5y7z9b"
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsChangelogCategory"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A segment in `segmentIds` was not found or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A category with this name already exists (names compare case-insensitively)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog/categories/{categoryId}": {
      "patch": {
        "operationId": "updateQuillsChangelogCategory",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Update a changelog category",
        "description": "Changes the fields that are sent and leaves the others as they are; send at least one. `segmentIds` replaces the stored list. Requires the `quills:manage_settings` permission. Records a `changelog.category_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog category ID",
              "example": "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9e"
            },
            "required": true,
            "description": "Changelog category ID",
            "name": "categoryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Category name, 1 to 50 characters after trimming. Must be unique in the workspace regardless of case.",
                    "example": "Improvement"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "description": "Color as a six-digit hex code in `#RRGGBB` form",
                    "example": "#6b7280"
                  },
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "IDs of the customer segments that may see entries in this category. Empty: no restriction. Otherwise an entry in the category shows only to signed-in members of one of these segments. Up to 50 IDs, each once; every ID must be a segment that is not deleted.",
                    "example": [
                      "segment_01jd3k8m2q5r7t9v1w3x5y7z9b"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsChangelogCategory"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No category with this ID, or a segment in `segmentIds` was not found or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another category already has this name (names compare case-insensitively)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsChangelogCategory",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Delete a changelog category",
        "description": "Permanently deletes a changelog category and removes it from every entry; the entries themselves stay. Requires the `quills:manage_settings` permission. Records a `changelog.category_deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog category ID",
              "example": "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9e"
            },
            "required": true,
            "description": "Changelog category ID",
            "name": "categoryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted category",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted category",
                      "example": "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9e"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No category with this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog/settings": {
      "get": {
        "operationId": "getQuillsChangelogSettings",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Get changelog settings",
        "description": "Returns the workspace's changelog settings. Settings that were never set, or whose stored value is invalid, read as their defaults. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Changelog settings with defaults applied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsChangelogSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsChangelogSettings",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Update changelog settings",
        "description": "Changes the changelog settings that are sent and keeps the others; send at least one. Other workspace settings are not touched. Requires the `quills:manage_settings` permission. Records a `settings.changelog_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "audience": {
                    "type": "string",
                    "enum": [
                      "public",
                      "authenticated"
                    ],
                    "description": "Who can read the portal changelog. `public`: anyone, signed in or not. `authenticated`: signed-in customers only. Defaults to `public`."
                  },
                  "autoSubscribe": {
                    "type": "boolean",
                    "description": "Whether customers identified through the widget are subscribed to the changelog automatically. A customer who unsubscribed is never subscribed again. Defaults to true."
                  },
                  "emailsDisabled": {
                    "type": "boolean",
                    "description": "Changelog email preference. It is stored and returned, but it does not stop the shipped notices sent when an entry is published; use `notify` on the entry for that. Defaults to false."
                  },
                  "widgetAutoOpen": {
                    "type": "boolean",
                    "description": "The widget opens the newest unread entry on a customer's next visit, once. Off by default."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated changelog settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsChangelogSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace's stored settings are not a JSON object, so they cannot be merged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog/shipped-posts": {
      "get": {
        "operationId": "searchQuillsShippedPosts",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Search shipped posts to link to a changelog entry",
        "description": "Searches posts whose status is in the `complete` category, for linking to a changelog entry. Only posts the caller can see are returned, most votes first, then newest first. There is no paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Text the post title must contain, case-insensitive. Omit it to list all shipped posts.",
              "example": "export"
            },
            "required": false,
            "description": "Text the post title must contain, case-insensitive. Omit it to list all shipped posts.",
            "name": "query",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only posts on this board. The caller must be able to see it.",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9b"
            },
            "required": false,
            "description": "Only posts on this board. The caller must be able to see it.",
            "name": "boardId",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of posts to return",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of posts to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching shipped posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9d"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Export boards to CSV"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Post's vote count",
                            "example": 42
                          },
                          "boardSlug": {
                            "type": "string",
                            "description": "URL slug of the post's board",
                            "example": "feature-requests"
                          },
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the post's author. Null when the author is unknown or has no name.",
                            "example": "Sam Rivera"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was created, in ISO 8601 UTC",
                            "example": "2026-10-02T11:00:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "voteCount",
                          "boardSlug",
                          "authorName",
                          "createdAt"
                        ]
                      },
                      "description": "Matching shipped posts, most votes first"
                    }
                  },
                  "required": [
                    "posts"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No board with this ID that the caller can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog": {
      "get": {
        "operationId": "listQuillsChangelog",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "List changelog entries, drafts included",
        "description": "Lists changelog entries that are not deleted, including drafts and scheduled entries, sorted by creation time (then ID) and paged with a cursor. Linked posts the caller cannot see are left out of each entry. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "scheduled",
                "published",
                "all"
              ],
              "default": "all",
              "description": "Publish state to list. `draft`: no publish time. `scheduled`: publish time in the future. `published`: publish time now or past. `all`: every state."
            },
            "required": false,
            "description": "Publish state to list. `draft`: no publish time. `scheduled`: publish time in the future. `published`: publish time now or past. `all`: every state.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest"
              ],
              "default": "newest",
              "description": "Order by creation time. `newest`: most recently created first. `oldest`: oldest first."
            },
            "required": false,
            "description": "Order by creation time. `newest`: most recently created first. `oldest`: oldest first.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated IDs, at most 50"
            },
            "required": false,
            "description": "Comma-separated IDs, at most 50",
            "name": "categoryIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "English full-text search over title and body. Supports web search syntax: quoted phrases, `or` and `-` to exclude a word.",
              "example": "dark mode"
            },
            "required": false,
            "description": "English full-text search over title and body. Supports web search syntax: quoted phrases, `or` and `-` to exclude a word.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "The previous page's `nextCursor`, to get the entries after it. Keep the same `status`, `sort` and `search`.",
              "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": false,
            "description": "The previous page's `nextCursor`, to get the entries after it. Keep the same `status`, `sort` and `search`.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Maximum number of entries to return",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of entries to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsChangelogEntry"
                      },
                      "description": "One page of entries"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page: the ID of the last entry. Null on the last page.",
                      "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9f"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "True when more entries follow this page"
                    }
                  },
                  "required": [
                    "entries",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsChangelogEntry",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Create a changelog entry",
        "description": "Creates a changelog entry as a draft, scheduled for later, or published, with the caller as author. Requires the `quills:create` permission.\n\nRecords a `changelog.created` event, or `changelog.published` when the entry is published now. On `changelog.published`, a background job tells the voters and status followers of the linked posts that their request shipped, unless `notify` is false; this request sends no mail itself. Publishing also flags help center articles linked to the entry or its posts for a freshness review.\n\nAnswers 400 for a scheduled time that is not in the future, a published time in the future, or a display date on an entry that is not published or in the future.\n\nSend `idempotencyKey`, or an `Idempotency-Key` header, to make retries safe: a repeat with the same key and body returns the entry created first, and the same key with a different body answers 409.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Entry title. Leading and trailing spaces are trimmed.",
                    "example": "Faster board filters"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "Entry body in Markdown, up to 100,000 characters",
                    "example": "Filters now apply instantly, even on boards with thousands of posts."
                  },
                  "publishState": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "draft"
                            ],
                            "description": "`draft`: keep or make the entry unpublished"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "scheduled"
                            ],
                            "description": "`scheduled`: publish the entry automatically at `publishAt`"
                          },
                          "publishAt": {
                            "type": "string",
                            "maxLength": 64,
                            "format": "date-time",
                            "description": "Future publish time, ISO 8601 with a UTC offset. A time that is not in the future is rejected with 400.",
                            "example": "2026-12-02T15:00:00Z"
                          }
                        },
                        "required": [
                          "type",
                          "publishAt"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "published"
                            ],
                            "description": "`published`: publish the entry now, or at a past `publishAt`"
                          },
                          "publishAt": {
                            "type": "string",
                            "maxLength": 64,
                            "format": "date-time",
                            "description": "Publish time, ISO 8601 with a UTC offset. Defaults to now. A future time is rejected with 400; use `scheduled` instead.",
                            "example": "2026-11-19T09:10:00Z"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ],
                    "description": "Publish state to set, chosen by `type`. `draft`: unpublished. `scheduled`: published automatically at the future `publishAt`; when it goes live, the voters and status followers of its linked posts are notified. `published`: published now, or at a past `publishAt`."
                  },
                  "displayDate": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "Date to show readers instead of the publish date, ISO 8601 with a UTC offset. Allowed only on an entry that is published now; it cannot be in the future (400). A date on the same UTC day as the publish date is stored as null. Send null to show the publish date.",
                    "example": "2026-11-15T00:00:00Z"
                  },
                  "notify": {
                    "type": "boolean",
                    "description": "Whether publishing the entry in this request tells the voters and status followers of its linked posts that their request shipped. Defaults to true. Ignored when the request does not publish the entry. Notices are sent later by a background job, not by this request."
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 100,
                    "description": "Key that makes the request safe to retry, 8 to 100 characters. The `Idempotency-Key` header works too.",
                    "example": "release-v2.14.0"
                  },
                  "linkedPostIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post` prefix. Requests also accept the bare UUID.",
                      "example": "post_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "IDs of the feedback posts the entry announces, up to 50, each once. Replaces the linked posts that the caller can see; links to posts the caller cannot see are kept. Every ID must be a post the caller can see (404 otherwise).",
                    "example": [
                      "post_01jd3k8m2q5r7t9v1w3x5y7z9d"
                    ]
                  },
                  "categoryIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `changelog_category` prefix. Requests also accept the bare UUID.",
                      "example": "changelog_category_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "IDs of the entry's changelog categories, up to 50, each once. Replaces the stored categories. Every ID must exist (404 otherwise).",
                    "example": [
                      "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9e"
                    ]
                  },
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "IDs of the customer segments that may see the entry, up to 50, each once. Empty: everyone who can see the changelog. Replaces the stored list. Every ID must be a segment that is not deleted (404 otherwise).",
                    "example": [
                      "segment_01jd3k8m2q5r7t9v1w3x5y7z9b"
                    ]
                  }
                },
                "required": [
                  "title",
                  "content",
                  "publishState"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created entry",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/QuillsChangelogEntry"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "publishedNow": {
                          "type": "boolean",
                          "description": "True when this request published the entry"
                        },
                        "replayed": {
                          "type": "boolean",
                          "description": "True when an earlier entry was returned for the same idempotency key"
                        }
                      },
                      "required": [
                        "publishedNow"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A linked post, category or segment was not found or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Idempotency key already used with different payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog/{entryId}": {
      "get": {
        "operationId": "getQuillsChangelogEntry",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Get a changelog entry, drafts included",
        "description": "Returns one changelog entry in any publish state. Linked posts the caller cannot see are left out. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog entry ID",
              "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Changelog entry ID",
            "name": "entryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The entry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsChangelogEntry"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No changelog entry with this ID, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsChangelogEntry",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Update a changelog entry and its publish state",
        "description": "Changes the fields that are sent and leaves the others as they are; send at least one. A list replaces the stored set, but links to posts the caller cannot see are kept. Changing `content` drops any imported rich-text version of the body. Requires the `quills:update` permission.\n\nRecords a `changelog.updated` event, or `changelog.published` when `publishState` publishes an entry that was not published before. On `changelog.published`, a background job tells the voters and status followers of the linked posts that their request shipped, unless `notify` is false, and help center articles linked to the entry or its posts are flagged for a freshness review.\n\nAnswers 400 for a scheduled time that is not in the future, a published time in the future, or a display date on an entry that is not published or in the future.\n\nTo change links without resending the whole list, send `addLinkedPostIds` and `removeLinkedPostIds` instead of `linkedPostIds`; the two can't name the same post, and neither can be combined with `linkedPostIds` (400).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog entry ID",
              "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Changelog entry ID",
            "name": "entryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "New title. Leading and trailing spaces are trimmed.",
                    "example": "Faster board filters"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "New Markdown body, up to 100,000 characters",
                    "example": "Filters now apply instantly, even on boards with thousands of posts."
                  },
                  "publishState": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "draft"
                            ],
                            "description": "`draft`: keep or make the entry unpublished"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "scheduled"
                            ],
                            "description": "`scheduled`: publish the entry automatically at `publishAt`"
                          },
                          "publishAt": {
                            "type": "string",
                            "maxLength": 64,
                            "format": "date-time",
                            "description": "Future publish time, ISO 8601 with a UTC offset. A time that is not in the future is rejected with 400.",
                            "example": "2026-12-02T15:00:00Z"
                          }
                        },
                        "required": [
                          "type",
                          "publishAt"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "published"
                            ],
                            "description": "`published`: publish the entry now, or at a past `publishAt`"
                          },
                          "publishAt": {
                            "type": "string",
                            "maxLength": 64,
                            "format": "date-time",
                            "description": "Publish time, ISO 8601 with a UTC offset. Defaults to now. A future time is rejected with 400; use `scheduled` instead.",
                            "example": "2026-11-19T09:10:00Z"
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ],
                    "description": "Publish state to set, chosen by `type`. `draft`: unpublished. `scheduled`: published automatically at the future `publishAt`; when it goes live, the voters and status followers of its linked posts are notified. `published`: published now, or at a past `publishAt`."
                  },
                  "displayDate": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "Date to show readers instead of the publish date, ISO 8601 with a UTC offset. Allowed only on an entry that is published now; it cannot be in the future (400). A date on the same UTC day as the publish date is stored as null. Send null to show the publish date.",
                    "example": "2026-11-15T00:00:00Z"
                  },
                  "notify": {
                    "type": "boolean",
                    "description": "Whether publishing the entry in this request tells the voters and status followers of its linked posts that their request shipped. Defaults to true. Ignored when the request does not publish the entry. Notices are sent later by a background job, not by this request."
                  },
                  "addLinkedPostIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post` prefix. Requests also accept the bare UUID.",
                      "example": "post_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Posts to link, keeping the existing links. Can't be combined with `linkedPostIds`.",
                    "example": [
                      "post_01jd3k8m2q5r7t9v1w3x5y7z9b"
                    ]
                  },
                  "removeLinkedPostIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post` prefix. Requests also accept the bare UUID.",
                      "example": "post_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Posts to unlink, keeping the other links. Can't be combined with `linkedPostIds`.",
                    "example": [
                      "post_01jd3k8m2q5r7t9v1w3x5y7z9c"
                    ]
                  },
                  "linkedPostIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post` prefix. Requests also accept the bare UUID.",
                      "example": "post_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "IDs of the feedback posts the entry announces, up to 50, each once. Replaces the linked posts that the caller can see; links to posts the caller cannot see are kept. Every ID must be a post the caller can see (404 otherwise).",
                    "example": [
                      "post_01jd3k8m2q5r7t9v1w3x5y7z9d"
                    ]
                  },
                  "categoryIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `changelog_category` prefix. Requests also accept the bare UUID.",
                      "example": "changelog_category_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "IDs of the entry's changelog categories, up to 50, each once. Replaces the stored categories. Every ID must exist (404 otherwise).",
                    "example": [
                      "changelog_category_01jd3k8m2q5r7t9v1w3x5y7z9e"
                    ]
                  },
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "IDs of the customer segments that may see the entry, up to 50, each once. Empty: everyone who can see the changelog. Replaces the stored list. Every ID must be a segment that is not deleted (404 otherwise).",
                    "example": [
                      "segment_01jd3k8m2q5r7t9v1w3x5y7z9b"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated entry",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/QuillsChangelogEntry"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "publishedNow": {
                          "type": "boolean",
                          "description": "True when this request published the entry"
                        }
                      },
                      "required": [
                        "publishedNow"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No changelog entry with this ID, or it was deleted; or a linked post, category or segment was not found or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsChangelogEntry",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Delete a changelog entry",
        "description": "Soft-deletes a changelog entry: it disappears from every list and from customers, and its publish time is kept. Deleting an entry that is already deleted answers 404. Requires the `quills:delete` permission. Records a `changelog.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog entry ID",
              "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Changelog entry ID",
            "name": "entryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted entry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted entry",
                      "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No changelog entry with this ID, or it was already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/moderation/pending": {
      "get": {
        "operationId": "listQuillsPendingModeration",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List posts or comments that wait for review",
        "description": "Lists pending posts or pending comments, newest first, with offset paging. Only content that the caller may see: deleted content, test-customer content and content on boards the caller cannot see (a board linked to projects needs access to one of them) are left out. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "post",
                "comment"
              ],
              "default": "post",
              "description": "Queue to list. `post`: pending posts, returned in `posts`. `comment`: pending comments, returned in `comments`. Default `post`."
            },
            "required": false,
            "description": "Queue to list. `post`: pending posts, returned in `posts`. `comment`: pending comments, returned in `comments`. Default `post`.",
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the requested queue",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Dark mode"
                          },
                          "content": {
                            "type": "string",
                            "description": "Post body text",
                            "example": "Please add a dark theme for night shifts."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the post was created",
                            "example": "2026-11-18T14:32:05.000Z"
                          },
                          "boardId": {
                            "type": "string",
                            "description": "ID of the post's board",
                            "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                          },
                          "boardName": {
                            "type": "string",
                            "description": "Name of the post's board",
                            "example": "Feature requests"
                          },
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the author; null when the author has none",
                            "example": "Ada Park"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "content",
                          "createdAt",
                          "boardId",
                          "boardName",
                          "authorName"
                        ]
                      },
                      "description": "Pending posts when `type` is `post`; empty otherwise"
                    },
                    "comments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Comment ID",
                            "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                          },
                          "content": {
                            "type": "string",
                            "description": "Comment text",
                            "example": "Same problem here, it blocks our rollout."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the comment was created",
                            "example": "2026-11-19T08:04:11.000Z"
                          },
                          "postId": {
                            "type": "string",
                            "description": "ID of the post the comment is on",
                            "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "postTitle": {
                            "type": "string",
                            "description": "Title of the post the comment is on",
                            "example": "Dark mode"
                          },
                          "boardName": {
                            "type": "string",
                            "description": "Name of the post's board",
                            "example": "Feature requests"
                          },
                          "boardSlug": {
                            "type": "string",
                            "description": "URL slug of the post's board",
                            "example": "feature-requests"
                          },
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the comment's author; null when the author has none",
                            "example": "Ada Park"
                          }
                        },
                        "required": [
                          "id",
                          "content",
                          "createdAt",
                          "postId",
                          "postTitle",
                          "boardName",
                          "boardSlug",
                          "authorName"
                        ]
                      },
                      "description": "Pending comments when `type` is `comment`; empty otherwise"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page; null when this is the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "posts",
                    "comments",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/moderation/status": {
      "get": {
        "operationId": "getQuillsModerationStatus",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get whether moderation is in use and how much waits for review",
        "description": "Returns whether moderation is in use and how many posts and comments wait for review. Counts only content the caller may see, as listQuillsPendingModeration does. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Moderation status over the content that the caller may see",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether moderation is in use: the workspace default holds content (`requireApproval` other than `none`, `holdImages` or `holdLinks`), a board the caller can see has its own moderation rule on, or content waits for review"
                    },
                    "pendingCount": {
                      "type": "number",
                      "description": "Number of pending posts plus pending comments",
                      "example": 3
                    }
                  },
                  "required": [
                    "enabled",
                    "pendingCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/moderation/posts/{postId}/approve": {
      "post": {
        "operationId": "approveQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Publish a post that waits for review",
        "description": "Moves a pending post to `published`. Requires the `quills:update` permission and access to the post's board. Records a `post.approved` event for later announcement handlers; this request itself sends no mail, webhook or notification.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The published post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the post or comment that was moderated",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The post is not awaiting review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/moderation/posts/{postId}/reject": {
      "post": {
        "operationId": "rejectQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Reject a post that waits for review",
        "description": "Soft-deletes a pending post and keeps it `pending`, so restoring it returns it to the review queue. When the post was merged into another post, recounts that post's votes and comments. Requires the `quills:update` permission and access to the post's board. Records a `post.rejected` event with the reason. Sends no mail or notification.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Reason for the rejection, up to 500 characters. Recorded in the change event and the audit log; may be empty.",
                    "example": "Duplicate of an existing request"
                  }
                },
                "required": [
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The rejected post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the post or comment that was moderated",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The post is not awaiting review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/visibility": {
      "put": {
        "operationId": "setQuillsPostVisibility",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Show a post on its board, to its author only, or hide it",
        "description": "Moves a published post to `archived` (hidden from its board, so only the team sees it) or back to `published`. With `visible` and `authorOnly` the post stays published but only its author and the team see it. A post that waits for review uses approveQuillsPost instead. Requires the `quills:update` permission and access to the post's board. Records a `post.updated` event and, when author-only visibility changes, a `post.hidden` or `post.shown` activity entry. Repeating the same request changes nothing. Sends no mail or notification.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "visible": {
                    "type": "boolean",
                    "description": "Whether the post is shown: true publishes it, false moves it to `archived`"
                  },
                  "authorOnly": {
                    "type": "boolean",
                    "description": "With `visible`: only the post's author and the team see it. Ignored when `visible` is false. Absent means false."
                  }
                },
                "required": [
                  "visible"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post and its new moderation state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "New moderation state: `published` or `archived`",
                      "example": "published"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Whether only the author and the team see the post"
                    }
                  },
                  "required": [
                    "id",
                    "moderationState",
                    "isHidden"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The post is neither published nor archived, for example it waits for review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/moderation/comments/{commentId}/approve": {
      "post": {
        "operationId": "approveQuillsComment",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Publish a comment that waits for review",
        "description": "Moves a pending comment to `published`. A public comment by a real (non-test) customer is added to its post's comment count, and to the count of the post it was merged into. Requires the `quills:update` permission and access to the post's board. Records a `comment.approved` event. Sends no mail or notification.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID, as a TypeID or a UUID",
              "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
            },
            "required": true,
            "description": "Comment ID, as a TypeID or a UUID",
            "name": "commentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The published comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the post or comment that was moderated",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found or deleted, or its post is deleted or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The comment is not awaiting review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/moderation/comments/{commentId}/reject": {
      "post": {
        "operationId": "rejectQuillsComment",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Reject a comment that waits for review",
        "description": "Soft-deletes a pending comment and leaves it `pending`. Requires the `quills:update` permission and access to the post's board. Records a `comment.rejected` event with the reason. Sends no mail or notification.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comment ID, as a TypeID or a UUID",
              "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
            },
            "required": true,
            "description": "Comment ID, as a TypeID or a UUID",
            "name": "commentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Reason for the rejection, up to 500 characters. Recorded in the change event and the audit log; may be empty.",
                    "example": "Duplicate of an existing request"
                  }
                },
                "required": [
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The rejected comment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the post or comment that was moderated",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found or deleted, or its post is deleted or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The comment is not awaiting review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/moderation/default": {
      "put": {
        "operationId": "setQuillsModerationDefault",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Set the workspace moderation default",
        "description": "Sets which new posts and comments wait for review across the workspace. A board's own moderation rule overrides it. Changes only the moderation default; other portal settings stay as stored. An omitted hold flag keeps its stored value (false when never set). Requires the `quills:manage_settings` permission. Records a `settings.moderation_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requireApproval": {
                    "type": "string",
                    "enum": [
                      "none",
                      "anonymous",
                      "authenticated",
                      "all"
                    ],
                    "description": "Which new content waits for review unless a board's own rule says otherwise. `none`: nothing. `anonymous`: posts by people who are not signed in. `authenticated`: posts by signed-in people. `all`: every post and comment."
                  },
                  "holdImages": {
                    "type": "boolean",
                    "description": "Image hold setting; absent keeps the stored value"
                  },
                  "holdLinks": {
                    "type": "boolean",
                    "description": "Hold a post or comment whose text contains a link; absent keeps the stored value"
                  },
                  "holdSpam": {
                    "type": "boolean",
                    "description": "Hold a post or comment that the spam rules flag; absent keeps the stored value"
                  },
                  "holdSensitive": {
                    "type": "boolean",
                    "description": "Hold a post or comment that shows personal or secret data such as an email, a card number or a secret key; absent keeps the stored value"
                  }
                },
                "required": [
                  "requireApproval"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored moderation default",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "moderationDefault": {
                      "type": "object",
                      "properties": {
                        "requireApproval": {
                          "type": "string",
                          "enum": [
                            "none",
                            "anonymous",
                            "authenticated",
                            "all"
                          ],
                          "description": "Which new content waits for review unless a board's own rule says otherwise. `none`: nothing. `anonymous`: posts by people who are not signed in. `authenticated`: posts by signed-in people. `all`: every post and comment."
                        },
                        "holdImages": {
                          "type": "boolean",
                          "description": "Image hold setting. It is stored and counts toward the moderation status `enabled` flag."
                        },
                        "holdLinks": {
                          "type": "boolean",
                          "description": "Hold a post or comment whose text contains a link"
                        },
                        "holdSpam": {
                          "type": "boolean",
                          "description": "Hold a post or comment that the spam rules flag (links, phrases, shouting, repetition)"
                        },
                        "holdSensitive": {
                          "type": "boolean",
                          "description": "Hold a post or comment that shows an email, a phone or card number, an IBAN or a secret key. With AI configured, a customer post's images are checked after it commits, and a sensitive image returns the post to review."
                        }
                      },
                      "required": [
                        "requireApproval",
                        "holdImages",
                        "holdLinks",
                        "holdSpam",
                        "holdSensitive"
                      ],
                      "description": "The moderation default as stored after the change"
                    }
                  },
                  "required": [
                    "moderationDefault"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored portal settings are not a JSON object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/merge-preview": {
      "get": {
        "operationId": "getQuillsPostMergePreview",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Preview a merge of this post into another post",
        "description": "Shows both posts and what their counts would be after merging the path post (the duplicate) into `into` (the canonical post). Changes nothing. Both posts must be visible to the caller: not deleted, not test-customer posts, on boards the caller can see. The merged vote count counts each voter once. A post cannot merge into itself (400). Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the canonical post to merge into",
              "example": "post_01jd3kp1c3e5g7j9m1p3r5t7w9"
            },
            "required": true,
            "description": "ID of the canonical post to merge into",
            "name": "into",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Both posts and the counts after a merge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "duplicate": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Post ID",
                          "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                        },
                        "title": {
                          "type": "string",
                          "description": "Post title",
                          "example": "Export reports to CSV"
                        },
                        "voteCount": {
                          "type": "number",
                          "description": "Current vote count of the post",
                          "example": 12
                        },
                        "commentCount": {
                          "type": "number",
                          "description": "Current comment count of the post",
                          "example": 4
                        },
                        "boardId": {
                          "type": "string",
                          "description": "ID of the post's board",
                          "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                        },
                        "boardName": {
                          "type": "string",
                          "description": "Name of the post's board",
                          "example": "Feature requests"
                        },
                        "canonicalPostId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the post this post is already merged into; null when it is not merged",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "voteCount",
                        "commentCount",
                        "boardId",
                        "boardName",
                        "canonicalPostId"
                      ],
                      "description": "The post that would be merged away"
                    },
                    "canonical": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Post ID",
                          "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                        },
                        "title": {
                          "type": "string",
                          "description": "Post title",
                          "example": "Export reports to CSV"
                        },
                        "voteCount": {
                          "type": "number",
                          "description": "Current vote count of the post",
                          "example": 12
                        },
                        "commentCount": {
                          "type": "number",
                          "description": "Current comment count of the post",
                          "example": 4
                        },
                        "boardId": {
                          "type": "string",
                          "description": "ID of the post's board",
                          "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                        },
                        "boardName": {
                          "type": "string",
                          "description": "Name of the post's board",
                          "example": "Feature requests"
                        },
                        "canonicalPostId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the post this post is already merged into; null when it is not merged",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "voteCount",
                        "commentCount",
                        "boardId",
                        "boardName",
                        "canonicalPostId"
                      ],
                      "description": "The post that would keep the merged votes and comments"
                    },
                    "mergedVoteCount": {
                      "type": "number",
                      "description": "Vote count of the canonical post after the merge, counting each voter of either thread once",
                      "example": 15
                    },
                    "mergedCommentCount": {
                      "type": "number",
                      "description": "Sum of both posts' comment counts",
                      "example": 9
                    }
                  },
                  "required": [
                    "duplicate",
                    "canonical",
                    "mergedVoteCount",
                    "mergedCommentCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Either post not found, deleted, a test-customer post, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/merge": {
      "post": {
        "operationId": "mergeQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Merge this post into a canonical post",
        "description": "Links the path post (the duplicate) to `canonicalPostId`. Votes and comments stay on the duplicate and count on the canonical post, which is recounted with each voter counted once. Runs in one transaction: the link, both counts, `post.merged_in` and `post.merged_away` activity entries and a `post.merged` event. Both posts must be visible to the caller: not deleted, not test-customer posts, on boards the caller can see. A post cannot merge into itself (400). Requires the `quills:update` permission. Sends no mail or notification.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "canonicalPostId": {
                    "type": "string",
                    "description": "ID of the canonical post to merge into; it must not itself be merged",
                    "example": "post_01jd3kp1c3e5g7j9m1p3r5t7w9"
                  }
                },
                "required": [
                  "canonicalPostId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The canonical post's new vote count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "canonicalPost": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the canonical post",
                          "example": "post_01jd3kp1c3e5g7j9m1p3r5t7w9"
                        },
                        "voteCount": {
                          "type": "number",
                          "description": "The canonical post's vote count after the merge",
                          "example": 15
                        }
                      },
                      "required": [
                        "id",
                        "voteCount"
                      ],
                      "description": "The post that the duplicate now counts on"
                    },
                    "duplicatePost": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the merged post",
                          "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "description": "The post that was merged"
                    }
                  },
                  "required": [
                    "canonicalPost",
                    "duplicatePost"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Either post not found, deleted, a test-customer post, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The duplicate is already merged, the target is itself a merged post, or the duplicate has posts merged into it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/unmerge": {
      "post": {
        "operationId": "unmergeQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Make a merged post independent again",
        "description": "Removes the merge link of the path post, so its votes and comments count on it again. Both posts are recounted. Runs in one transaction: the link, both counts, a `post.unmerged` activity entry on each post and a `post.unmerged` event. The merged post must be visible to the caller; the canonical post may be deleted but must be on a board the caller can see. Requires the `quills:update` permission. Sends no mail or notification.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The canonical post's new vote count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "post": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the post that is independent again",
                          "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "description": "The unmerged post"
                    },
                    "canonicalPost": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the post it was merged into",
                          "example": "post_01jd3kp1c3e5g7j9m1p3r5t7w9"
                        },
                        "voteCount": {
                          "type": "number",
                          "description": "That post's vote count after the unmerge",
                          "example": 12
                        }
                      },
                      "required": [
                        "id",
                        "voteCount"
                      ],
                      "description": "The post it was merged into"
                    }
                  },
                  "required": [
                    "post",
                    "canonicalPost"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, a test-customer post, or on a board the caller cannot see, or its canonical post is on such a board",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The post is not merged, or its merge changed during the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/merged": {
      "get": {
        "operationId": "listQuillsMergedPosts",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the posts merged into a post",
        "description": "Lists the posts merged into this post that the caller may see (not deleted, not test-customer posts, on boards the caller can see), oldest merge first, with offset paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of merged posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "posts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the merged post",
                            "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title of the merged post",
                            "example": "CSV export for reports"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Number of votes stored on the merged post itself, without test customers",
                            "example": 3
                          },
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the author; null when the author has none",
                            "example": "Ada Park"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the merged post was created",
                            "example": "2026-11-02T10:20:00.000Z"
                          },
                          "mergedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the post was merged; null when not recorded",
                            "example": "2026-11-21T16:45:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "voteCount",
                          "authorName",
                          "createdAt",
                          "mergedAt"
                        ]
                      },
                      "description": "Merged posts of this page, oldest merge first"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page; null when this is the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "posts",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, a test-customer post, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/post-views": {
      "get": {
        "operationId": "listQuillsPostViews",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List saved post views",
        "description": "Lists shared views and the caller's own private views, sorted by name, with offset paging. Deleted views and other teammates' private views are left out. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of saved views",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "views": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsPostView"
                      },
                      "description": "Saved views of this page"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page; null when this is the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "views",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsPostView",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Save a post view",
        "description": "Saves a named set of inbox filters, owned by the caller. Names need not be unique. Requires the `quills:create` permission. Records a `post_view.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "View name, 1 to 80 characters after trimming",
                    "example": "Enterprise asks"
                  },
                  "filters": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "maxItems": 50,
                        "description": "Saved status filter values, at most 50"
                      },
                      "board": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "maxItems": 50,
                        "description": "Saved board filter values, at most 50"
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "maxItems": 50,
                        "description": "Saved tag filter values, at most 50"
                      },
                      "segmentIds": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "maxItems": 50,
                        "description": "Saved customer segment IDs, at most 50"
                      },
                      "owner": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "description": "Saved owner filter value"
                      },
                      "responded": {
                        "type": "string",
                        "enum": [
                          "responded",
                          "unresponded"
                        ],
                        "description": "Saved team-response filter. `responded`: posts the team has answered. `unresponded`: posts without a team answer."
                      },
                      "minVotes": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000,
                        "description": "Saved minimum vote count",
                        "example": 10
                      },
                      "minComments": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000,
                        "description": "Saved minimum comment count",
                        "example": 2
                      },
                      "hasDuplicates": {
                        "type": "boolean",
                        "enum": [
                          true
                        ],
                        "description": "Saved filter for posts with merged duplicates; only `true` is stored"
                      },
                      "showDeleted": {
                        "type": "boolean",
                        "enum": [
                          true
                        ],
                        "description": "Saved filter for deleted posts; only `true` is stored"
                      },
                      "sort": {
                        "type": "string",
                        "enum": [
                          "newest",
                          "oldest",
                          "votes",
                          "priority",
                          "rice",
                          "trending",
                          "stale"
                        ],
                        "description": "Saved sort order: `newest`, `oldest`, `votes`, `priority`, `rice`, `trending` or `stale`"
                      },
                      "dateFrom": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40,
                        "description": "Saved start of the creation date range, as the client stored it",
                        "example": "2026-11-01"
                      },
                      "dateTo": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40,
                        "description": "Saved end of the creation date range, as the client stored it",
                        "example": "2026-11-30"
                      },
                      "updatedBefore": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 40,
                        "description": "Saved last-changed-before bound, as the client stored it",
                        "example": "2026-10-01"
                      }
                    },
                    "additionalProperties": false,
                    "description": "Inbox filters to save; unknown keys are rejected. The server stores them as given and does not run them: a client restores them into the post list, which applies its own checks."
                  },
                  "isShared": {
                    "type": "boolean",
                    "description": "Whether every teammate sees the view. Default true; false keeps it private to the caller."
                  }
                },
                "required": [
                  "name",
                  "filters"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsPostView"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/post-views/{viewId}": {
      "delete": {
        "operationId": "deleteQuillsPostView",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Delete a saved post view",
        "description": "Soft-deletes a saved view. Requires the `quills:update` permission; another teammate's shared view also needs `quills:delete` (403 otherwise). Records a `post_view.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Saved view ID, as a TypeID or a UUID",
              "example": "post_view_01jd3kq4e6g8j0m2p4r6t8w0y2"
            },
            "required": true,
            "description": "Saved view ID, as a TypeID or a UUID",
            "name": "viewId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted view",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted view",
                      "example": "post_view_01jd3kq4e6g8j0m2p4r6t8w0y2"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "View not found, already deleted, or another teammate's private view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/portal/access": {
      "put": {
        "operationId": "updateQuillsPortalAccess",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Update who may open a private portal",
        "description": "Replaces the private-portal access policy that evaluateQuillsMyPortalAccess applies. Requires the `manage_settings` permission. visibility is always set; allowedDomains and allowedSegmentIds keep their stored value when omitted. Domains are trimmed, lowercased and stripped of a leading @, and entries that are not a bare domain are dropped. Unknown or deleted segments are dropped. A workspace member always has access. Records a `settings.portal_access_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "public",
                      "private"
                    ],
                    "description": "public: anyone may open the portal. private: only workspace members and admitted customers.",
                    "example": "private"
                  },
                  "allowedDomains": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 253
                    },
                    "maxItems": 100,
                    "description": "Email domains whose verified customers may open a private portal, such as example.com or @example.com. Replaces the stored list; omit to keep it.",
                    "example": [
                      "example.com"
                    ]
                  },
                  "allowedSegmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 100,
                    "description": "Segments whose members may open a private portal. Replaces the stored list; omit to keep it, send [] to clear it.",
                    "example": [
                      "segment_01m8rxfrbhfzr9r837k90wcggm"
                    ]
                  }
                },
                "required": [
                  "visibility"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The portal access policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "public",
                        "private"
                      ],
                      "description": "Who may open the portal. public: anyone. private: only workspace members and the customers that allowedDomains, allowedSegmentIds, an accepted portal invite or widget token sign-in admit.",
                      "example": "private"
                    },
                    "allowedDomains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Email domains, lowercase and without a leading @, whose signed-in customers with a verified email may open a private portal.",
                      "example": [
                        "example.com"
                      ]
                    },
                    "allowedSegmentIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Customer segments whose members (with a verified email) may open a private portal.",
                      "example": [
                        "segment_01m8rxfrbhfzr9r837k90wcggm"
                      ]
                    }
                  },
                  "required": [
                    "visibility",
                    "allowedDomains",
                    "allowedSegmentIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/settings/portal/sign-in": {
      "put": {
        "operationId": "updateQuillsPortalSignIn",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Update how customers sign in to the portal",
        "description": "Replaces the portal sign-in policy. Requires the `manage_settings` permission. sso needs ssoUrl, the host app's login page: the portal sends the person there with return_to, and the host app redirects back to return_to with a token parameter signed by the widget secret. A token signs in only to a portal-only account that token sign-in created for this workspace's customer; an email that already has an account uses the sign-in page. Records a `settings.portal_sign_in_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "account",
                      "sso",
                      "disabled"
                    ],
                    "description": "account: the sign-in page. sso: the host app's login page at ssoUrl. disabled: no customer sign-in.",
                    "example": "sso"
                  },
                  "widgetSignIn": {
                    "type": "boolean",
                    "description": "Whether the widget may open the portal already signed in",
                    "example": true
                  },
                  "ssoUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "format": "uri",
                    "description": "The host app's login page. Required when mode is sso; stored as sent otherwise.",
                    "example": "https://app.example.com/login"
                  }
                },
                "required": [
                  "mode",
                  "widgetSignIn",
                  "ssoUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The portal sign-in policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "account",
                        "sso",
                        "disabled"
                      ],
                      "description": "account: customers sign in on the sign-in page (the default). sso: the portal's sign-in button opens ssoUrl, the host app's login page, which returns the person with a token signed by the widget secret. disabled: no customer signs in to the portal; it stays readable where access allows. A stored sso without ssoUrl reads as account.",
                      "example": "sso"
                    },
                    "widgetSignIn": {
                      "type": "boolean",
                      "description": "Whether the widget may open the portal already signed in, through widget token sign-in",
                      "example": true
                    },
                    "ssoUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The host app's login page (http or https). Null when none is set.",
                      "example": "https://app.example.com/login"
                    }
                  },
                  "required": [
                    "mode",
                    "widgetSignIn",
                    "ssoUrl"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "mode is sso and ssoUrl is null",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/categories/order": {
      "put": {
        "operationId": "reorderQuillsHelpCenterCategories",
        "tags": [
          "Help center"
        ],
        "summary": "Reorder the categories under one parent",
        "description": "Sets the order of the live children of `parentId` (null for top-level categories). Send each of them once, in the new order; each category's position becomes its index in the list. A partial or stale list changes nothing. Records a `help_center.categories_reordered` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parentId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ID of the live parent whose children are reordered; null for the top-level categories",
                    "example": null
                  },
                  "categoryIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `kb_category` prefix. Requests also accept the bare UUID.",
                      "example": "kb_category_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 500,
                    "description": "Every live child category of `parentId`, each once, first to last (1 to 500 IDs)",
                    "example": [
                      "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a",
                      "kb_category_01jd3m4n5p6q7r8s9t0v1w2x3y"
                    ]
                  }
                },
                "required": [
                  "parentId",
                  "categoryIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "categoryIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The category IDs in their new order",
                      "example": [
                        "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a",
                        "kb_category_01jd3m4n5p6q7r8s9t0v1w2x3y"
                      ]
                    }
                  },
                  "required": [
                    "categoryIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Parent category not found or deleted, or an ID is not a live child of the parent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The list leaves out a live child of the parent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/categories": {
      "get": {
        "operationId": "listQuillsHelpCenterCategories",
        "tags": [
          "Help center"
        ],
        "summary": "List help-center categories with article counts",
        "description": "Lists live categories, or with `deleted=true` the categories deleted in the last 30 days, as a flat list (use `parentId` to build the tree). Sorted by position, then name, then ID, with offset paging. Article counts include drafts and scheduled articles; recursive counts add every descendant, across the whole tree rather than only this page. With `deleted=true`, the counts cover deleted articles. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "`true`: list categories deleted in the last 30 days instead of live ones. `false` (default): live categories."
            },
            "required": false,
            "description": "`true`: list categories deleted in the last 30 days instead of live ones. `false` (default): live categories.",
            "name": "deleted",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "Maximum number of categories to return in the page",
              "example": 100
            },
            "required": false,
            "description": "Maximum number of categories to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Categories in position order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "categories": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/QuillsHelpCenterCategory"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "articleCount": {
                                "type": "number",
                                "description": "Articles filed directly in the category, drafts and scheduled articles included",
                                "example": 8
                              },
                              "publishedArticleCount": {
                                "type": "number",
                                "description": "Articles filed directly in the category that are published now",
                                "example": 6
                              },
                              "recursiveArticleCount": {
                                "type": "number",
                                "description": "Articles in the category and all its descendants, drafts and scheduled articles included",
                                "example": 14
                              },
                              "recursivePublishedArticleCount": {
                                "type": "number",
                                "description": "Articles in the category and all its descendants that are published now",
                                "example": 11
                              }
                            },
                            "required": [
                              "articleCount",
                              "publishedArticleCount",
                              "recursiveArticleCount",
                              "recursivePublishedArticleCount"
                            ]
                          }
                        ]
                      },
                      "description": "Categories on this page, with article counts"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page; null when this is the last page",
                      "example": 100
                    }
                  },
                  "required": [
                    "categories",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsHelpCenterCategory",
        "tags": [
          "Help center"
        ],
        "summary": "Create a help-center category",
        "description": "Creates a category, optionally under a parent. Without a slug, the category gets a free slug made from its name; a taken slug gets a numeric suffix. The public URL ID is allocated once and never changes. A placement deeper than three levels is rejected with 400. Records a `help_center.category_created` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Display name in the default locale, trimmed",
                    "example": "Billing"
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 200,
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                    "description": "URL slug. On create, left out: made from the name. A taken slug gets the first free numeric suffix, such as `billing-2`.",
                    "example": "billing"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000,
                    "description": "Short description in the default locale. Null or an empty string clears it.",
                    "example": "Invoices, payment methods and plan changes"
                  },
                  "icon": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 50,
                    "description": "Icon shown with the category, up to 50 characters. Null clears it."
                  },
                  "isPublic": {
                    "type": "boolean",
                    "description": "Whether visitors can see the category on the public help center. On create, defaults to true."
                  },
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Customer segments that can see the category publicly, up to 50 distinct live segment IDs. Empty: no segment restriction. On create, defaults to empty.",
                    "example": [
                      "segment_01jd3p8q2r5s7t9v1w3x5y7z9b"
                    ]
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "Sort position among sibling categories, lowest first. On create, defaults to 0.",
                    "example": 0
                  },
                  "parentId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ID of a live parent category; null for top level. The tree stays at most three levels deep and a category cannot move under itself or a descendant.",
                    "example": "kb_category_01jd3m4n5p6q7r8s9t0v1w2x3y"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterCategory"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Parent category or a segment not found, or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No free slug was found, or a concurrent create took it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/categories/{categoryId}": {
      "get": {
        "operationId": "getQuillsHelpCenterCategory",
        "tags": [
          "Help center"
        ],
        "summary": "Get a help-center category",
        "description": "Gets one live category with its default-locale name and description. A deleted category is not found. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Category ID: a `kb_category_` TypeID or its UUID",
              "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Category ID: a `kb_category_` TypeID or its UUID",
            "name": "categoryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterCategory"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Category not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsHelpCenterCategory",
        "tags": [
          "Help center"
        ],
        "summary": "Update or move a help-center category",
        "description": "Changes the fields that are sent; send at least one. A taken slug gets a numeric suffix. Setting `parentId` moves the category with its descendants; a move that would go deeper than three levels or create a cycle is rejected with 400. Records a `help_center.category_updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Category ID: a `kb_category_` TypeID or its UUID",
              "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Category ID: a `kb_category_` TypeID or its UUID",
            "name": "categoryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Display name in the default locale, trimmed",
                    "example": "Billing"
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 200,
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                    "description": "URL slug. On create, left out: made from the name. A taken slug gets the first free numeric suffix, such as `billing-2`.",
                    "example": "billing"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000,
                    "description": "Short description in the default locale. Null or an empty string clears it.",
                    "example": "Invoices, payment methods and plan changes"
                  },
                  "icon": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 50,
                    "description": "Icon shown with the category, up to 50 characters. Null clears it."
                  },
                  "isPublic": {
                    "type": "boolean",
                    "description": "Whether visitors can see the category on the public help center. On create, defaults to true."
                  },
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Customer segments that can see the category publicly, up to 50 distinct live segment IDs. Empty: no segment restriction. On create, defaults to empty.",
                    "example": [
                      "segment_01jd3p8q2r5s7t9v1w3x5y7z9b"
                    ]
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "Sort position among sibling categories, lowest first. On create, defaults to 0.",
                    "example": 0
                  },
                  "parentId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ID of a live parent category; null for top level. The tree stays at most three levels deep and a category cannot move under itself or a descendant.",
                    "example": "kb_category_01jd3m4n5p6q7r8s9t0v1w2x3y"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterCategory"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Category, parent category or a segment not found, or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No free slug was found, or a concurrent update took it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsHelpCenterCategory",
        "tags": [
          "Help center"
        ],
        "summary": "Delete a help-center category, its descendants and their articles",
        "description": "Soft-deletes the category, every live descendant category and every live article in them. Each can be restored for 30 days; restore categories parent first. Redirect rules that point at the deleted categories and articles are removed for good. Records a `help_center.category_deleted` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Category ID: a `kb_category_` TypeID or its UUID",
              "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Category ID: a `kb_category_` TypeID or its UUID",
            "name": "categoryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted category and what it took with it",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the category that was deleted",
                      "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "categoryIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "IDs of every category deleted: the category itself and its descendants",
                      "example": [
                        "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a",
                        "kb_category_01jd3r6s7t8v9w0x1y2z3a4b5c"
                      ]
                    },
                    "articleIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "IDs of the live articles deleted with the categories",
                      "example": [
                        "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "categoryIds",
                    "articleIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Category not found or already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/categories/{categoryId}/restore": {
      "post": {
        "operationId": "restoreQuillsHelpCenterCategory",
        "tags": [
          "Help center"
        ],
        "summary": "Restore a deleted help-center category",
        "description": "Restores a deleted category within 30 days of its deletion. Only the category itself comes back: its subcategories and articles stay deleted until restored one by one. Restore a deleted parent first; a restore that would make the tree deeper than three levels is rejected with 400. Records a `help_center.category_restored` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Category ID: a `kb_category_` TypeID or its UUID",
              "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Category ID: a `kb_category_` TypeID or its UUID",
            "name": "categoryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterCategory"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Category not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The category is not deleted, was deleted more than 30 days ago, or its parent is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/review-queue": {
      "get": {
        "operationId": "listQuillsHelpCenterReviewQueue",
        "tags": [
          "Help center"
        ],
        "summary": "List stale and overdue help-center articles needing review",
        "description": "Lists live articles in any publish state that are flagged as stale or whose `reviewBy` date has passed, up to `limit`. Flagged articles come first, oldest flag first, then the others by review date, earliest first. There is no paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only articles owned by this teammate principal",
              "example": "principal_01jd3v5w7x9y1z3a5b7c9d1e3f"
            },
            "required": false,
            "description": "Only articles owned by this teammate principal",
            "name": "ownerId",
            "in": "query"
          },
          {
            "schema": {
              "type": "boolean",
              "default": false,
              "description": "`true` or `1`: every live article, not only stale or overdue ones. Default `false`."
            },
            "required": false,
            "description": "`true` or `1`: every live article, not only stale or overdue ones. Default `false`.",
            "name": "includeAll",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of articles to return",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of articles to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Articles in the freshness review queue",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Article ID",
                            "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                          },
                          "slug": {
                            "type": "string",
                            "description": "URL slug of the article",
                            "example": "reset-your-password"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title in the default locale",
                            "example": "Reset your password"
                          },
                          "ownerId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate responsible for keeping the article current; null when unassigned",
                            "example": "principal_01jd3v5w7x9y1z3a5b7c9d1e3f"
                          },
                          "ownerName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the owner; null when unassigned",
                            "example": "Ada Park"
                          },
                          "reviewBy": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the article is due for review; null when no review is scheduled. A background sweep flags the article as stale (`review_overdue`) once this passes.",
                            "example": "2027-02-16T14:32:05.000Z"
                          },
                          "lastReviewedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When a teammate last marked the article as reviewed; null if never",
                            "example": "2026-11-18T14:32:05.000Z"
                          },
                          "staleReason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Why the article is flagged as stale; null when not flagged. `manual`: a teammate's judgment. `product_change`: the product changed. `review_overdue`: the review date passed. `unhelpful_spike`: at least 40% of at least 5 votes since the last review were not helpful. `changelog_published`: a linked changelog entry, or one linking a linked post, was published. The automatic checks set the last three; a teammate can set any of them.",
                            "example": "review_overdue"
                          },
                          "staleDetails": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Free-text detail about the stale flag; null when none",
                            "example": "Scheduled review date passed"
                          },
                          "staleFlaggedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the article was flagged as stale; null when not flagged. A flagged article is left out of AI answer sources until it is marked reviewed.",
                            "example": "2026-11-25T03:00:00.000Z"
                          },
                          "helpfulCount": {
                            "type": "number",
                            "description": "Number of current \"helpful\" votes",
                            "example": 27
                          },
                          "notHelpfulCount": {
                            "type": "number",
                            "description": "Number of current \"not helpful\" votes",
                            "example": 3
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "targetKind": {
                                  "type": "string",
                                  "enum": [
                                    "changelog",
                                    "post",
                                    "url"
                                  ],
                                  "description": "What the article documents. `changelog`: a changelog entry; publishing it flags the article as stale. `post`: a feedback post; publishing a changelog entry that links the post flags the article as stale. `url`: an external http or https page, kept for reference."
                                },
                                "targetId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 500,
                                  "description": "The linked target: a changelog entry ID, a post ID, or an absolute http(s) URL, up to 500 characters",
                                  "example": "changelog_01jd3y2z4a6b8c0d2e4f6g8h0j"
                                },
                                "id": {
                                  "type": "string",
                                  "description": "ID of the link",
                                  "example": "7d0f6a2e-4b1c-4e8a-9f3d-2c5b8e1a7f60"
                                },
                                "createdAt": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "When the link was saved",
                                  "example": "2026-11-18T14:32:05.000Z"
                                }
                              },
                              "required": [
                                "targetKind",
                                "targetId",
                                "id",
                                "createdAt"
                              ]
                            },
                            "description": "Changelog entries, posts and URLs the article documents"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "title",
                          "ownerId",
                          "ownerName",
                          "reviewBy",
                          "lastReviewedAt",
                          "staleReason",
                          "staleDetails",
                          "staleFlaggedAt",
                          "helpfulCount",
                          "notHelpfulCount",
                          "links"
                        ]
                      },
                      "description": "Articles needing review, in queue order"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles/{articleId}/freshness": {
      "patch": {
        "operationId": "updateQuillsHelpCenterArticleFreshness",
        "tags": [
          "Help center"
        ],
        "summary": "Set a help-center article's owner, review date and linked entities",
        "description": "Changes the fields that are sent; send at least one. `links` replaces the whole link list (duplicates are dropped). URL links must be absolute http or https URLs, otherwise 400. Existing stale flags are left as they are. Records a `help_center.article_freshness_updated` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ownerId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Principal ID of a teammate to own the article; null removes the owner",
                    "example": "principal_01jd3v5w7x9y1z3a5b7c9d1e3f"
                  },
                  "reviewBy": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "When the article is due for review, as an ISO 8601 date-time with an offset; null clears it",
                    "example": "2027-02-16T09:00:00Z"
                  },
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "targetKind": {
                          "type": "string",
                          "enum": [
                            "changelog",
                            "post",
                            "url"
                          ],
                          "description": "What the article documents. `changelog`: a changelog entry; publishing it flags the article as stale. `post`: a feedback post; publishing a changelog entry that links the post flags the article as stale. `url`: an external http or https page, kept for reference."
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "description": "The linked target: a changelog entry ID, a post ID, or an absolute http(s) URL, up to 500 characters",
                          "example": "changelog_01jd3y2z4a6b8c0d2e4f6g8h0j"
                        }
                      },
                      "required": [
                        "targetKind",
                        "targetId"
                      ]
                    },
                    "maxItems": 20,
                    "description": "The complete new list of linked changelog entries, posts and URLs, up to 20. An empty array removes every link."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated article freshness metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Article ID",
                      "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                    },
                    "slug": {
                      "type": "string",
                      "description": "URL slug of the article",
                      "example": "reset-your-password"
                    },
                    "title": {
                      "type": "string",
                      "description": "Title in the default locale",
                      "example": "Reset your password"
                    },
                    "ownerId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate responsible for keeping the article current; null when unassigned",
                      "example": "principal_01jd3v5w7x9y1z3a5b7c9d1e3f"
                    },
                    "ownerName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the owner; null when unassigned",
                      "example": "Ada Park"
                    },
                    "reviewBy": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the article is due for review; null when no review is scheduled. A background sweep flags the article as stale (`review_overdue`) once this passes.",
                      "example": "2027-02-16T14:32:05.000Z"
                    },
                    "lastReviewedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When a teammate last marked the article as reviewed; null if never",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "staleReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the article is flagged as stale; null when not flagged. `manual`: a teammate's judgment. `product_change`: the product changed. `review_overdue`: the review date passed. `unhelpful_spike`: at least 40% of at least 5 votes since the last review were not helpful. `changelog_published`: a linked changelog entry, or one linking a linked post, was published. The automatic checks set the last three; a teammate can set any of them.",
                      "example": "review_overdue"
                    },
                    "staleDetails": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text detail about the stale flag; null when none",
                      "example": "Scheduled review date passed"
                    },
                    "staleFlaggedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the article was flagged as stale; null when not flagged. A flagged article is left out of AI answer sources until it is marked reviewed.",
                      "example": "2026-11-25T03:00:00.000Z"
                    },
                    "helpfulCount": {
                      "type": "number",
                      "description": "Number of current \"helpful\" votes",
                      "example": 27
                    },
                    "notHelpfulCount": {
                      "type": "number",
                      "description": "Number of current \"not helpful\" votes",
                      "example": 3
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "targetKind": {
                            "type": "string",
                            "enum": [
                              "changelog",
                              "post",
                              "url"
                            ],
                            "description": "What the article documents. `changelog`: a changelog entry; publishing it flags the article as stale. `post`: a feedback post; publishing a changelog entry that links the post flags the article as stale. `url`: an external http or https page, kept for reference."
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500,
                            "description": "The linked target: a changelog entry ID, a post ID, or an absolute http(s) URL, up to 500 characters",
                            "example": "changelog_01jd3y2z4a6b8c0d2e4f6g8h0j"
                          },
                          "id": {
                            "type": "string",
                            "description": "ID of the link",
                            "example": "7d0f6a2e-4b1c-4e8a-9f3d-2c5b8e1a7f60"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the link was saved",
                            "example": "2026-11-18T14:32:05.000Z"
                          }
                        },
                        "required": [
                          "targetKind",
                          "targetId",
                          "id",
                          "createdAt"
                        ]
                      },
                      "description": "Changelog entries, posts and URLs the article documents"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "ownerId",
                    "ownerName",
                    "reviewBy",
                    "lastReviewedAt",
                    "staleReason",
                    "staleDetails",
                    "staleFlaggedAt",
                    "helpfulCount",
                    "notHelpfulCount",
                    "links"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found or deleted, or `ownerId` is not a teammate principal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles/{articleId}/mark-reviewed": {
      "post": {
        "operationId": "markQuillsHelpCenterArticleReviewed",
        "tags": [
          "Help center"
        ],
        "summary": "Mark a help-center article as reviewed and clear staleness flags",
        "description": "Sets `lastReviewedAt` to now, schedules the next review `nextReviewDays` days from now and clears the stale flag, which returns the article to AI answer sources. Votes cast before this review no longer count toward an `unhelpful_spike` flag. Records a `help_center.article_reviewed` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nextReviewDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 730,
                    "description": "Days from now until the next review is due, 1 to 730",
                    "example": 90
                  }
                },
                "required": [
                  "nextReviewDays"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The freshly reviewed article",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Article ID",
                      "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                    },
                    "slug": {
                      "type": "string",
                      "description": "URL slug of the article",
                      "example": "reset-your-password"
                    },
                    "title": {
                      "type": "string",
                      "description": "Title in the default locale",
                      "example": "Reset your password"
                    },
                    "ownerId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate responsible for keeping the article current; null when unassigned",
                      "example": "principal_01jd3v5w7x9y1z3a5b7c9d1e3f"
                    },
                    "ownerName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the owner; null when unassigned",
                      "example": "Ada Park"
                    },
                    "reviewBy": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the article is due for review; null when no review is scheduled. A background sweep flags the article as stale (`review_overdue`) once this passes.",
                      "example": "2027-02-16T14:32:05.000Z"
                    },
                    "lastReviewedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When a teammate last marked the article as reviewed; null if never",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "staleReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the article is flagged as stale; null when not flagged. `manual`: a teammate's judgment. `product_change`: the product changed. `review_overdue`: the review date passed. `unhelpful_spike`: at least 40% of at least 5 votes since the last review were not helpful. `changelog_published`: a linked changelog entry, or one linking a linked post, was published. The automatic checks set the last three; a teammate can set any of them.",
                      "example": "review_overdue"
                    },
                    "staleDetails": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text detail about the stale flag; null when none",
                      "example": "Scheduled review date passed"
                    },
                    "staleFlaggedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the article was flagged as stale; null when not flagged. A flagged article is left out of AI answer sources until it is marked reviewed.",
                      "example": "2026-11-25T03:00:00.000Z"
                    },
                    "helpfulCount": {
                      "type": "number",
                      "description": "Number of current \"helpful\" votes",
                      "example": 27
                    },
                    "notHelpfulCount": {
                      "type": "number",
                      "description": "Number of current \"not helpful\" votes",
                      "example": 3
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "targetKind": {
                            "type": "string",
                            "enum": [
                              "changelog",
                              "post",
                              "url"
                            ],
                            "description": "What the article documents. `changelog`: a changelog entry; publishing it flags the article as stale. `post`: a feedback post; publishing a changelog entry that links the post flags the article as stale. `url`: an external http or https page, kept for reference."
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500,
                            "description": "The linked target: a changelog entry ID, a post ID, or an absolute http(s) URL, up to 500 characters",
                            "example": "changelog_01jd3y2z4a6b8c0d2e4f6g8h0j"
                          },
                          "id": {
                            "type": "string",
                            "description": "ID of the link",
                            "example": "7d0f6a2e-4b1c-4e8a-9f3d-2c5b8e1a7f60"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the link was saved",
                            "example": "2026-11-18T14:32:05.000Z"
                          }
                        },
                        "required": [
                          "targetKind",
                          "targetId",
                          "id",
                          "createdAt"
                        ]
                      },
                      "description": "Changelog entries, posts and URLs the article documents"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "ownerId",
                    "ownerName",
                    "reviewBy",
                    "lastReviewedAt",
                    "staleReason",
                    "staleDetails",
                    "staleFlaggedAt",
                    "helpfulCount",
                    "notHelpfulCount",
                    "links"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles/{articleId}/flag-stale": {
      "post": {
        "operationId": "flagQuillsHelpCenterArticleStale",
        "tags": [
          "Help center"
        ],
        "summary": "Flag a help-center article as stale and exclude it from AI grounding",
        "description": "Flags a live article as stale with the given reason, replacing any earlier flag and its details. A flagged article is left out of AI answer sources and appears in the review queue until it is marked reviewed. Records a `help_center.article_stale_flagged` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "enum": [
                      "manual",
                      "review_overdue",
                      "unhelpful_spike",
                      "changelog_published",
                      "product_change"
                    ],
                    "description": "Why the article is stale. `manual`: a teammate's judgment. `product_change`: the product changed. `review_overdue`, `unhelpful_spike` and `changelog_published` are the reasons the automatic checks use; a teammate can set them too."
                  },
                  "details": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Free-text detail, up to 500 characters. Left out: the stored detail is cleared.",
                    "example": "The billing page moved to Settings > Plan."
                  }
                },
                "required": [
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The flagged article",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Article ID",
                      "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                    },
                    "slug": {
                      "type": "string",
                      "description": "URL slug of the article",
                      "example": "reset-your-password"
                    },
                    "title": {
                      "type": "string",
                      "description": "Title in the default locale",
                      "example": "Reset your password"
                    },
                    "ownerId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate responsible for keeping the article current; null when unassigned",
                      "example": "principal_01jd3v5w7x9y1z3a5b7c9d1e3f"
                    },
                    "ownerName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the owner; null when unassigned",
                      "example": "Ada Park"
                    },
                    "reviewBy": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the article is due for review; null when no review is scheduled. A background sweep flags the article as stale (`review_overdue`) once this passes.",
                      "example": "2027-02-16T14:32:05.000Z"
                    },
                    "lastReviewedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When a teammate last marked the article as reviewed; null if never",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "staleReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the article is flagged as stale; null when not flagged. `manual`: a teammate's judgment. `product_change`: the product changed. `review_overdue`: the review date passed. `unhelpful_spike`: at least 40% of at least 5 votes since the last review were not helpful. `changelog_published`: a linked changelog entry, or one linking a linked post, was published. The automatic checks set the last three; a teammate can set any of them.",
                      "example": "review_overdue"
                    },
                    "staleDetails": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Free-text detail about the stale flag; null when none",
                      "example": "Scheduled review date passed"
                    },
                    "staleFlaggedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the article was flagged as stale; null when not flagged. A flagged article is left out of AI answer sources until it is marked reviewed.",
                      "example": "2026-11-25T03:00:00.000Z"
                    },
                    "helpfulCount": {
                      "type": "number",
                      "description": "Number of current \"helpful\" votes",
                      "example": 27
                    },
                    "notHelpfulCount": {
                      "type": "number",
                      "description": "Number of current \"not helpful\" votes",
                      "example": 3
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "targetKind": {
                            "type": "string",
                            "enum": [
                              "changelog",
                              "post",
                              "url"
                            ],
                            "description": "What the article documents. `changelog`: a changelog entry; publishing it flags the article as stale. `post`: a feedback post; publishing a changelog entry that links the post flags the article as stale. `url`: an external http or https page, kept for reference."
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 500,
                            "description": "The linked target: a changelog entry ID, a post ID, or an absolute http(s) URL, up to 500 characters",
                            "example": "changelog_01jd3y2z4a6b8c0d2e4f6g8h0j"
                          },
                          "id": {
                            "type": "string",
                            "description": "ID of the link",
                            "example": "7d0f6a2e-4b1c-4e8a-9f3d-2c5b8e1a7f60"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the link was saved",
                            "example": "2026-11-18T14:32:05.000Z"
                          }
                        },
                        "required": [
                          "targetKind",
                          "targetId",
                          "id",
                          "createdAt"
                        ]
                      },
                      "description": "Changelog entries, posts and URLs the article documents"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "title",
                    "ownerId",
                    "ownerName",
                    "reviewBy",
                    "lastReviewedAt",
                    "staleReason",
                    "staleDetails",
                    "staleFlaggedAt",
                    "helpfulCount",
                    "notHelpfulCount",
                    "links"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/search-insights": {
      "get": {
        "operationId": "getQuillsHelpCenterSearchInsights",
        "tags": [
          "Help center"
        ],
        "summary": "Get help-center search insights: zero-result, zero-click and CTR",
        "description": "Summarizes recorded visitor searches from the last `days` days: totals, click-through rate, and three lists of queries grouped by their lower-cased form, each sorted by search count and cut at `limit`. Searches made with `record: false` are not counted, and rows past the search log retention period are gone. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 366,
              "default": 30,
              "description": "Length of the trailing window in days, counted back from now",
              "example": 30
            },
            "required": false,
            "description": "Length of the trailing window in days, counted back from now",
            "name": "days",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25,
              "description": "Maximum number of queries in each list",
              "example": 25
            },
            "required": false,
            "description": "Maximum number of queries in each list",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Help-center search analytics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalSearches": {
                      "type": "number",
                      "description": "Number of recorded searches in the window",
                      "example": 1240
                    },
                    "zeroResultCount": {
                      "type": "number",
                      "description": "Number of those searches that returned no article",
                      "example": 96
                    },
                    "clickedCount": {
                      "type": "number",
                      "description": "Number of those searches after which the visitor opened a result",
                      "example": 610
                    },
                    "clickThroughRate": {
                      "type": "number",
                      "description": "`clickedCount` divided by `totalSearches`, from 0 to 1, rounded to three decimals; 0 when there were no searches",
                      "example": 0.492
                    },
                    "zeroResultQueries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "query": {
                            "type": "string",
                            "description": "One spelling of the query as a visitor typed it",
                            "example": "export to csv"
                          },
                          "searches": {
                            "type": "number",
                            "description": "Number of searches for the query that returned nothing",
                            "example": 14
                          },
                          "lastSearchedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the query last returned nothing",
                            "example": "2026-11-30T16:04:11.000Z"
                          }
                        },
                        "required": [
                          "query",
                          "searches",
                          "lastSearchedAt"
                        ]
                      },
                      "description": "Queries that returned no article, most searched first: content gaps"
                    },
                    "zeroClickQueries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "query": {
                            "type": "string",
                            "description": "One spelling of the query as a visitor typed it",
                            "example": "change plan"
                          },
                          "searches": {
                            "type": "number",
                            "description": "Number of searches for the query in the window",
                            "example": 9
                          },
                          "avgResults": {
                            "type": "number",
                            "description": "Average number of results, rounded to a whole number",
                            "example": 4
                          },
                          "lastSearchedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the query was last searched",
                            "example": "2026-11-29T11:20:00.000Z"
                          }
                        },
                        "required": [
                          "query",
                          "searches",
                          "avgResults",
                          "lastSearchedAt"
                        ]
                      },
                      "description": "Queries that returned results at least once but never led to a click, most searched first"
                    },
                    "topQueries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "query": {
                            "type": "string",
                            "description": "One spelling of the query as a visitor typed it",
                            "example": "reset password"
                          },
                          "searches": {
                            "type": "number",
                            "description": "Number of searches for the query in the window",
                            "example": 41
                          },
                          "clicks": {
                            "type": "number",
                            "description": "Number of those searches that led to a click",
                            "example": 30
                          },
                          "clickThroughRate": {
                            "type": "number",
                            "description": "`clicks` divided by `searches`, from 0 to 1, rounded to three decimals",
                            "example": 0.732
                          }
                        },
                        "required": [
                          "query",
                          "searches",
                          "clicks",
                          "clickThroughRate"
                        ]
                      },
                      "description": "The most searched queries"
                    }
                  },
                  "required": [
                    "totalSearches",
                    "zeroResultCount",
                    "clickedCount",
                    "clickThroughRate",
                    "zeroResultQueries",
                    "zeroClickQueries",
                    "topQueries"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/search-synonyms": {
      "get": {
        "operationId": "listQuillsHelpCenterSearchSynonyms",
        "tags": [
          "Help center"
        ],
        "summary": "List help-center search synonyms",
        "description": "Lists every synonym group, sorted by term. Public help-center search expands a query that contains a group's term or one of its synonyms, as whole words, with the rest of the group. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Configured synonym groups",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Synonym group ID (a UUID)",
                            "example": "3f9a1c2e-7b4d-4e6f-8a1b-5c3d2e9f0a7b"
                          },
                          "term": {
                            "type": "string",
                            "description": "The group's main term, lower-cased",
                            "example": "invoice"
                          },
                          "synonyms": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Other words or phrases, lower-cased, that mean the same as the term in help-center search",
                            "example": [
                              "bill",
                              "receipt"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the group was first created; an update keeps it",
                            "example": "2026-11-18T14:32:05.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "term",
                          "synonyms",
                          "createdAt"
                        ]
                      },
                      "description": "Synonym groups, sorted by term"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsHelpCenterSearchSynonym",
        "tags": [
          "Help center"
        ],
        "summary": "Create or update a help-center search synonym group",
        "description": "Saves a synonym group, keyed by its lower-cased term: a group with the same term gets its synonym list replaced, so the call can be repeated safely. The term and synonyms are lower-cased; duplicate synonyms and ones equal to the term are dropped, and when none is left the request fails with 400. Records a `help_center.search_synonym_created` event, also for an update. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "term": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "The main term, up to 100 characters; saved lower-cased",
                    "example": "invoice"
                  },
                  "synonyms": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "1 to 20 words or phrases of up to 100 characters each that mean the same as the term; they replace any earlier list",
                    "example": [
                      "bill",
                      "receipt"
                    ]
                  }
                },
                "required": [
                  "term",
                  "synonyms"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved synonym group",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Synonym group ID (a UUID)",
                      "example": "3f9a1c2e-7b4d-4e6f-8a1b-5c3d2e9f0a7b"
                    },
                    "term": {
                      "type": "string",
                      "description": "The group's main term, lower-cased",
                      "example": "invoice"
                    },
                    "synonyms": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Other words or phrases, lower-cased, that mean the same as the term in help-center search",
                      "example": [
                        "bill",
                        "receipt"
                      ]
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the group was first created; an update keeps it",
                      "example": "2026-11-18T14:32:05.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "term",
                    "synonyms",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/search-synonyms/{synonymId}": {
      "delete": {
        "operationId": "deleteQuillsHelpCenterSearchSynonym",
        "tags": [
          "Help center"
        ],
        "summary": "Delete a help-center search synonym group",
        "description": "Deletes a synonym group for good; searches stop expanding its words. Records a `help_center.search_synonym_deleted` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Synonym group ID (a UUID)",
              "example": "3f9a1c2e-7b4d-4e6f-8a1b-5c3d2e9f0a7b"
            },
            "required": true,
            "description": "Synonym group ID (a UUID)",
            "name": "synonymId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted synonym group ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted synonym group",
                      "example": "3f9a1c2e-7b4d-4e6f-8a1b-5c3d2e9f0a7b"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Synonym group not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles": {
      "get": {
        "operationId": "listQuillsHelpCenterArticles",
        "tags": [
          "Help center"
        ],
        "summary": "List help-center articles, drafts included",
        "description": "Lists articles in every publish state, sorted by creation time (newest first by default) with cursor paging. Items leave out the body. `search` is an English keyword search over the article text; there is no semantic ranking. `deleted=true` lists articles deleted in the last 30 days instead of live ones. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only articles filed directly in this category; subcategories are not included",
              "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": false,
            "description": "Only articles filed directly in this category; subcategories are not included",
            "name": "categoryId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published",
                "all"
              ],
              "default": "all",
              "description": "`draft`: unpublished articles only. `published`: articles published now (scheduled ones excluded). `all` (default): every state. Ignored with `deleted=true`."
            },
            "required": false,
            "description": "`draft`: unpublished articles only. `published`: articles published now (scheduled ones excluded). `all` (default): every state. Ignored with `deleted=true`.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Keywords to match, in web-search syntax (quoted phrases, `or`, `-word`), with English stemming",
              "example": "reset password"
            },
            "required": false,
            "description": "Keywords to match, in web-search syntax (quoted phrases, `or`, `-word`), with English stemming",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "`true`: list articles deleted in the last 30 days instead of live ones. `false` (default): live articles."
            },
            "required": false,
            "description": "`true`: list articles deleted in the last 30 days instead of live ones. `false` (default): live articles.",
            "name": "deleted",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "newest",
                "oldest"
              ],
              "default": "newest",
              "description": "`newest` (default): most recently created first. `oldest`: earliest created first."
            },
            "required": false,
            "description": "`newest` (default): most recently created first. `oldest`: earliest created first.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "The previous page's `nextCursor`; the page starts after this article. Keep the other filters and `sort` the same.",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": false,
            "description": "The previous page's `nextCursor`; the page starts after this article. Keep the other filters and `sort` the same.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Maximum number of articles to return",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of articles to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of articles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Article ID",
                            "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                          },
                          "urlId": {
                            "type": "number",
                            "description": "Public numeric ID in help-center URLs. Updates and translations never change it.",
                            "example": 42
                          },
                          "slug": {
                            "type": "string",
                            "description": "URL slug, unique among the workspace's articles, deleted ones included",
                            "example": "reset-your-password"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title in the default locale",
                            "example": "Reset your password"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Short summary in the default locale; null when empty",
                            "example": "Get back into your account in two minutes"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "scheduled",
                              "published"
                            ],
                            "description": "Publish state, derived from `publishedAt`. `draft`: not published. `scheduled`: publishes at a future `publishedAt`. `published`: live now. Public help-center reads show published articles only. Drafts are teammate data."
                          },
                          "publishedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the article was or will be published; null for a draft",
                            "example": "2026-11-19T10:00:00.000Z"
                          },
                          "position": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Sort position in its category, lowest first; null sorts after positioned articles",
                            "example": 1
                          },
                          "segmentIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Customer segments that can see the article publicly. Empty: no segment restriction beyond the category's.",
                            "example": []
                          },
                          "viewCount": {
                            "type": "number",
                            "description": "Stored view count of the article",
                            "example": 318
                          },
                          "helpfulCount": {
                            "type": "number",
                            "description": "Number of current \"helpful\" votes",
                            "example": 27
                          },
                          "notHelpfulCount": {
                            "type": "number",
                            "description": "Number of current \"not helpful\" votes",
                            "example": 3
                          },
                          "category": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Category ID",
                                "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
                              },
                              "urlId": {
                                "type": "number",
                                "description": "Public numeric ID of the category in help-center URLs",
                                "example": 12
                              },
                              "slug": {
                                "type": "string",
                                "description": "URL slug of the category",
                                "example": "account"
                              },
                              "name": {
                                "type": "string",
                                "description": "Category name in the default locale",
                                "example": "Account"
                              }
                            },
                            "required": [
                              "id",
                              "urlId",
                              "slug",
                              "name"
                            ],
                            "description": "The category the article is filed in"
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Principal ID of the author",
                                "example": "principal_01jd3v5w7x9y1z3a5b7c9d1e3f"
                              },
                              "name": {
                                "type": "string",
                                "description": "Display name of the author",
                                "example": "Ada Park"
                              },
                              "avatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Avatar image URL; null when the author has none",
                                "example": "https://example.com/avatars/ada.png"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "avatarUrl"
                            ],
                            "description": "The teammate who created the article; null when unknown or without a display name"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the article was created",
                            "example": "2026-11-18T14:32:05.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the article was last changed",
                            "example": "2026-11-20T09:15:42.000Z"
                          },
                          "deletedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the article was deleted; null for a live article. A deleted article can be restored for 30 days.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "urlId",
                          "slug",
                          "title",
                          "description",
                          "status",
                          "publishedAt",
                          "position",
                          "segmentIds",
                          "viewCount",
                          "helpfulCount",
                          "notHelpfulCount",
                          "category",
                          "author",
                          "createdAt",
                          "updatedAt",
                          "deletedAt"
                        ]
                      },
                      "description": "Articles on this page, without their body"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page (the last article's ID); null when there is no next page",
                      "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more articles follow this page"
                    }
                  },
                  "required": [
                    "articles",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The `categoryId` category does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsHelpCenterArticle",
        "tags": [
          "Help center"
        ],
        "summary": "Create a draft help-center article",
        "description": "Creates an article as a draft; publish it later with `updateQuillsHelpCenterArticle`. The caller is the author. Without a category, the article is filed under General, which is created on first use. Without a slug, one is made from the title; a taken slug gets a numeric suffix. Records a `help_center.article_created` event. Requires the `quills:create` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "categoryId": {
                    "type": "string",
                    "description": "ID of the live category to file the article in. On create, left out: the General category, created on first use.",
                    "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Title in the default locale, trimmed",
                    "example": "Reset your password"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "Markdown, up to 100,000 characters. A stored rich-text body is cleared when this changes.",
                    "example": "## Steps\n\n1. Open **Sign in**.\n2. Choose **Forgot password**."
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 200,
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                    "description": "URL slug. On create, left out: made from the title. A taken slug gets the first free numeric suffix, such as `reset-your-password-2`.",
                    "example": "reset-your-password"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 300,
                    "description": "Short summary in the default locale, up to 300 characters. Null or an empty string clears it.",
                    "example": "Get back into your account in two minutes"
                  },
                  "position": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "Sort position in the category, lowest first. Null: after positioned articles. On create, defaults to null.",
                    "example": 1
                  },
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Customer segments that can see the article publicly, up to 50 distinct live segment IDs. Empty: no segment restriction beyond the category's. On create, defaults to empty.",
                    "example": [
                      "segment_01jd3p8q2r5s7t9v1w3x5y7z9b"
                    ]
                  }
                },
                "required": [
                  "title",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created article",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterArticle"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Category or a segment not found, or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No free slug was found, a concurrent create took it, or the General category is being created (retry)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles/{articleId}": {
      "get": {
        "operationId": "getQuillsHelpCenterArticle",
        "tags": [
          "Help center"
        ],
        "summary": "Get a help-center article, drafts included",
        "description": "Gets one live article in any publish state, with its default-locale Markdown body, category and author. A deleted article is not found. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The article",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterArticle"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsHelpCenterArticle",
        "tags": [
          "Help center"
        ],
        "summary": "Update, move, publish or unpublish a help-center article",
        "description": "Changes the fields that are sent; send at least one. Setting `categoryId` moves the article. `published: true` publishes a draft now (a scheduled article keeps its schedule); `false` returns a published or scheduled article to draft. Records `help_center.article_published` or `help_center.article_unpublished` when the publish state changes, otherwise `help_center.article_updated`. When auto-translate is on and the help center has additional locales, the publish event carries the auto-translate request for draft translations; no translation runs in the request. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "categoryId": {
                    "type": "string",
                    "description": "ID of the live category to file the article in. On create, left out: the General category, created on first use.",
                    "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Title in the default locale, trimmed",
                    "example": "Reset your password"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "Markdown, up to 100,000 characters. A stored rich-text body is cleared when this changes.",
                    "example": "## Steps\n\n1. Open **Sign in**.\n2. Choose **Forgot password**."
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 200,
                    "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
                    "description": "URL slug. On create, left out: made from the title. A taken slug gets the first free numeric suffix, such as `reset-your-password-2`.",
                    "example": "reset-your-password"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 300,
                    "description": "Short summary in the default locale, up to 300 characters. Null or an empty string clears it.",
                    "example": "Get back into your account in two minutes"
                  },
                  "position": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "Sort position in the category, lowest first. Null: after positioned articles. On create, defaults to null.",
                    "example": 1
                  },
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Customer segments that can see the article publicly, up to 50 distinct live segment IDs. Empty: no segment restriction beyond the category's. On create, defaults to empty.",
                    "example": [
                      "segment_01jd3p8q2r5s7t9v1w3x5y7z9b"
                    ]
                  },
                  "published": {
                    "type": "boolean",
                    "description": "`true`: publish a draft now. `false`: return a published or scheduled article to draft. Left out: no change to the publish state."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated article",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/QuillsHelpCenterArticle"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "transition": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "published",
                            "unpublished",
                            null
                          ],
                          "description": "The publish state change this request made, if any"
                        },
                        "autoTranslateRequested": {
                          "type": "boolean",
                          "description": "True when the publish asked the auto-translate worker for draft translations"
                        }
                      },
                      "required": [
                        "transition",
                        "autoTranslateRequested"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article, category or a segment not found, or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No free slug was found, or a concurrent update took it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsHelpCenterArticle",
        "tags": [
          "Help center"
        ],
        "summary": "Delete a help-center article",
        "description": "Soft-deletes an article; it can be restored for 30 days. Redirect rules that point at the article are removed for good. Records a `help_center.article_deleted` event. Requires the `quills:delete` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted article",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted article",
                      "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found or already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles/{articleId}/restore": {
      "post": {
        "operationId": "restoreQuillsHelpCenterArticle",
        "tags": [
          "Help center"
        ],
        "summary": "Restore a deleted help-center article",
        "description": "Restores a deleted article within 30 days of its deletion. Its category must be live, so restore a deleted category first. The URL ID and publish state are unchanged; redirect rules removed by the delete do not come back. Records a `help_center.article_restored` event. Requires the `quills:delete` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored article",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterArticle"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The article is not deleted, was deleted more than 30 days ago, or its category is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/categories/{categoryId}/articles/order": {
      "put": {
        "operationId": "reorderQuillsHelpCenterArticles",
        "tags": [
          "Help center"
        ],
        "summary": "Reorder the articles in a category",
        "description": "Sets the order of the live articles filed directly in a category. Send each of them once, in the new order; each article's position becomes its index in the list. A partial or stale list changes nothing. Records a `help_center.articles_reordered` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Category ID: a `kb_category_` TypeID or its UUID",
              "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Category ID: a `kb_category_` TypeID or its UUID",
            "name": "categoryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "articleIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `article` prefix. Requests also accept the bare UUID.",
                      "example": "article_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 500,
                    "description": "Every live article of the category, each once, first to last (1 to 500 IDs)",
                    "example": [
                      "article_01jd3t2v4w6x8y0z2a4b6c8d0e",
                      "article_01jd3w8x0y2z4a6b8c0d2e4f6g"
                    ]
                  }
                },
                "required": [
                  "articleIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "articleIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The article IDs in their new order",
                      "example": [
                        "article_01jd3t2v4w6x8y0z2a4b6c8d0e",
                        "article_01jd3w8x0y2z4a6b8c0d2e4f6g"
                      ]
                    }
                  },
                  "required": [
                    "articleIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Category not found or deleted, or an ID is not a live article of the category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The list leaves out a live article of the category",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles/{articleId}/feedback": {
      "post": {
        "operationId": "recordQuillsHelpCenterArticleFeedback",
        "tags": [
          "Help center"
        ],
        "summary": "Record the caller's helpful or not-helpful vote on an article",
        "description": "Records the calling teammate's vote on a live article in any publish state. Each person has one vote per article: voting again with the same value changes nothing, and a changed vote moves one count from the old value to the new one and clears the reason left on the earlier not-helpful vote. Updates the article's `helpfulCount` and `notHelpfulCount`. Records a `help_center.article_feedback_recorded` event, also for an unchanged vote. Requires the `quills:create` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "helpful": {
                    "type": "boolean",
                    "description": "True for a helpful vote, false for not helpful"
                  }
                },
                "required": [
                  "helpful"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The caller's vote",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "feedbackId": {
                      "type": "string",
                      "description": "ID of the caller's vote",
                      "example": "kb_article_feedback_01jd3x7y9z1a3b5c7d9e1f3g5h"
                    },
                    "helpful": {
                      "type": "boolean",
                      "description": "The vote now recorded: true for helpful, false for not helpful"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "False when the caller's vote already had this value and nothing changed"
                    }
                  },
                  "required": [
                    "feedbackId",
                    "helpful",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A concurrent vote by the same caller; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles/{articleId}/feedback-reasons": {
      "get": {
        "operationId": "listQuillsHelpCenterArticleFeedbackReasons",
        "tags": [
          "Help center"
        ],
        "summary": "List the reasons left on an article's not-helpful votes",
        "description": "Lists the written reasons on the article's not-helpful votes, newest vote first, up to `limit`. Votes without a reason are left out. Works for deleted articles too. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of rows to return",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of rows to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Reasons, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reasons": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the not-helpful vote",
                            "example": "kb_article_feedback_01jd3x7y9z1a3b5c7d9e1f3g5h"
                          },
                          "reason": {
                            "type": "string",
                            "description": "The reason the voter wrote",
                            "example": "The screenshots show an older version of the settings page."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the vote was first recorded",
                            "example": "2026-11-18T14:32:05.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "reason",
                          "createdAt"
                        ]
                      },
                      "description": "Reasons, newest vote first"
                    }
                  },
                  "required": [
                    "reasons"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/analytics/articles": {
      "get": {
        "operationId": "listQuillsHelpCenterArticlePerformance",
        "tags": [
          "Help center"
        ],
        "summary": "Rank live articles by views with their feedback counts",
        "description": "Lists live articles in every publish state, sorted by view count, then helpful votes, then ID, all descending, up to `limit`. There is no paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "Maximum number of rows to return",
              "example": 100
            },
            "required": false,
            "description": "Maximum number of rows to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Articles by view count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "articles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Article ID",
                            "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                          },
                          "slug": {
                            "type": "string",
                            "description": "URL slug of the article",
                            "example": "reset-your-password"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title in the default locale",
                            "example": "Reset your password"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "scheduled",
                              "published"
                            ],
                            "description": "`draft`: not published. `scheduled`: publishes at a future time. `published`: live now."
                          },
                          "categoryName": {
                            "type": "string",
                            "description": "Name of the article's category in the default locale",
                            "example": "Account"
                          },
                          "viewCount": {
                            "type": "number",
                            "description": "Stored view count of the article",
                            "example": 318
                          },
                          "helpfulCount": {
                            "type": "number",
                            "description": "Number of current \"helpful\" votes",
                            "example": 27
                          },
                          "notHelpfulCount": {
                            "type": "number",
                            "description": "Number of current \"not helpful\" votes",
                            "example": 3
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "title",
                          "status",
                          "categoryName",
                          "viewCount",
                          "helpfulCount",
                          "notHelpfulCount"
                        ]
                      },
                      "description": "Articles, most viewed first"
                    }
                  },
                  "required": [
                    "articles"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/analytics/search-terms": {
      "get": {
        "operationId": "listQuillsHelpCenterSearchTerms",
        "tags": [
          "Help center"
        ],
        "summary": "Rank visitor search terms in a trailing window",
        "description": "Lists the search terms visitors used in the last `days` days, grouped after trimming, collapsing spaces and lower-casing, up to `limit`. Sorted by search count, then most recent search, then term. `zeroResultSearches` shows the content gaps. The window is capped at the search log retention period (90 days by default); the response's `days` is the window used. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30,
              "description": "Length of the trailing window in days, counted back from now. Capped at the search log retention period.",
              "example": 30
            },
            "required": false,
            "description": "Length of the trailing window in days, counted back from now. Capped at the search log retention period.",
            "name": "days",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of rows to return",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of rows to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Terms by search count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "days": {
                      "type": "number",
                      "description": "The window used, in days: `days`, or the retention period when that is shorter",
                      "example": 30
                    },
                    "terms": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "term": {
                            "type": "string",
                            "description": "The most recent spelling a visitor typed for this term",
                            "example": "Reset password"
                          },
                          "normalizedQuery": {
                            "type": "string",
                            "description": "The grouping key: the query trimmed, with spaces collapsed and lower-cased",
                            "example": "reset password"
                          },
                          "searches": {
                            "type": "number",
                            "description": "Number of searches for the term in the window",
                            "example": 41
                          },
                          "zeroResultSearches": {
                            "type": "number",
                            "description": "Number of those searches that returned no article",
                            "example": 5
                          },
                          "lastSearchedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the term was last searched",
                            "example": "2026-11-30T16:04:11.000Z"
                          }
                        },
                        "required": [
                          "term",
                          "normalizedQuery",
                          "searches",
                          "zeroResultSearches",
                          "lastSearchedAt"
                        ]
                      },
                      "description": "Search terms, most searched first"
                    }
                  },
                  "required": [
                    "days",
                    "terms"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles/{articleId}/translations": {
      "get": {
        "operationId": "listQuillsHelpCenterArticleTranslations",
        "tags": [
          "Help center"
        ],
        "summary": "List an article's translations and a status per enabled locale",
        "description": "Lists every stored translation of a live article, sorted by locale, including translations for locales that are no longer enabled. `statuses` has one entry per enabled additional locale. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Translations and locale statuses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "translations": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsHelpCenterArticleTranslation"
                      },
                      "description": "Stored translations, sorted by locale code"
                    },
                    "statuses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "locale": {
                            "type": "string",
                            "description": "An enabled additional locale",
                            "example": "fr"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "published",
                              "untranslated"
                            ],
                            "description": "`draft`: a translation exists but is hidden. `published`: a translation is shown to visitors. `untranslated`: no translation exists."
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the locale's translation last changed; null when there is none",
                            "example": "2026-11-20T09:15:42.000Z"
                          }
                        },
                        "required": [
                          "locale",
                          "status",
                          "updatedAt"
                        ]
                      },
                      "description": "Translation state for each enabled additional locale, in the order the locales were enabled"
                    }
                  },
                  "required": [
                    "translations",
                    "statuses"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "saveQuillsHelpCenterArticleTranslation",
        "tags": [
          "Help center"
        ],
        "summary": "Create or replace an article translation",
        "description": "Creates or replaces the translation of a live article in one locale. Any supported locale is accepted, enabled or not. A new translation starts as a draft; replacing one keeps its status. The article and its URL ID do not change. Records a `help_center.article_translation_saved` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locale": {
                    "type": "string",
                    "enum": [
                      "en",
                      "de",
                      "fr",
                      "es",
                      "ar",
                      "ru",
                      "pt-br",
                      "zh-cn",
                      "zh-tw",
                      "nl",
                      "pl",
                      "th",
                      "uk"
                    ],
                    "description": "Help-center locale code in lowercase. `pt-br` is Brazilian Portuguese, `zh-cn` Simplified Chinese and `zh-tw` Traditional Chinese."
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Translated title, trimmed, up to 200 characters",
                    "example": "Réinitialiser votre mot de passe"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 300,
                    "description": "Translated summary, up to 300 characters. Left out, null or empty: no summary.",
                    "example": "Retrouvez l'accès à votre compte en deux minutes"
                  },
                  "content": {
                    "type": "string",
                    "maxLength": 100000,
                    "description": "Translated body in Markdown, up to 100,000 characters. A stored rich-text body is cleared.",
                    "example": "## Étapes\n\n1. Ouvrez **Connexion**."
                  }
                },
                "required": [
                  "locale",
                  "title",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved translation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterArticleTranslation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsHelpCenterArticleTranslation",
        "tags": [
          "Help center"
        ],
        "summary": "Delete an article translation",
        "description": "Deletes a live article's translation in one locale for good; visitors in that locale no longer see the article. Records a `help_center.article_translation_deleted` event. Requires the `quills:delete` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "es",
                "ar",
                "ru",
                "pt-br",
                "zh-cn",
                "zh-tw",
                "nl",
                "pl",
                "th",
                "uk"
              ],
              "description": "Locale code of the translation to delete",
              "example": "fr"
            },
            "required": true,
            "description": "Locale code of the translation to delete",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted translation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted translation",
                      "example": "kb_article_translation_01jd3a1b3c5d7e9f1g3h5j7k9m"
                    },
                    "locale": {
                      "type": "string",
                      "description": "Locale code of the deleted translation",
                      "example": "fr"
                    }
                  },
                  "required": [
                    "id",
                    "locale"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found or deleted, or it has no translation in the locale",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles/{articleId}/translations/status": {
      "put": {
        "operationId": "setQuillsHelpCenterArticleTranslationStatus",
        "tags": [
          "Help center"
        ],
        "summary": "Publish or unpublish an article translation",
        "description": "Sets the status of an existing translation of a live article. Visitors see a published translation only while the article is published and the locale is enabled. Records a `help_center.article_translation_status_changed` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Article ID: an `article_` TypeID or its UUID",
              "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
            },
            "required": true,
            "description": "Article ID: an `article_` TypeID or its UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locale": {
                    "type": "string",
                    "enum": [
                      "en",
                      "de",
                      "fr",
                      "es",
                      "ar",
                      "ru",
                      "pt-br",
                      "zh-cn",
                      "zh-tw",
                      "nl",
                      "pl",
                      "th",
                      "uk"
                    ],
                    "description": "Help-center locale code in lowercase. `pt-br` is Brazilian Portuguese, `zh-cn` Simplified Chinese and `zh-tw` Traditional Chinese."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "published"
                    ],
                    "description": "`draft`: hide the translation from visitors. `published`: show it to visitors."
                  }
                },
                "required": [
                  "locale",
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The translation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterArticleTranslation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Article not found or deleted, or it has no translation in the locale",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/categories/{categoryId}/translations": {
      "get": {
        "operationId": "listQuillsHelpCenterCategoryTranslations",
        "tags": [
          "Help center"
        ],
        "summary": "List a category's translations and a status per enabled locale",
        "description": "Lists every stored translation of a live category, sorted by locale, including translations for locales that are no longer enabled. `statuses` has one entry per enabled additional locale; a category counts as translated when its translated name is not empty. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Category ID: a `kb_category_` TypeID or its UUID",
              "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Category ID: a `kb_category_` TypeID or its UUID",
            "name": "categoryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Translations and locale statuses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "translations": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsHelpCenterCategoryTranslation"
                      },
                      "description": "Stored translations, sorted by locale code"
                    },
                    "statuses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "locale": {
                            "type": "string",
                            "description": "An enabled additional locale",
                            "example": "fr"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "translated",
                              "untranslated"
                            ],
                            "description": "`translated`: the translated name is not empty. `untranslated`: no translation, or an empty name."
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the locale's translation last changed; null when there is none",
                            "example": "2026-11-20T09:15:42.000Z"
                          }
                        },
                        "required": [
                          "locale",
                          "status",
                          "updatedAt"
                        ]
                      },
                      "description": "Translation state for each enabled additional locale, in the order the locales were enabled"
                    }
                  },
                  "required": [
                    "translations",
                    "statuses"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Category not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "saveQuillsHelpCenterCategoryTranslation",
        "tags": [
          "Help center"
        ],
        "summary": "Create or replace a category translation",
        "description": "Creates or replaces the translation of a live category in one locale. Any supported locale is accepted, enabled or not. Category translations have no status: a category shows in a locale once its translated name is not empty. Records a `help_center.category_translation_saved` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Category ID: a `kb_category_` TypeID or its UUID",
              "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Category ID: a `kb_category_` TypeID or its UUID",
            "name": "categoryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locale": {
                    "type": "string",
                    "enum": [
                      "en",
                      "de",
                      "fr",
                      "es",
                      "ar",
                      "ru",
                      "pt-br",
                      "zh-cn",
                      "zh-tw",
                      "nl",
                      "pl",
                      "th",
                      "uk"
                    ],
                    "description": "Help-center locale code in lowercase. `pt-br` is Brazilian Portuguese, `zh-cn` Simplified Chinese and `zh-tw` Traditional Chinese."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Translated name, trimmed, up to 200 characters. Empty leaves the category hidden in that locale.",
                    "example": "Facturation"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000,
                    "description": "Translated description, up to 2,000 characters. Left out, null or empty: no description.",
                    "example": "Factures, moyens de paiement et changements de forfait"
                  }
                },
                "required": [
                  "locale",
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved translation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterCategoryTranslation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Category not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsHelpCenterCategoryTranslation",
        "tags": [
          "Help center"
        ],
        "summary": "Delete a category translation",
        "description": "Deletes a live category's translation in one locale for good; the category is then hidden in that locale. Records a `help_center.category_translation_deleted` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Category ID: a `kb_category_` TypeID or its UUID",
              "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Category ID: a `kb_category_` TypeID or its UUID",
            "name": "categoryId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "es",
                "ar",
                "ru",
                "pt-br",
                "zh-cn",
                "zh-tw",
                "nl",
                "pl",
                "th",
                "uk"
              ],
              "description": "Locale code of the translation to delete",
              "example": "fr"
            },
            "required": true,
            "description": "Locale code of the translation to delete",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted translation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted translation",
                      "example": "kb_category_translation_01jd3b2c4d6e8f0g2h4j6k8m0n"
                    },
                    "locale": {
                      "type": "string",
                      "description": "Locale code of the deleted translation",
                      "example": "fr"
                    }
                  },
                  "required": [
                    "id",
                    "locale"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Category not found or deleted, or it has no translation in the locale",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/redirect-rules": {
      "get": {
        "operationId": "listQuillsHelpCenterRedirectRules",
        "tags": [
          "Help center"
        ],
        "summary": "List help-center redirect rules",
        "description": "Lists redirect rules, newest first, with offset paging. Each rule names its target's current title or name. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Rules, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rules": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsHelpCenterRedirectRule"
                      },
                      "description": "Rules on this page"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page; null when this is the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "rules",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsHelpCenterRedirectRule",
        "tags": [
          "Help center"
        ],
        "summary": "Redirect a help-center path to a published article or public category",
        "description": "Creates a rule that sends visitors from an old help-center path to an article or category. The target must be a live article that is not a draft, or a live public category. Each normalized path has at most one rule. Deleting the target later removes the rule. Records a `help_center.redirect_rule_created` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500,
                        "description": "The old help-center path to redirect, starting with `/`, up to 500 characters. Repeated slashes collapse and a trailing slash is dropped before saving, so `/kb//guide/` and `/kb/guide` are the same rule.",
                        "example": "/kb/old-password-guide"
                      },
                      "targetType": {
                        "type": "string",
                        "enum": [
                          "article"
                        ],
                        "description": "`article`: redirect to the article in `targetId`"
                      },
                      "targetId": {
                        "type": "string",
                        "description": "ID of a live, non-draft article",
                        "example": "article_01jd3t2v4w6x8y0z2a4b6c8d0e"
                      }
                    },
                    "required": [
                      "path",
                      "targetType",
                      "targetId"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500,
                        "description": "The old help-center path to redirect, starting with `/`, up to 500 characters. Repeated slashes collapse and a trailing slash is dropped before saving, so `/kb//guide/` and `/kb/guide` are the same rule.",
                        "example": "/kb/old-password-guide"
                      },
                      "targetType": {
                        "type": "string",
                        "enum": [
                          "category"
                        ],
                        "description": "`category`: redirect to the category in `targetId`"
                      },
                      "targetId": {
                        "type": "string",
                        "description": "ID of a live public category",
                        "example": "kb_category_01jd3k8m2q5r7t9v1w3x5y7z9a"
                      }
                    },
                    "required": [
                      "path",
                      "targetType",
                      "targetId"
                    ]
                  }
                ],
                "description": "The path and its target. `targetType` is `article` (redirect to an article) or `category` (redirect to a category), and names the kind of ID in `targetId`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created rule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterRedirectRule"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Target article or category not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The path already has a rule, the article is a draft, or the category is not public",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/redirect-rules/{ruleId}": {
      "delete": {
        "operationId": "deleteQuillsHelpCenterRedirectRule",
        "tags": [
          "Help center"
        ],
        "summary": "Delete a help-center redirect rule",
        "description": "Deletes a redirect rule for good; the old path stops redirecting. Records a `help_center.redirect_rule_deleted` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Redirect rule ID: an `hc_redirect_rule_` TypeID or its UUID",
              "example": "hc_redirect_rule_01jd3z5a7b9c1d3e5f7g9h1j3k"
            },
            "required": true,
            "description": "Redirect rule ID: an `hc_redirect_rule_` TypeID or its UUID",
            "name": "ruleId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted rule",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted rule",
                      "example": "hc_redirect_rule_01jd3z5a7b9c1d3e5f7g9h1j3k"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Redirect rule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/settings": {
      "get": {
        "operationId": "getQuillsHelpCenterSettings",
        "tags": [
          "Help center"
        ],
        "summary": "Get help-center settings",
        "description": "Gets the help-center homepage text, header links, locales, auto-translate and search engine settings. Each value that was never set, or is stored in an invalid form, reads as its default. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Help-center settings with defaults applied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsHelpCenterSettings",
        "tags": [
          "Help center"
        ],
        "summary": "Update help-center homepage, header links, SEO and auto-translate",
        "description": "Changes the fields that are sent; send at least one. `headerLinks` replaces the stored list. Fields inside `seo` and `autoTranslate` merge over the stored values. Locales and the custom domain are not changed here. Records a `settings.help_center_updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "homepageTitle": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Homepage heading in the default locale, trimmed, 1 to 200 characters",
                    "example": "How can we help?"
                  },
                  "homepageDescription": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Homepage text under the heading in the default locale, trimmed, up to 500 characters",
                    "example": "Search our knowledge base or browse by category"
                  },
                  "headerLinks": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60,
                          "description": "Link text, trimmed, 1 to 60 characters",
                          "example": "Status"
                        },
                        "url": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 500,
                          "description": "Absolute http(s) URL or a path starting with `/`, up to 500 characters",
                          "example": "https://status.example.com"
                        }
                      },
                      "required": [
                        "label",
                        "url"
                      ]
                    },
                    "maxItems": 3,
                    "description": "The complete list of header links, up to 3, in display order. An empty array removes them all."
                  },
                  "seo": {
                    "type": "object",
                    "properties": {
                      "metaDescription": {
                        "type": "string",
                        "maxLength": 500,
                        "description": "Meta description for the help-center homepage, up to 500 characters; an empty string clears it",
                        "example": "Guides and answers for Acme customers"
                      },
                      "structuredDataEnabled": {
                        "type": "boolean",
                        "description": "Whether public pages ask for structured data for search engines"
                      },
                      "indexable": {
                        "type": "boolean",
                        "description": "Whether search engines may index the help center; false also turns off the sitemap"
                      }
                    },
                    "description": "Search engine settings to change; fields left out keep their values"
                  },
                  "autoTranslate": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Whether publishing an article asks for draft AI translations into the additional locales"
                      },
                      "protectedTerms": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "maxItems": 100,
                        "description": "The complete list of terms that AI translation keeps as written, up to 100 terms of up to 100 characters",
                        "example": [
                          "Acme Sync"
                        ]
                      }
                    },
                    "description": "Auto-translate settings to change; fields left out keep their values"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored help-center settings are not a JSON object; nothing was changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/settings/locales": {
      "put": {
        "operationId": "enableQuillsHelpCenterLocale",
        "tags": [
          "Help center"
        ],
        "summary": "Enable an additional help-center locale with its homepage text",
        "description": "Adds a locale to the public help center with its homepage text; a homepage title is required. Enabling a locale that is already enabled replaces its text. Translations kept from an earlier enable show again. Records a `settings.help_center_updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locale": {
                    "type": "string",
                    "enum": [
                      "en",
                      "de",
                      "fr",
                      "es",
                      "ar",
                      "ru",
                      "pt-br",
                      "zh-cn",
                      "zh-tw",
                      "nl",
                      "pl",
                      "th",
                      "uk"
                    ],
                    "description": "An additional help-center locale code in lowercase; `en`, the default locale, is always enabled and is refused here",
                    "example": "fr"
                  },
                  "chrome": {
                    "type": "object",
                    "properties": {
                      "homepageTitle": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "description": "Homepage heading in this locale, trimmed, up to 200 characters",
                        "example": "Comment pouvons-nous vous aider ?"
                      },
                      "homepageDescription": {
                        "type": "string",
                        "maxLength": 500,
                        "description": "Homepage text under the heading in this locale, trimmed, up to 500 characters",
                        "example": "Cherchez dans notre base de connaissances ou parcourez les catégories"
                      },
                      "searchPlaceholder": {
                        "type": "string",
                        "maxLength": 200,
                        "description": "Placeholder text of the search box in this locale, trimmed, up to 200 characters",
                        "example": "Rechercher des articles"
                      }
                    },
                    "required": [
                      "homepageTitle",
                      "homepageDescription",
                      "searchPlaceholder"
                    ],
                    "description": "Homepage text in the locale; it replaces any stored text for the locale"
                  }
                },
                "required": [
                  "locale",
                  "chrome"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored help-center settings are not a JSON object; nothing was changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsHelpCenterLocaleChrome",
        "tags": [
          "Help center"
        ],
        "summary": "Update the homepage text of an enabled help-center locale",
        "description": "Changes the homepage text fields that are sent for one enabled additional locale; send at least one. Records a `settings.help_center_updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locale": {
                    "type": "string",
                    "enum": [
                      "en",
                      "de",
                      "fr",
                      "es",
                      "ar",
                      "ru",
                      "pt-br",
                      "zh-cn",
                      "zh-tw",
                      "nl",
                      "pl",
                      "th",
                      "uk"
                    ],
                    "description": "An additional help-center locale code in lowercase; `en`, the default locale, is always enabled and is refused here",
                    "example": "fr"
                  },
                  "chrome": {
                    "type": "object",
                    "properties": {
                      "homepageTitle": {
                        "type": "string",
                        "maxLength": 200,
                        "description": "Homepage heading in this locale, trimmed, up to 200 characters",
                        "example": "Comment pouvons-nous vous aider ?"
                      },
                      "homepageDescription": {
                        "type": "string",
                        "maxLength": 500,
                        "description": "Homepage text under the heading in this locale, trimmed, up to 500 characters",
                        "example": "Cherchez dans notre base de connaissances ou parcourez les catégories"
                      },
                      "searchPlaceholder": {
                        "type": "string",
                        "maxLength": 200,
                        "description": "Placeholder text of the search box in this locale, trimmed, up to 200 characters",
                        "example": "Rechercher des articles"
                      }
                    },
                    "description": "Homepage text to change; fields left out keep their values"
                  }
                },
                "required": [
                  "locale",
                  "chrome"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The locale is not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored help-center settings are not a JSON object; nothing was changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "disableQuillsHelpCenterLocale",
        "tags": [
          "Help center"
        ],
        "summary": "Disable an additional help-center locale",
        "description": "Removes a locale from the public help center, so its pages stop answering. Its translations and homepage text are kept for a later re-enable. Records a `settings.help_center_updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "en",
                "de",
                "fr",
                "es",
                "ar",
                "ru",
                "pt-br",
                "zh-cn",
                "zh-tw",
                "nl",
                "pl",
                "th",
                "uk"
              ],
              "description": "An additional help-center locale code in lowercase; `en`, the default locale, is always enabled and is refused here",
              "example": "fr"
            },
            "required": true,
            "description": "An additional help-center locale code in lowercase; `en`, the default locale, is always enabled and is refused here",
            "name": "locale",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The updated settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsHelpCenterSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The locale is not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored help-center settings are not a JSON object; nothing was changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/components/order": {
      "put": {
        "operationId": "reorderQuillsStatusComponents",
        "tags": [
          "Status page"
        ],
        "summary": "Reorder all status components",
        "description": "Sets the order of all live status components. Send every live component ID exactly once, in the new order; a partial or stale list changes nothing. Records a `status.components_reordered` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "componentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `status_component` prefix. Requests also accept the bare UUID.",
                      "example": "status_component_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 500,
                    "description": "Every live component ID exactly once, in the new order, as TypeIDs or UUIDs (1 to 500)",
                    "example": [
                      "status_component_11jd3kfbf5kznwj47tan9zt24m",
                      "status_component_11jd3pzx45hy43kwjrp1xpa7z3"
                    ]
                  }
                },
                "required": [
                  "componentIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "componentIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Component IDs in their new order",
                      "example": [
                        "status_component_11jd3kfbf5kznwj47tan9zt24m",
                        "status_component_11jd3pzx45hy43kwjrp1xpa7z3"
                      ]
                    }
                  },
                  "required": [
                    "componentIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A listed component does not exist or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The list does not name every live component exactly once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/components": {
      "get": {
        "operationId": "listQuillsStatusComponents",
        "tags": [
          "Status page"
        ],
        "summary": "List status components by group",
        "description": "Lists every group with its live components, then the ungrouped components, each in position order. Deleted components are left out; segment gates do not hide components from teammates. Not paginated. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The component tree",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Group ID",
                            "example": "status_group_01jd3j8fssz5awsh8vhtpre95b"
                          },
                          "name": {
                            "type": "string",
                            "description": "Group name",
                            "example": "Core services"
                          },
                          "position": {
                            "type": "number",
                            "description": "Sort position among groups, starting at 0; lower comes first",
                            "example": 0
                          },
                          "collapsed": {
                            "type": "boolean",
                            "description": "Whether the public status page shows the group collapsed"
                          },
                          "components": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/QuillsStatusComponent"
                            },
                            "description": "Live components in the group, in position order. Can be empty."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "position",
                          "collapsed",
                          "components"
                        ]
                      },
                      "description": "Every group, in position order"
                    },
                    "ungrouped": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsStatusComponent"
                      },
                      "description": "Live components in no group, in position order"
                    }
                  },
                  "required": [
                    "groups",
                    "ungrouped"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsStatusComponent",
        "tags": [
          "Status page"
        ],
        "summary": "Create a status component",
        "description": "Creates a status component at the end of the order. Its starting status writes no uptime history. Records a `status.component_created` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Component name, 1 to 200 characters after trimming",
                    "example": "API"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000,
                    "description": "Short description, up to 2,000 characters. Null or an empty string clears it.",
                    "example": "REST API and webhooks"
                  },
                  "groupId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Group to place the component in, as a TypeID or a UUID. Null: ungrouped. Absent on create: ungrouped.",
                    "example": "status_group_01jd3j8fssz5awsh8vhtpre95b"
                  },
                  "showUptime": {
                    "type": "boolean",
                    "description": "Whether the public status page shows the component's uptime. Default true on create."
                  },
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Segment IDs whose members can see the component on the public page, at most 50 distinct IDs. Empty: every viewer of the page sees it. Default empty on create.",
                    "example": [
                      "segment_11jd3pq5e6eycndy0yp57rcybv"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "operational",
                      "under_maintenance",
                      "degraded_performance",
                      "partial_outage",
                      "major_outage"
                    ],
                    "description": "Live status: `operational`, `under_maintenance`, `degraded_performance`, `partial_outage` or `major_outage`. On create it is the starting status (default `operational`) and writes no uptime history. On update a change appends to the uptime history."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created component",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusComponent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The group does not exist, or a segment does not exist or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/components/{componentId}": {
      "get": {
        "operationId": "getQuillsStatusComponent",
        "tags": [
          "Status page"
        ],
        "summary": "Get a status component",
        "description": "Returns one live status component. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Component ID, as a TypeID or a UUID",
              "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
            },
            "required": true,
            "description": "Component ID, as a TypeID or a UUID",
            "name": "componentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The component",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusComponent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Component not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsStatusComponent",
        "tags": [
          "Status page"
        ],
        "summary": "Update a status component or set its live status",
        "description": "Updates a component's details or sets its live status; send at least one field. A `status` change appends to the uptime history, records a `status.component_changed` event with the previous and new status, and returns `previousStatus`; other changes record `status.component_updated`. A body with only `status` is the hook for monitoring automation. A later change to an incident or maintenance window that affects the component recomputes its status from the open items. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Component ID, as a TypeID or a UUID",
              "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
            },
            "required": true,
            "description": "Component ID, as a TypeID or a UUID",
            "name": "componentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Component name, 1 to 200 characters after trimming",
                    "example": "API"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000,
                    "description": "Short description, up to 2,000 characters. Null or an empty string clears it.",
                    "example": "REST API and webhooks"
                  },
                  "groupId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Group to place the component in, as a TypeID or a UUID. Null: ungrouped. Absent on create: ungrouped.",
                    "example": "status_group_01jd3j8fssz5awsh8vhtpre95b"
                  },
                  "showUptime": {
                    "type": "boolean",
                    "description": "Whether the public status page shows the component's uptime. Default true on create."
                  },
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Segment IDs whose members can see the component on the public page, at most 50 distinct IDs. Empty: every viewer of the page sees it. Default empty on create.",
                    "example": [
                      "segment_11jd3pq5e6eycndy0yp57rcybv"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "operational",
                      "under_maintenance",
                      "degraded_performance",
                      "partial_outage",
                      "major_outage"
                    ],
                    "description": "Live status: `operational`, `under_maintenance`, `degraded_performance`, `partial_outage` or `major_outage`. On create it is the starting status (default `operational`) and writes no uptime history. On update a change appends to the uptime history."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated component",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/QuillsStatusComponent"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "previousStatus": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "operational",
                            "under_maintenance",
                            "degraded_performance",
                            "partial_outage",
                            "major_outage",
                            null
                          ],
                          "description": "Status before this request, when the request changed it. Null when the status did not change."
                        }
                      },
                      "required": [
                        "previousStatus"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Component not found or deleted, the group does not exist, or a segment does not exist or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsStatusComponent",
        "tags": [
          "Status page"
        ],
        "summary": "Delete a status component",
        "description": "Soft-deletes a status component: it leaves the status page and the editor, incident history keeps its links, and incident and maintenance changes skip it. Records a `status.component_deleted` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Component ID, as a TypeID or a UUID",
              "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
            },
            "required": true,
            "description": "Component ID, as a TypeID or a UUID",
            "name": "componentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted component",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted component",
                      "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Component not found or already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/groups/order": {
      "put": {
        "operationId": "reorderQuillsStatusGroups",
        "tags": [
          "Status page"
        ],
        "summary": "Reorder all status component groups",
        "description": "Sets the order of all status component groups. Send every group ID exactly once, in the new order; a partial or stale list changes nothing. Records a `status.groups_reordered` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "groupIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `status_group` prefix. Requests also accept the bare UUID.",
                      "example": "status_group_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 500,
                    "description": "Every group ID exactly once, in the new order, as TypeIDs or UUIDs (1 to 500)",
                    "example": [
                      "status_group_01jd3j8fssz5awsh8vhtpre95b"
                    ]
                  }
                },
                "required": [
                  "groupIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groupIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Group IDs in their new order",
                      "example": [
                        "status_group_01jd3j8fssz5awsh8vhtpre95b"
                      ]
                    }
                  },
                  "required": [
                    "groupIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A listed group does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The list does not name every group exactly once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/groups": {
      "post": {
        "operationId": "createQuillsStatusGroup",
        "tags": [
          "Status page"
        ],
        "summary": "Create a status component group",
        "description": "Creates a status component group at the end of the order. Records a `status.group_created` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Group name, 1 to 200 characters after trimming",
                    "example": "Core services"
                  },
                  "collapsed": {
                    "type": "boolean",
                    "description": "Whether the public status page shows the group collapsed. Default false on create."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusGroup"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/groups/{groupId}": {
      "patch": {
        "operationId": "updateQuillsStatusGroup",
        "tags": [
          "Status page"
        ],
        "summary": "Rename or collapse a status component group",
        "description": "Renames a group or changes whether it shows collapsed; send at least one field. Records a `status.group_updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Group ID, as a TypeID or a UUID",
              "example": "status_group_01jd3j8fssz5awsh8vhtpre95b"
            },
            "required": true,
            "description": "Group ID, as a TypeID or a UUID",
            "name": "groupId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Group name, 1 to 200 characters after trimming",
                    "example": "Core services"
                  },
                  "collapsed": {
                    "type": "boolean",
                    "description": "Whether the public status page shows the group collapsed. Default false on create."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusGroup"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Group not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsStatusGroup",
        "tags": [
          "Status page"
        ],
        "summary": "Delete a status component group",
        "description": "Permanently deletes a group. Its components stay and become ungrouped. Records a `status.group_deleted` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Group ID, as a TypeID or a UUID",
              "example": "status_group_01jd3j8fssz5awsh8vhtpre95b"
            },
            "required": true,
            "description": "Group ID, as a TypeID or a UUID",
            "name": "groupId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted group",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted group",
                      "example": "status_group_01jd3j8fssz5awsh8vhtpre95b"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Group not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/incidents": {
      "get": {
        "operationId": "listQuillsStatusIncidents",
        "tags": [
          "Status page"
        ],
        "summary": "List incidents and maintenance windows",
        "description": "Lists incidents and maintenance windows with their affected components and full timelines, newest created first. Deleted items are left out. `search` matches the title or any update body, ignoring case. Teammates also see components behind segment gates. Uses cursor pagination: pass `nextCursor` as `cursor` for the next page. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "incident",
                "maintenance"
              ],
              "description": "Only items of this type: `incident` or `maintenance`. Absent: both."
            },
            "required": false,
            "description": "Only items of this type: `incident` or `maintenance`. Absent: both.",
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "resolved",
                "all"
              ],
              "default": "all",
              "description": "Filter by state. `active`: not yet resolved or completed (scheduled windows included). `resolved`: resolved incidents and completed windows. `all`: both."
            },
            "required": false,
            "description": "Filter by state. `active`: not yet resolved or completed (scheduled windows included). `resolved`: resolved incidents and completed windows. `all`: both.",
            "name": "state",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Text to find in the title or in any timeline update body, case-insensitive",
              "example": "database"
            },
            "required": false,
            "description": "Text to find in the title or in any timeline update body, case-insensitive",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "The previous page's `nextCursor`: returns the items that follow it in newest-first order. Absent: the first page.",
              "example": "status_incident_11jd39s346q3d25vt4f5v37e3s"
            },
            "required": false,
            "description": "The previous page's `nextCursor`: returns the items that follow it in newest-first order. Absent: the first page.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Maximum number of items to return, 1 to 100",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of items to return, 1 to 100",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of incidents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "incidents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsStatusIncident"
                      },
                      "description": "The page of incidents and maintenance windows"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page: the ID of the last item on this page. Null on the last page.",
                      "example": "status_incident_11jd39s346q3d25vt4f5v37e3s"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more items follow this page"
                    }
                  },
                  "required": [
                    "incidents",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsStatusIncident",
        "tags": [
          "Status page"
        ],
        "summary": "Publish an incident, schedule maintenance or log a past incident",
        "description": "Creates an incident or maintenance window with its first timeline update, or logs a past incident with `backfill`. A new item is public at once. A live item records a `status.incident_published` event; when `notifySubscribers` is true, subscribers get an email for a published incident, and for a maintenance window only when it is published already running (`in_progress` or `verifying`). A backfill records `status.incident_created` and notifies nobody. When the starting status holds components (an open incident or a running window), the affected components take the sent statuses and the uptime history records the change. A scheduled sweep starts and completes maintenance windows at their planned times when `autoStart` and `autoComplete` are on. Returns 400 when the status does not belong to `kind`, the planned end is not after the planned start, or a backfill does not use the terminal status or ends before it starts. Requires the `quills:create` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "incident",
                      "maintenance"
                    ],
                    "description": "Item type. `incident`: an unplanned problem. `maintenance`: a planned maintenance window."
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Title shown on the status page, 1 to 200 characters after trimming",
                    "example": "Elevated error rates on the API"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "investigating",
                      "identified",
                      "monitoring",
                      "resolved",
                      "scheduled",
                      "in_progress",
                      "verifying",
                      "completed"
                    ],
                    "description": "Starting lifecycle status; it must belong to `kind`. Incidents: `investigating`, `identified`, `monitoring` or `resolved`. Maintenance windows: `scheduled`, `in_progress`, `verifying` or `completed`. A terminal status (`resolved`, `completed`) creates the item already closed."
                  },
                  "impact": {
                    "type": "string",
                    "enum": [
                      "none",
                      "minor",
                      "major",
                      "critical",
                      "maintenance"
                    ],
                    "description": "Incident impact, used only with `impactOverride: true`, where absence means `none`. Without an override the impact derives from the component statuses. Ignored for maintenance windows, which always get `maintenance`."
                  },
                  "impactOverride": {
                    "type": "boolean",
                    "description": "Incidents: true to keep `impact` as sent instead of deriving it from the component statuses. Default false. Ignored for maintenance windows."
                  },
                  "affectedComponents": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "componentId": {
                          "type": "string",
                          "description": "Affected component ID, as a TypeID or a UUID",
                          "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                        },
                        "componentStatus": {
                          "type": "string",
                          "enum": [
                            "operational",
                            "under_maintenance",
                            "degraded_performance",
                            "partial_outage",
                            "major_outage"
                          ],
                          "description": "Status to hold the component at while the incident is open, or while the maintenance window is `in_progress` or `verifying`. A component held by several items takes the most severe status."
                        }
                      },
                      "required": [
                        "componentId",
                        "componentStatus"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Affected components with the status each one takes, 1 to 50 entries. Each component can appear only once."
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Timeline update text shown on the status page, 1 to 10,000 characters after trimming",
                    "example": "We identified a faulty deploy and are rolling it back."
                  },
                  "scheduledStartAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "Planned start of a maintenance window, as ISO 8601 with a UTC offset. For a window created `scheduled` it is also the `startedAt` until the window runs. Null or absent: no planned start.",
                    "example": "2026-11-20T02:00:00Z"
                  },
                  "scheduledEndAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "Planned end of a maintenance window, as ISO 8601 with a UTC offset. Must be after `scheduledStartAt`. Null or absent: no planned end.",
                    "example": "2026-11-20T04:00:00Z"
                  },
                  "autoStart": {
                    "type": "boolean",
                    "description": "Maintenance windows: start the window automatically at `scheduledStartAt`. Default true."
                  },
                  "autoComplete": {
                    "type": "boolean",
                    "description": "Maintenance windows: complete the window automatically at `scheduledEndAt` and restore its components. Default true."
                  },
                  "backfill": {
                    "type": "object",
                    "properties": {
                      "startedAt": {
                        "type": "string",
                        "maxLength": 64,
                        "format": "date-time",
                        "description": "When the past item started, as ISO 8601 with a UTC offset",
                        "example": "2026-11-02T09:15:00Z"
                      },
                      "resolvedAt": {
                        "type": "string",
                        "maxLength": 64,
                        "format": "date-time",
                        "description": "When the past item ended, as ISO 8601 with a UTC offset. Must be after `startedAt`. The first update is dated at this time.",
                        "example": "2026-11-02T10:40:00Z"
                      }
                    },
                    "required": [
                      "startedAt",
                      "resolvedAt"
                    ],
                    "description": "Logs a past item instead of publishing a live one. It needs the terminal status (`resolved` or `completed`), never notifies subscribers, leaves component statuses unchanged and cannot be reopened. Absent: a live item."
                  },
                  "notifySubscribers": {
                    "type": "boolean",
                    "description": "Whether the item emails status page subscribers. Default true. Always false for a backfill."
                  },
                  "templateId": {
                    "type": "string",
                    "description": "Incident template the first update was written from, as a TypeID or a UUID. Recorded on the update for the template's usage count; the server does not apply the template's text.",
                    "example": "status_tmpl_11jd3y77zxyyk596ngya1dq91k"
                  }
                },
                "required": [
                  "kind",
                  "title",
                  "status",
                  "affectedComponents",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created incident",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusIncident"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "An affected component does not exist or is deleted, or the template does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/incidents/{incidentId}": {
      "get": {
        "operationId": "getQuillsStatusIncident",
        "tags": [
          "Status page"
        ],
        "summary": "Get an incident or maintenance window",
        "description": "Returns one incident or maintenance window with its affected components, full timeline and an estimate of the subscribers it notified. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Incident or maintenance window ID, as a TypeID or a UUID",
              "example": "status_incident_01jd3e28jt97kb6cq643dzvmxx"
            },
            "required": true,
            "description": "Incident or maintenance window ID, as a TypeID or a UUID",
            "name": "incidentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The incident with its timeline",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/QuillsStatusIncident"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "notifiedSubscriberCount": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "About how many subscribers the publish reached: the current count of active subscribers to the whole page or to one of its components, not a stored delivery count. Null when the item does not notify subscribers, was backfilled or was never published.",
                          "example": 128
                        }
                      },
                      "required": [
                        "notifiedSubscriberCount"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Incident not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsStatusIncident",
        "tags": [
          "Status page"
        ],
        "summary": "Edit an incident's title, impact, window, automation or components",
        "description": "Edits an incident or maintenance window without posting a timeline update; status changes go through `postQuillsStatusIncidentUpdate`. Send at least one field. A component list replaces the live links: links to components deleted earlier stay as history, and deleted components in the list are dropped (400 when every sent component is deleted). While the item holds its components, their live statuses are recomputed. A change to the title, the planned window or the publicly visible components sets `detailsEditedAt`. Records a `status.incident_updated` event and sends no subscriber email. Returns 400 when the planned end would not be after the planned start. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Incident or maintenance window ID, as a TypeID or a UUID",
              "example": "status_incident_01jd3e28jt97kb6cq643dzvmxx"
            },
            "required": true,
            "description": "Incident or maintenance window ID, as a TypeID or a UUID",
            "name": "incidentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "New title, 1 to 200 characters after trimming",
                    "example": "Elevated error rates on the API"
                  },
                  "impact": {
                    "type": "string",
                    "enum": [
                      "none",
                      "minor",
                      "major",
                      "critical",
                      "maintenance"
                    ],
                    "description": "New incident impact. Applied only while the override is on (sent here as `impactOverride: true`, or already on). Ignored for maintenance windows."
                  },
                  "impactOverride": {
                    "type": "boolean",
                    "description": "Incidents: true to keep `impact` as set by hand; false to derive it from the component statuses, recomputed when `affectedComponents` is sent. Ignored for maintenance windows."
                  },
                  "affectedComponents": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "componentId": {
                          "type": "string",
                          "description": "Affected component ID, as a TypeID or a UUID",
                          "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                        },
                        "componentStatus": {
                          "type": "string",
                          "enum": [
                            "operational",
                            "under_maintenance",
                            "degraded_performance",
                            "partial_outage",
                            "major_outage"
                          ],
                          "description": "Status to hold the component at while the incident is open, or while the maintenance window is `in_progress` or `verifying`. A component held by several items takes the most severe status."
                        }
                      },
                      "required": [
                        "componentId",
                        "componentStatus"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Replacement list of affected components with the status each one takes, 1 to 50 entries. Absent: the components stay as they are."
                  },
                  "scheduledStartAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "New planned start, as ISO 8601 with a UTC offset; null clears it. For a window still `scheduled`, a new start also moves `startedAt`.",
                    "example": "2026-11-20T02:00:00Z"
                  },
                  "scheduledEndAt": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "New planned end, as ISO 8601 with a UTC offset; null clears it. Must be after the planned start.",
                    "example": "2026-11-20T04:00:00Z"
                  },
                  "autoStart": {
                    "type": "boolean",
                    "description": "Maintenance windows: whether to start the window automatically at its planned start"
                  },
                  "autoComplete": {
                    "type": "boolean",
                    "description": "Maintenance windows: whether to complete the window automatically at its planned end"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated incident",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusIncident"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Incident not found or deleted, or a sent component does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsStatusIncident",
        "tags": [
          "Status page"
        ],
        "summary": "Delete an incident or maintenance window",
        "description": "Soft-deletes an incident or maintenance window: it leaves the status page and every list. Components it held return to the status that the remaining open items set. Records a `status.incident_deleted` event. Requires the `quills:delete` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Incident or maintenance window ID, as a TypeID or a UUID",
              "example": "status_incident_01jd3e28jt97kb6cq643dzvmxx"
            },
            "required": true,
            "description": "Incident or maintenance window ID, as a TypeID or a UUID",
            "name": "incidentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted incident",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted item",
                      "example": "status_incident_01jd3e28jt97kb6cq643dzvmxx"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Incident not found or already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/incidents/{incidentId}/updates": {
      "post": {
        "operationId": "postQuillsStatusIncidentUpdate",
        "tags": [
          "Status page"
        ],
        "summary": "Post a timeline update: progress, resolve or reopen",
        "description": "Posts a timeline update and moves the item to its status, which must belong to the item's kind (400 otherwise). A terminal status (`resolved`, `completed`) closes the item and, unless `skipRestore` is true, returns its components to the status the remaining open items set. Moving a closed item to another status reopens it; a backfilled item cannot be reopened (409). Moving a scheduled window to `in_progress` or `verifying` starts it and applies its component statuses. Records `status.incident_resolved` when the update closes the item, and `status.incident_update_posted` otherwise. When the item notifies subscribers, they get an email for each incident update and for a maintenance window that moves from `scheduled` to running. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Incident or maintenance window ID, as a TypeID or a UUID",
              "example": "status_incident_01jd3e28jt97kb6cq643dzvmxx"
            },
            "required": true,
            "description": "Incident or maintenance window ID, as a TypeID or a UUID",
            "name": "incidentId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "investigating",
                      "identified",
                      "monitoring",
                      "resolved",
                      "scheduled",
                      "in_progress",
                      "verifying",
                      "completed"
                    ],
                    "description": "New lifecycle status; it must belong to the item's kind. Incidents: `investigating`, `identified`, `monitoring`, `resolved`. Maintenance windows: `scheduled`, `in_progress`, `verifying`, `completed`."
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Timeline update text shown on the status page, 1 to 10,000 characters after trimming",
                    "example": "We identified a faulty deploy and are rolling it back."
                  },
                  "skipRestore": {
                    "type": "boolean",
                    "description": "With a terminal status: true leaves the components at their current status instead of restoring them. Default false."
                  },
                  "templateId": {
                    "type": "string",
                    "description": "Incident template the update was written from, as a TypeID or a UUID. Recorded for the template's usage count; the server does not apply the template's text.",
                    "example": "status_tmpl_11jd3y77zxyyk596ngya1dq91k"
                  }
                },
                "required": [
                  "status",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The incident with the new update",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/QuillsStatusIncident"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "previousStatus": {
                          "type": "string",
                          "enum": [
                            "investigating",
                            "identified",
                            "monitoring",
                            "resolved",
                            "scheduled",
                            "in_progress",
                            "verifying",
                            "completed"
                          ],
                          "description": "Lifecycle status the item had before this update"
                        }
                      },
                      "required": [
                        "previousStatus"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Incident not found or deleted, or the template does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/incidents/{incidentId}/start": {
      "post": {
        "operationId": "startQuillsStatusMaintenance",
        "tags": [
          "Status page"
        ],
        "summary": "Start a scheduled maintenance window now",
        "description": "Starts a `scheduled` maintenance window now: sets it to `in_progress`, posts the standard start update, sets `startedAt` to now and applies the window's component statuses. The planned start and end stay as planned. Records a `status.maintenance_started` event, which emails subscribers when the window notifies them. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Incident or maintenance window ID, as a TypeID or a UUID",
              "example": "status_incident_01jd3e28jt97kb6cq643dzvmxx"
            },
            "required": true,
            "description": "Incident or maintenance window ID, as a TypeID or a UUID",
            "name": "incidentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The started window",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusIncident"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Incident not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The item is an incident, or a maintenance window that is not `scheduled`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/templates": {
      "get": {
        "operationId": "listQuillsStatusTemplates",
        "tags": [
          "Status page"
        ],
        "summary": "List incident templates",
        "description": "Lists incident templates by name, A to Z, with their usage counts. Uses offset pagination: pass `nextOffset` as `offset` for the next page. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Templates by name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "templates": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsStatusTemplate"
                      },
                      "description": "The page of templates"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset of the next page. Null when this is the last page.",
                      "example": 50
                    }
                  },
                  "required": [
                    "templates",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsStatusTemplate",
        "tags": [
          "Status page"
        ],
        "summary": "Create an incident template",
        "description": "Creates a reusable incident template: a name, a suggested title, update text, impact and components that teammates can start an incident or update from. Records a `status.template_created` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Template name, 1 to 200 characters after trimming",
                    "example": "Database degradation"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Incident title the template suggests, 1 to 200 characters after trimming",
                    "example": "Degraded database performance"
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Update text the template suggests, 1 to 10,000 characters after trimming",
                    "example": "We are seeing slow responses from our primary database and are investigating."
                  },
                  "impact": {
                    "type": "string",
                    "enum": [
                      "none",
                      "minor",
                      "major",
                      "critical",
                      "maintenance"
                    ],
                    "description": "Impact the template suggests: `none`, `minor`, `major`, `critical` or `maintenance`. Default `minor` on create."
                  },
                  "componentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `status_component` prefix. Requests also accept the bare UUID.",
                      "example": "status_component_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Component IDs the template suggests, at most 50 distinct IDs. Each must exist and not be deleted. Default empty on create.",
                    "example": [
                      "status_component_11jd3kfbf5kznwj47tan9zt24m"
                    ]
                  }
                },
                "required": [
                  "name",
                  "title",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A listed component does not exist or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/templates/{templateId}": {
      "patch": {
        "operationId": "updateQuillsStatusTemplate",
        "tags": [
          "Status page"
        ],
        "summary": "Update an incident template",
        "description": "Updates an incident template; send at least one field. Updates that cited it keep their text. Records a `status.template_updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Template ID, as a TypeID or a UUID",
              "example": "status_tmpl_11jd3y77zxyyk596ngya1dq91k"
            },
            "required": true,
            "description": "Template ID, as a TypeID or a UUID",
            "name": "templateId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Template name, 1 to 200 characters after trimming",
                    "example": "Database degradation"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Incident title the template suggests, 1 to 200 characters after trimming",
                    "example": "Degraded database performance"
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Update text the template suggests, 1 to 10,000 characters after trimming",
                    "example": "We are seeing slow responses from our primary database and are investigating."
                  },
                  "impact": {
                    "type": "string",
                    "enum": [
                      "none",
                      "minor",
                      "major",
                      "critical",
                      "maintenance"
                    ],
                    "description": "Impact the template suggests: `none`, `minor`, `major`, `critical` or `maintenance`. Default `minor` on create."
                  },
                  "componentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `status_component` prefix. Requests also accept the bare UUID.",
                      "example": "status_component_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Component IDs the template suggests, at most 50 distinct IDs. Each must exist and not be deleted. Default empty on create.",
                    "example": [
                      "status_component_11jd3kfbf5kznwj47tan9zt24m"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Template not found, or a listed component does not exist or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsStatusTemplate",
        "tags": [
          "Status page"
        ],
        "summary": "Delete an incident template",
        "description": "Permanently deletes an incident template. Updates that cited it keep their text and lose the link. Records a `status.template_deleted` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Template ID, as a TypeID or a UUID",
              "example": "status_tmpl_11jd3y77zxyyk596ngya1dq91k"
            },
            "required": true,
            "description": "Template ID, as a TypeID or a UUID",
            "name": "templateId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted template",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted template",
                      "example": "status_tmpl_11jd3y77zxyyk596ngya1dq91k"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/subscribers/export": {
      "get": {
        "operationId": "exportQuillsStatusSubscribers",
        "tags": [
          "Status page"
        ],
        "summary": "Export every status subscriber for a CSV file",
        "description": "Returns every status page subscription, newest first and unsubscribed people included, for the caller to write a CSV file. At most 5000 rows: a larger list returns 409, and the list route pages through it instead. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "All subscribers, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscribers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Subscriber's display name. Null when none is set.",
                            "example": "Ada Park"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Subscriber's email address. Null when the person has none.",
                            "example": "ada.park@example.com"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "page",
                              "components"
                            ],
                            "description": "What the subscription covers. `page`: the whole status page. `components`: only the components in `componentIds`."
                          },
                          "componentCount": {
                            "type": "number",
                            "description": "Number of components followed when `scope` is `components`; 0 for `page`",
                            "example": 2
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "self_serve",
                              "auto",
                              "admin",
                              "csv_import"
                            ],
                            "description": "How the subscription was created. `self_serve`: the person subscribed on the status page. `auto`: added automatically, not by the person or a teammate. `admin`: a teammate added the person by email. `csv_import`: a teammate imported the person's email."
                          },
                          "unsubscribedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the person opted out, in ISO 8601 UTC. Null while subscribed.",
                            "example": "2026-11-25T08:12:44.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the subscription was created, in ISO 8601 UTC",
                            "example": "2026-10-14T17:03:21.000Z"
                          }
                        },
                        "required": [
                          "displayName",
                          "email",
                          "scope",
                          "componentCount",
                          "source",
                          "unsubscribedAt",
                          "createdAt"
                        ]
                      },
                      "description": "Every subscription, newest first"
                    }
                  },
                  "required": [
                    "subscribers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace has more than 5000 subscriptions; page through the list route instead",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/subscribers": {
      "get": {
        "operationId": "listQuillsStatusSubscribers",
        "tags": [
          "Status page"
        ],
        "summary": "List status subscribers with counts",
        "description": "Lists status page subscribers, newest first, unsubscribed people included, with counts over all subscriptions. `search` matches the name or email, ignoring case. Uses cursor pagination: pass `nextCursor` as `cursor` for the next page. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Text to find in the subscriber's display name or email, case-insensitive",
              "example": "example.com"
            },
            "required": false,
            "description": "Text to find in the subscriber's display name or email, case-insensitive",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "The previous page's `nextCursor`: returns the subscriptions that follow it in newest-first order. An unknown cursor returns no rows. Absent: the first page.",
              "example": "status_sub_11jd33c4dwa7n36096q14dr9gp"
            },
            "required": false,
            "description": "The previous page's `nextCursor`: returns the subscriptions that follow it in newest-first order. An unknown cursor returns no rows. Absent: the first page.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Maximum number of subscribers to return, 1 to 100",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of subscribers to return, 1 to 100",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of subscribers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscribers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Subscription ID",
                            "example": "status_sub_11jd33c4dwa7n36096q14dr9gp"
                          },
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the subscribed person",
                            "example": "principal_01jd3gqapenecfseczp11hygcp"
                          },
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Subscriber's display name. Null when none is set.",
                            "example": "Ada Park"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Subscriber's email address. Null when the person has none.",
                            "example": "ada.park@example.com"
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "page",
                              "components"
                            ],
                            "description": "What the subscription covers. `page`: the whole status page. `components`: only the components in `componentIds`."
                          },
                          "componentIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Component IDs the person follows when `scope` is `components`. Empty for `page`.",
                            "example": [
                              "status_component_11jd3kfbf5kznwj47tan9zt24m"
                            ]
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "self_serve",
                              "auto",
                              "admin",
                              "csv_import"
                            ],
                            "description": "How the subscription was created. `self_serve`: the person subscribed on the status page. `auto`: added automatically, not by the person or a teammate. `admin`: a teammate added the person by email. `csv_import`: a teammate imported the person's email."
                          },
                          "unsubscribedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the person opted out, in ISO 8601 UTC. Null while subscribed.",
                            "example": "2026-11-25T08:12:44.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the subscription was created, in ISO 8601 UTC",
                            "example": "2026-10-14T17:03:21.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "principalId",
                          "displayName",
                          "email",
                          "scope",
                          "componentIds",
                          "source",
                          "unsubscribedAt",
                          "createdAt"
                        ]
                      },
                      "description": "The page of subscriptions"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page: the ID of the last subscription on this page. Null on the last page.",
                      "example": "status_sub_11jd33c4dwa7n36096q14dr9gp"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more subscriptions follow this page"
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "number",
                          "description": "All subscriptions, unsubscribed ones included",
                          "example": 412
                        },
                        "active": {
                          "type": "number",
                          "description": "Subscriptions that are not unsubscribed",
                          "example": 389
                        },
                        "unsubscribed": {
                          "type": "number",
                          "description": "Subscriptions that opted out",
                          "example": 23
                        }
                      },
                      "required": [
                        "total",
                        "active",
                        "unsubscribed"
                      ],
                      "description": "Counts over every subscription, ignoring `search`"
                    }
                  },
                  "required": [
                    "subscribers",
                    "nextCursor",
                    "hasMore",
                    "counts"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "addQuillsStatusSubscriber",
        "tags": [
          "Status page"
        ],
        "summary": "Subscribe an existing customer to the status page by email",
        "description": "Subscribes the existing customer with this email to the whole status page, with source `admin`. Never creates an account. An active subscription to some components becomes a whole-page subscription. A person who opted out stays out and the response says `subscribed: false`. Records a `status.subscriber_added` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "description": "Email of an existing customer, matched case-insensitively, up to 320 characters",
                    "example": "ada.park@example.com"
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The person and whether they are subscribed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the matched customer",
                      "example": "principal_01jd3gqapenecfseczp11hygcp"
                    },
                    "subscribed": {
                      "type": "boolean",
                      "description": "Whether the person is now subscribed. False: they opted out earlier and stay out."
                    }
                  },
                  "required": [
                    "principalId",
                    "subscribed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No existing customer has that email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/subscribers/import": {
      "post": {
        "operationId": "importQuillsStatusSubscribers",
        "tags": [
          "Status page"
        ],
        "summary": "Subscribe existing customers to the status page by email",
        "description": "Subscribes existing customers to the whole status page by email, with source `csv_import`. Up to 5000 emails; a larger list is rejected whole. Emails are trimmed, lowercased and deduplicated, and match existing customer accounts only; no account is created. Active subscriptions to some components become whole-page subscriptions, and people who opted out stay out. The caller confirms the people's consent first. Records a `status.subscribers_imported` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 320
                    },
                    "minItems": 1,
                    "maxItems": 5000,
                    "description": "Email addresses to subscribe, 1 to 5000, each up to 320 characters. Blank entries are ignored.",
                    "example": [
                      "ada.park@example.com",
                      "lee.chen@example.com"
                    ]
                  }
                },
                "required": [
                  "emails"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Import counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "imported": {
                      "type": "number",
                      "description": "People subscribed or kept subscribed by this import",
                      "example": 41
                    },
                    "skipped": {
                      "type": "number",
                      "description": "Emails not subscribed because they match no customer: `total` minus `imported` minus `optedOut`",
                      "example": 6
                    },
                    "optedOut": {
                      "type": "number",
                      "description": "Matched people who opted out earlier and stay out",
                      "example": 3
                    },
                    "total": {
                      "type": "number",
                      "description": "Distinct non-blank emails in the request",
                      "example": 50
                    }
                  },
                  "required": [
                    "imported",
                    "skipped",
                    "optedOut",
                    "total"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/subscribers/{principalId}": {
      "delete": {
        "operationId": "removeQuillsStatusSubscriber",
        "tags": [
          "Status page"
        ],
        "summary": "Unsubscribe a person from the status page",
        "description": "Unsubscribes a person from the status page. The subscription row stays as the record of the opt-out, so later admin adds and imports leave the person out. `removed: false` means the person was not subscribed. Records a `status.subscriber_removed` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the person, as a TypeID or a UUID",
              "example": "principal_01jd3gqapenecfseczp11hygcp"
            },
            "required": true,
            "description": "Principal ID of the person, as a TypeID or a UUID",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the request unsubscribed the person",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the person",
                      "example": "principal_01jd3gqapenecfseczp11hygcp"
                    },
                    "removed": {
                      "type": "boolean",
                      "description": "Whether this request unsubscribed the person. False: they had no active subscription."
                    }
                  },
                  "required": [
                    "principalId",
                    "removed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No person has this principal ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/summary": {
      "get": {
        "operationId": "getQuillsStatusSummary",
        "tags": [
          "Status page"
        ],
        "summary": "Get the status page overview",
        "description": "Returns the teammate overview of the status page: whether it is published, the overall status derived from all live components, components by group, open incidents, running and upcoming maintenance (at most 20 of each), average 90-day uptime, and subscriber and incident counts. Segment gates do not hide anything here. Works while the page is unpublished. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the status page publish switch is on. The public page also needs the statusPage module flag."
                    },
                    "topLevelStatus": {
                      "type": "string",
                      "enum": [
                        "operational",
                        "under_maintenance",
                        "degraded_performance",
                        "partial_outage",
                        "major_outage"
                      ],
                      "description": "Overall status: the most severe status of any live component, `operational` when there are none. Values: `operational`, `under_maintenance`, `degraded_performance`, `partial_outage`, `major_outage`."
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Group ID",
                            "example": "status_group_01jd3j8fssz5awsh8vhtpre95b"
                          },
                          "name": {
                            "type": "string",
                            "description": "Group name",
                            "example": "Core services"
                          },
                          "components": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Component ID",
                                  "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Component name",
                                  "example": "API"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "operational",
                                    "under_maintenance",
                                    "degraded_performance",
                                    "partial_outage",
                                    "major_outage"
                                  ],
                                  "description": "Component status, least to most severe. `operational`: working normally. `under_maintenance`: in planned maintenance; counts as up for uptime. `degraded_performance`: working, but slower or less reliable than usual. `partial_outage`: unavailable for some users or functions. `major_outage`: unavailable for most or all users."
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "status"
                              ]
                            },
                            "description": "Live components in the group, in position order. Can be empty."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "components"
                        ]
                      },
                      "description": "Every group, in position order"
                    },
                    "ungroupedComponents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Component ID",
                            "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                          },
                          "name": {
                            "type": "string",
                            "description": "Component name",
                            "example": "API"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "operational",
                              "under_maintenance",
                              "degraded_performance",
                              "partial_outage",
                              "major_outage"
                            ],
                            "description": "Component status, least to most severe. `operational`: working normally. `under_maintenance`: in planned maintenance; counts as up for uptime. `degraded_performance`: working, but slower or less reliable than usual. `partial_outage`: unavailable for some users or functions. `major_outage`: unavailable for most or all users."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "status"
                        ]
                      },
                      "description": "Live components in no group, in position order"
                    },
                    "activeIncidents": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsStatusIncident"
                      },
                      "description": "Open incidents, newest created first, at most 20"
                    },
                    "liveMaintenance": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsStatusIncident"
                      },
                      "description": "Running maintenance windows (`in_progress` or `verifying`), newest created first, at most 20"
                    },
                    "upcomingMaintenance": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsStatusIncident"
                      },
                      "description": "Scheduled maintenance windows, earliest planned start first and those without one last, at most 20"
                    },
                    "uptime90d": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Average daily uptime over the last 90 UTC days across all live components, as a percentage from 0 to 100. Null when there are no live components.",
                      "example": 99.72
                    },
                    "subscribers": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "number",
                          "description": "All subscriptions, unsubscribed ones included",
                          "example": 412
                        },
                        "active": {
                          "type": "number",
                          "description": "Subscriptions that are not unsubscribed",
                          "example": 389
                        },
                        "unsubscribed": {
                          "type": "number",
                          "description": "Subscriptions that opted out",
                          "example": 23
                        },
                        "newLast7d": {
                          "type": "number",
                          "description": "Active subscriptions created in the last 7 days",
                          "example": 12
                        }
                      },
                      "required": [
                        "total",
                        "active",
                        "unsubscribed",
                        "newLast7d"
                      ],
                      "description": "Status page subscriber counts"
                    },
                    "incidentsLast30d": {
                      "type": "number",
                      "description": "Incidents (not maintenance windows) that started in the last 30 days, deleted ones excluded",
                      "example": 3
                    }
                  },
                  "required": [
                    "enabled",
                    "topLevelStatus",
                    "groups",
                    "ungroupedComponents",
                    "activeIncidents",
                    "liveMaintenance",
                    "upcomingMaintenance",
                    "uptime90d",
                    "subscribers",
                    "incidentsLast30d"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/uptime": {
      "get": {
        "operationId": "getQuillsStatusUptime",
        "tags": [
          "Status page"
        ],
        "summary": "Get daily uptime for status components",
        "description": "Returns daily uptime for the requested components over the last `windowDays` UTC days, derived from the component status history: a status holds from its change until the next one. Unknown and deleted components are left out. Works while the status page is unpublished. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Comma-separated component IDs (TypeIDs or UUIDs), 1 to 50",
              "example": "status_component_11jd3kfbf5kznwj47tan9zt24m,status_component_11jd3pzx45hy43kwjrp1xpa7z3"
            },
            "required": true,
            "description": "Comma-separated component IDs (TypeIDs or UUIDs), 1 to 50",
            "name": "componentIds",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 90,
              "description": "Number of UTC days to cover, ending today, 1 to 365",
              "example": 90
            },
            "required": false,
            "description": "Number of UTC days to cover, ending today, 1 to 365",
            "name": "windowDays",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One series per live component",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "series": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "componentId": {
                            "type": "string",
                            "description": "Component ID",
                            "example": "status_component_11jd3kfbf5kznwj47tan9zt24m"
                          },
                          "days": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "date": {
                                  "type": "string",
                                  "description": "UTC calendar day, in YYYY-MM-DD form",
                                  "example": "2026-11-18"
                                },
                                "worstStatus": {
                                  "type": "string",
                                  "enum": [
                                    "operational",
                                    "under_maintenance",
                                    "degraded_performance",
                                    "partial_outage",
                                    "major_outage"
                                  ],
                                  "description": "Most severe status the component had at any time that day: `operational`, `under_maintenance`, `degraded_performance`, `partial_outage` or `major_outage`"
                                },
                                "uptimePct": {
                                  "type": "number",
                                  "description": "Share of the day spent `operational` or `under_maintenance`, as a percentage from 0 to 100 rounded to two decimals. Today counts only up to now.",
                                  "example": 99.86
                                }
                              },
                              "required": [
                                "date",
                                "worstStatus",
                                "uptimePct"
                              ]
                            },
                            "description": "One entry per UTC day of the window, oldest first, ending today"
                          }
                        },
                        "required": [
                          "componentId",
                          "days"
                        ]
                      },
                      "description": "One series per live requested component"
                    }
                  },
                  "required": [
                    "series"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/history/clear": {
      "post": {
        "operationId": "clearQuillsStatusHistory",
        "tags": [
          "Status page"
        ],
        "summary": "Clear resolved incidents and the uptime history",
        "description": "Permanently deletes every resolved incident and completed maintenance window (soft-deleted ones included) with its timeline, and the whole component status log that uptime derives from. Components, groups, templates, subscribers and open items stay. Cannot be undone. Records a `status.history_cleared` event with the counts. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "How many rows were removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "incidents": {
                      "type": "number",
                      "description": "Number of incidents and maintenance windows deleted",
                      "example": 27
                    },
                    "events": {
                      "type": "number",
                      "description": "Number of component status log entries deleted",
                      "example": 154
                    }
                  },
                  "required": [
                    "incidents",
                    "events"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/status/settings": {
      "get": {
        "operationId": "getQuillsStatusSettings",
        "tags": [
          "Status page"
        ],
        "summary": "Get status page settings",
        "description": "Returns the status page settings; unset or invalid stored values read as their defaults. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Status page settings with defaults applied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsStatusSettings",
        "tags": [
          "Status page"
        ],
        "summary": "Update status page settings",
        "description": "Updates the status page settings; send at least one field, and absent fields stay as they are. Only the status settings change; other workspace settings stay as stored. Records a `settings.status_updated` event. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Publishes (true) or unpublishes (false) the status page. The public page also needs the statusPage module flag."
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "public",
                      "authenticated",
                      "segments"
                    ],
                    "description": "Who can open the public status page. `public`: anyone. `authenticated`: signed-in visitors only. `segments`: members of `allowedSegmentIds` only. Anyone else gets 404, as for a closed page."
                  },
                  "allowedSegmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Segment IDs whose members can open the page when `audience` is `segments`, at most 50 distinct IDs. Each must exist and not be deleted.",
                    "example": [
                      "segment_11jd3pq5e6eycndy0yp57rcybv"
                    ]
                  },
                  "emailsDisabled": {
                    "type": "boolean",
                    "description": "Stored switch for turning off status subscriber emails. Subscriber email delivery does not read it at present."
                  },
                  "pageDescription": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "Description shown on the public status page, up to 500 characters after trimming. Null or an empty string clears it.",
                    "example": "Live status of the Example Co. app and API."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated status page settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsStatusSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A segment in `allowedSegmentIds` does not exist or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored workspace settings are not a JSON object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations": {
      "get": {
        "operationId": "listQuillsIntegrations",
        "tags": [
          "Integrations"
        ],
        "summary": "List connected integrations",
        "description": "Lists the workspace's provider connections, ordered by provider key, at most 100. Credentials are never returned. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Connections without their credentials",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integrations": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/QuillsIntegrationSummary"
                          },
                          {
                            "description": "An integration connection without credentials"
                          }
                        ]
                      },
                      "description": "Connections, ordered by `integrationType`."
                    }
                  },
                  "required": [
                    "integrations"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integration-catalog": {
      "get": {
        "operationId": "listQuillsIntegrationCatalog",
        "tags": [
          "Integrations"
        ],
        "summary": "List the integration catalog",
        "description": "Lists the providers that this build knows, with static metadata: the same for every workspace, and it does not say whether a provider is connected (see `listQuillsIntegrations`). Providers that this build can connect come first, then providers listed as not available yet. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "providers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Provider key. It is the `integrationType` of a connection to this provider.",
                            "example": "slack"
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name of the provider.",
                            "example": "Slack"
                          },
                          "category": {
                            "type": "string",
                            "description": "Provider group: `automation`, `notifications`, `issue_tracking`, `support_crm` or `user_data`.",
                            "example": "notifications"
                          },
                          "description": {
                            "type": "string",
                            "description": "One sentence about what the connection does. `Not available in this build.` for a provider that cannot be connected yet."
                          },
                          "available": {
                            "type": "boolean",
                            "description": "True when this build can connect the provider. False for a provider listed for later."
                          },
                          "events": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Event types that the provider can deliver: `post.created`, `post.status_changed` and `comment.created`. Empty for a provider that only reads data (CRM lookups, Segment) or is not available.",
                            "example": [
                              "post.created",
                              "post.status_changed",
                              "comment.created"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "category",
                          "description",
                          "available",
                          "events"
                        ]
                      },
                      "description": "The known providers: those this build can connect first, then those not available yet"
                    }
                  },
                  "required": [
                    "providers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/{integrationId}": {
      "get": {
        "operationId": "getQuillsIntegration",
        "tags": [
          "Integrations"
        ],
        "summary": "Get an integration with its event mappings and channels",
        "description": "Returns one connection with its delivery health, the event types that it sends to the connection itself, and its channels (targets inside the provider account), ordered by channel, then event type. Credentials are never returned. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The connection without its credentials",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "lastOutboundAt": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "When the last delivery to the provider succeeded (ISO 8601, UTC). Null when none has succeeded yet.",
                              "example": "2026-11-30T14:05:00.000Z"
                            },
                            "lastError": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Fixed, human-readable text of the last failed delivery. Provider responses never appear here. Null after a successful delivery.",
                              "example": "The provider rejected the saved credentials."
                            },
                            "lastErrorAt": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "When the last delivery failed (ISO 8601, UTC). Null after a successful delivery.",
                              "example": "2026-11-30T14:05:00.000Z"
                            },
                            "errorCount": {
                              "type": "number",
                              "description": "Failed deliveries since the last successful one or the last reconnect.",
                              "example": 0
                            }
                          },
                          "required": [
                            "lastOutboundAt",
                            "lastError",
                            "lastErrorAt",
                            "errorCount"
                          ]
                        }
                      ],
                      "description": "The connection, without credentials, with its delivery health, event mappings and channels"
                    },
                    "eventMappings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "eventType": {
                            "type": "string",
                            "description": "Event type: `post.created`, `post.status_changed` or `comment.created`.",
                            "example": "post.created"
                          },
                          "enabled": {
                            "type": "boolean",
                            "description": "True when this event type is sent; false when it is off."
                          }
                        },
                        "required": [
                          "eventType",
                          "enabled"
                        ]
                      },
                      "description": "Event types sent to the connection itself (for example a webhook URL), each on or off. Channel mappings are in `channels`."
                    },
                    "channels": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsIntegrationChannel"
                      },
                      "description": "Targets inside the provider account, such as a Slack channel or a GitHub repository. Empty for a provider that sends to its connection."
                    }
                  },
                  "required": [
                    "integration",
                    "eventMappings",
                    "channels"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No integration with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsIntegration",
        "tags": [
          "Integrations"
        ],
        "summary": "Enable or pause an integration and set its event mappings",
        "description": "Pauses or resumes a connection and turns event types on or off for the connection itself (the default target). Send at least one field. A paused integration sends no deliveries and its provider webhooks are refused. An event type that the provider does not deliver is refused. Channel mappings are unchanged. Records an `integration.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "True sets the status to `active`, false to `paused`. Omitted: the status stays."
                  },
                  "eventMappings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "eventType": {
                          "type": "string",
                          "enum": [
                            "post.created",
                            "post.status_changed",
                            "comment.created"
                          ],
                          "description": "Event type to turn on or off.",
                          "example": "post.created"
                        },
                        "enabled": {
                          "type": "boolean",
                          "description": "True sends this event type; false stops it."
                        }
                      },
                      "required": [
                        "eventType",
                        "enabled"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "Event types to set for the connection itself. Listed types are created or updated; unlisted ones keep their state. When a type appears twice, the last entry wins. Omitted: no change."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated connection",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "description": "The connection after the update."
                        }
                      ]
                    }
                  },
                  "required": [
                    "integration"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No integration with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsIntegration",
        "tags": [
          "Integrations"
        ],
        "summary": "Disconnect an integration",
        "description": "Deletes the connection, its credentials, event mappings and external links. Queued deliveries are cancelled. The sync history rows stay as evidence, but no route lists them without the connection. Nothing is sent to the provider: remove any webhook there yourself. Records an `integration.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Integration deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "description": "Always true. A missing integration gives 404."
                    }
                  },
                  "required": [
                    "deleted"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No integration with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/{integrationId}/channels": {
      "post": {
        "operationId": "addQuillsNotificationChannel",
        "tags": [
          "Integrations"
        ],
        "summary": "Add a notification channel to an integration",
        "description": "Maps event types to one target in the provider account (a chat channel, repository or project; see `listQuillsIntegrationDestinations`). Adding an existing channel turns the listed events on, leaves its other events as they are, and replaces its board filter. Only for a provider that sends to channels. Records an `integration.channel_added` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^[^/\\\\?#%]+$",
                    "description": "A target in the provider account, such as a Shortcut group ID or `Project:Bug` for Azure DevOps",
                    "example": "C08ABCD1234"
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "post.created",
                        "post.status_changed",
                        "comment.created"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "Event types to turn on for this channel. Each must be one that the provider delivers.",
                    "example": [
                      "post.created",
                      "comment.created"
                    ]
                  },
                  "boardIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
                      "example": "board_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Board filter: only events about posts on these live boards are sent. Every ID must be a board of this workspace (404 otherwise). Omitted or empty: events from every board."
                  }
                },
                "required": [
                  "channel",
                  "events"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The channel",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channel": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationChannel"
                        },
                        {
                          "description": "The channel after the change."
                        }
                      ]
                    }
                  },
                  "required": [
                    "channel"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "An event the provider does not deliver, or a channel that is not a valid target for it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No integration with this ID, or a board in boardIds is not a live board of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "This integration sends to its connection and has no channels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/{integrationId}/channels/{channel}": {
      "patch": {
        "operationId": "updateQuillsNotificationChannel",
        "tags": [
          "Integrations"
        ],
        "summary": "Update a notification channel",
        "description": "Sets the listed events of an existing channel on or off; unlisted events keep their state. A `boardIds` value replaces the board filter of every event of the channel. Records an `integration.channel_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^[^/\\\\?#%]+$",
              "description": "A target in the provider account, such as a Shortcut group ID or `Project:Bug` for Azure DevOps",
              "example": "C08ABCD1234"
            },
            "required": true,
            "description": "A target in the provider account, such as a Shortcut group ID or `Project:Bug` for Azure DevOps",
            "name": "channel",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "eventType": {
                          "type": "string",
                          "enum": [
                            "post.created",
                            "post.status_changed",
                            "comment.created"
                          ],
                          "description": "Event type to set. Must be one that the provider delivers.",
                          "example": "post.status_changed"
                        },
                        "enabled": {
                          "type": "boolean",
                          "description": "True sends this event type; false stops it."
                        }
                      },
                      "required": [
                        "eventType",
                        "enabled"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "Event types to set. When a type appears twice, the last entry wins."
                  },
                  "boardIds": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `board` prefix. Requests also accept the bare UUID.",
                      "example": "board_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "Board filter: only events about posts on these live boards are sent. Every ID must be a board of this workspace (404 otherwise). Null or empty: events from every board. Omitted: the filter stays."
                  }
                },
                "required": [
                  "events"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The channel",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channel": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationChannel"
                        },
                        {
                          "description": "The channel after the change."
                        }
                      ]
                    }
                  },
                  "required": [
                    "channel"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No integration with this ID, no channel with this target on it, or a board in boardIds is not a live board of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "This integration sends to its connection and has no channels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsNotificationChannel",
        "tags": [
          "Integrations"
        ],
        "summary": "Remove a notification channel",
        "description": "Removes every event mapping of the channel, so nothing more is sent there. Nothing changes in the provider. Records an `integration.channel_removed` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^[^/\\\\?#%]+$",
              "description": "A target in the provider account, such as a Shortcut group ID or `Project:Bug` for Azure DevOps",
              "example": "C08ABCD1234"
            },
            "required": true,
            "description": "A target in the provider account, such as a Shortcut group ID or `Project:Bug` for Azure DevOps",
            "name": "channel",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Channel removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channel": {
                      "type": "object",
                      "properties": {
                        "channel": {
                          "type": "string",
                          "description": "Target of the removed channel.",
                          "example": "C08ABCD1234"
                        }
                      },
                      "required": [
                        "channel"
                      ],
                      "description": "The removed channel."
                    }
                  },
                  "required": [
                    "channel"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No integration with this ID, or no channel with this target on it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "This integration sends to its connection and has no channels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/{integrationId}/syncs": {
      "get": {
        "operationId": "listQuillsIntegrationSyncHistory",
        "tags": [
          "Integrations"
        ],
        "summary": "List the sync history of an integration",
        "description": "Lists the delivery operations of one integration, newest first (by creation time, then ID). A source on a board that the caller cannot see is listed without its post and actions. Pass `nextCursor` as `cursor` for the next page. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "attention",
                "progress",
                "successful"
              ],
              "default": "all",
              "description": "`all`: every operation. `attention`: `failed`, `auth_required` or `uncertain`. `progress`: `queued`, `running` or `retry_wait`. `successful`: `succeeded`."
            },
            "required": false,
            "description": "`all`: every operation. `attention`: `failed`, `auth_required` or `uncertain`. `progress`: `queued`, `running` or `retry_wait`. `successful`: `succeeded`.",
            "name": "filter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "`nextCursor` of the previous page. Omitted: the first page.",
              "example": "0193f6a2-7c4e-7b1a-9d3e-5f2a8c1b4e6d"
            },
            "required": false,
            "description": "`nextCursor` of the previous page. Omitted: the first page.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 25,
              "description": "Page size.",
              "example": 25
            },
            "required": false,
            "description": "Page size.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Sync operations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsIntegrationSync"
                      },
                      "description": "Operations, newest first."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page (the last item's ID). Null on the last page.",
                      "example": "0193f6a2-7c4e-7b1a-9d3e-5f2a8c1b4e6d"
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No integration with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integration-syncs/{syncId}": {
      "get": {
        "operationId": "inspectQuillsIntegrationSync",
        "tags": [
          "Integrations"
        ],
        "summary": "Inspect a sync operation and its attempts",
        "description": "Returns one delivery operation and its newest 50 attempts, newest first. An operation whose post is on a board that the caller cannot see answers 404. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Sync operation ID (a UUID).",
              "example": "0193f6a2-7c4e-7b1a-9d3e-5f2a8c1b4e6d"
            },
            "required": true,
            "description": "Sync operation ID (a UUID).",
            "name": "syncId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The operation and its newest 50 attempts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "item": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSync"
                        },
                        {
                          "description": "The operation."
                        }
                      ]
                    },
                    "attempts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "number": {
                            "type": "number",
                            "description": "Attempt number, starting at 1.",
                            "example": 1
                          },
                          "state": {
                            "type": "string",
                            "description": "Attempt state: `running` while it runs, then its outcome, such as `succeeded`, `retry_wait`, `failed` or `uncertain`.",
                            "example": "succeeded"
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Fixed, human-readable reason when the attempt did not succeed. Null otherwise.",
                            "example": null
                          },
                          "startedAt": {
                            "type": "string",
                            "description": "When the attempt started (ISO 8601, UTC).",
                            "example": "2026-11-30T14:05:01.000Z"
                          },
                          "finishedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "When the attempt finished (ISO 8601, UTC). Null while it runs.",
                            "example": "2026-11-30T14:05:03.000Z"
                          }
                        },
                        "required": [
                          "number",
                          "state",
                          "error",
                          "startedAt",
                          "finishedAt"
                        ]
                      },
                      "description": "The newest 50 attempts, newest first."
                    }
                  },
                  "required": [
                    "item",
                    "attempts"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No sync operation with this ID, or its post is on a board that the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integration-syncs/{syncId}/actions": {
      "post": {
        "operationId": "recoverQuillsIntegrationSync",
        "tags": [
          "Integrations"
        ],
        "summary": "Retry or cancel a sync operation",
        "description": "Retries or cancels one delivery operation. `retry` is available only for `failed` and `auth_required` (certainly not delivered) on the active connection the sync was made for; it sets the operation back to `queued`, and the worker enqueues it after this request commits. `cancel` sets a queued, waiting or failed operation to `cancelled`; an `uncertain` operation keeps its state and is only marked as checked. An `uncertain` operation is never retried. A repeated `idempotencyKey` from the same caller for the same operation and action returns the current state and changes nothing. Records an `integration_sync.recovered` event unless replayed. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Sync operation ID (a UUID).",
              "example": "0193f6a2-7c4e-7b1a-9d3e-5f2a8c1b4e6d"
            },
            "required": true,
            "description": "Sync operation ID (a UUID).",
            "name": "syncId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "retry",
                      "cancel"
                    ],
                    "description": "Recovery action. `retry`: queue the delivery again. `cancel`: stop a queued delivery, or record that a teammate checked a failed or uncertain one.",
                    "example": "retry"
                  },
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "description": "The operation's `version` as last read. A different current version gives 409.",
                    "example": 1
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Client-generated UUID for this action. Reusing it for another operation or action gives 409.",
                    "example": "4f6c1a2e-8b3d-4e7f-9a1c-2d5e6f708192"
                  }
                },
                "required": [
                  "action",
                  "version",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation after the action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "item": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSync"
                        },
                        {
                          "description": "The operation after the action."
                        }
                      ]
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "True when the idempotency key was already used: nothing changed and `item` is the current state."
                    }
                  },
                  "required": [
                    "item",
                    "replayed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No sync operation with this ID, or its post is on a board that the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The version is stale, the action is not available in the current state, the original connection is paused or replaced, or the idempotency key was used for another operation or action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/external-links": {
      "get": {
        "operationId": "listQuillsPostExternalLinks",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the external items linked to a post",
        "description": "Lists the issues, tickets and other provider items linked to a post, newest first, at most 100. Reads stored links only; the provider is not called. Requires the `read` permission and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (a TypeID; the bare UUID is also accepted).",
              "example": "post_01m8rxs5z8e8mtfnj9zmkr0n4g"
            },
            "required": true,
            "description": "Post ID (a TypeID; the bare UUID is also accepted).",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Linked external items, newest first (at most 100)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "External link ID.",
                            "example": "post_external_link_01m8rxs5z8e8mtfnkc1v5vyh33"
                          },
                          "integrationType": {
                            "type": "string",
                            "description": "Provider key of the linked item, such as `github` or `zendesk`.",
                            "example": "github"
                          },
                          "externalId": {
                            "type": "string",
                            "description": "The item's ID in the provider, such as `owner/repo#142` for a GitHub issue.",
                            "example": "acme/roadmap#142"
                          },
                          "externalDisplayId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Short label of the item, such as `#142` or `QUA-24`. Null: show `externalId`.",
                            "example": "#142"
                          },
                          "externalUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "HTTPS link to the item in the provider. Null when none was stored or it is not an HTTPS URL without credentials.",
                            "example": "https://github.com/acme/roadmap/issues/142"
                          },
                          "status": {
                            "type": "string",
                            "description": "Link state. `active` for a live link.",
                            "example": "active"
                          },
                          "remoteTitle": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Cached title of the item in the provider, for display. Null when unknown.",
                            "example": "Export boards to CSV"
                          },
                          "remoteState": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Cached state of the item in the provider, as its webhooks last reported it (for example `Closed` for GitHub or `closed` for GitLab). Null when no state was reported.",
                            "example": "Open"
                          },
                          "origin": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "How the link was made. `event`: a delivery created the item. `push`: a teammate's issue request created it. `reference`: a teammate linked an existing item. `sidebar`: an app in the provider linked it. Null for older links.",
                            "example": "event"
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "When the link was made (ISO 8601, UTC).",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "integrationType",
                          "externalId",
                          "externalDisplayId",
                          "externalUrl",
                          "status",
                          "remoteTitle",
                          "remoteState",
                          "origin",
                          "createdAt"
                        ]
                      },
                      "description": "The post's external links, newest first, at most 100"
                    }
                  },
                  "required": [
                    "links"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post with this ID, or the post is on a board that the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/integration-sync": {
      "post": {
        "operationId": "retryQuillsPostIntegrationSync",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Queue a post's integration deliveries again",
        "description": "Queues the post's create delivery for each mapped destination that has none, after this request commits. A destination that already has one keeps it; use sync recovery for it. Does not replay webhooks, mail or notifications. Records a `post.integration_sync_requested` event, which the worker turns into the deliveries. Requires the `manage_settings` permission and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID (a TypeID; the bare UUID is also accepted).",
              "example": "post_01m8rxs5z8e8mtfnj9zmkr0n4g"
            },
            "required": true,
            "description": "Post ID (a TypeID; the bare UUID is also accepted).",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Resync requested",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requested": {
                      "type": "boolean",
                      "description": "Always true: the request was recorded. The deliveries show up in the integration's sync history."
                    }
                  },
                  "required": [
                    "requested"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post with this ID, or the post is on a board that the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The post is not published (for example it awaits moderation)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/make/connection": {
      "put": {
        "operationId": "saveQuillsMakeWebhook",
        "tags": [
          "Integrations"
        ],
        "summary": "Connect Make with a scenario webhook URL",
        "description": "Accepts an HTTPS URL on a Make host (*.make.com, *.integromat.com). The URL is stored encrypted and never returned. Nothing is sent when it is saved. Creates the connection, or replaces the credentials of an existing one (a new installation; event mappings stay). Records an `integration.connected` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "Webhook URL that receives the deliveries. Stored encrypted and never returned."
                  }
                },
                "required": [
                  "webhookUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The connection without its URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "description": "The saved connection, without its credentials."
                        }
                      ]
                    }
                  },
                  "required": [
                    "integration"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store credentials encrypted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/n8n/connection": {
      "put": {
        "operationId": "saveQuillsN8nWebhook",
        "tags": [
          "Integrations"
        ],
        "summary": "Connect n8n with a workflow webhook URL",
        "description": "The URL must resolve to a public address and carry no credentials. It is stored encrypted and never returned. Nothing is sent when it is saved. Creates the connection, or replaces the credentials of an existing one (a new installation; event mappings stay). Records an `integration.connected` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "Webhook URL that receives the deliveries. Stored encrypted and never returned."
                  }
                },
                "required": [
                  "webhookUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The connection without its URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "description": "The saved connection, without its credentials."
                        }
                      ]
                    }
                  },
                  "required": [
                    "integration"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store credentials encrypted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/zapier/connection": {
      "put": {
        "operationId": "saveQuillsZapierWebhook",
        "tags": [
          "Integrations"
        ],
        "summary": "Connect Zapier with a webhook URL",
        "description": "Accepts an HTTPS URL on hooks.zapier.com. The URL is stored encrypted and never returned. Nothing is sent when it is saved. Creates the connection, or replaces the credentials of an existing one (a new installation; event mappings stay). Records an `integration.connected` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "webhookUrl": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "Webhook URL that receives the deliveries. Stored encrypted and never returned."
                  }
                },
                "required": [
                  "webhookUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The connection without its URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "description": "The saved connection, without its credentials."
                        }
                      ]
                    }
                  },
                  "required": [
                    "integration"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store credentials encrypted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/ntfy/connection": {
      "put": {
        "operationId": "saveQuillsNtfy",
        "tags": [
          "Integrations"
        ],
        "summary": "Connect an ntfy topic",
        "description": "The topic URL must resolve to a public address. The URL and the optional access token are stored encrypted and never returned. Nothing is sent when they are saved. Creates the connection, or replaces the credentials of an existing one (a new installation; event mappings stay). Records an `integration.connected` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "Topic URL, `https://{host}/{topic}`. The topic has letters, digits, `-` and `_`. Stored encrypted and never returned.",
                    "example": "https://ntfy.sh/acme-feedback"
                  },
                  "token": {
                    "type": "string",
                    "maxLength": 500,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "Access token for a protected topic. Omitted: the topic is public. Stored encrypted and never returned."
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The connection without its URL or token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "description": "The saved connection, without its credentials."
                        }
                      ]
                    }
                  },
                  "required": [
                    "integration"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store credentials encrypted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/freshdesk/connection": {
      "put": {
        "operationId": "saveQuillsFreshdeskKey",
        "tags": [
          "Integrations"
        ],
        "summary": "Connect Freshdesk with an API key",
        "description": "Checks the key with one request to the help desk's Freshdesk API. The key is stored encrypted and never returned. A rejected key returns 400; an unreachable provider returns 502. Creates the connection, or replaces the credentials of an existing one (a new installation; event mappings stay). Records an `integration.connected` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "maxLength": 200,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "Freshdesk API key. Stored encrypted and never returned."
                  },
                  "subdomain": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 63,
                    "pattern": "^[a-z0-9-]+$",
                    "description": "Help desk subdomain, as in {subdomain}.freshdesk.com. The connection's `account` becomes that host.",
                    "example": "acme"
                  }
                },
                "required": [
                  "apiKey",
                  "subdomain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The connection without its key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "description": "The saved connection, without its credentials."
                        }
                      ]
                    }
                  },
                  "required": [
                    "integration"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store credentials encrypted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/azure-devops/connection": {
      "put": {
        "operationId": "saveQuillsAzureDevopsKey",
        "tags": [
          "Integrations"
        ],
        "summary": "Connect Azure DevOps with a personal access token",
        "description": "Checks the token with one request that lists the organization's projects on dev.azure.com. The token is stored encrypted and never returned. A rejected token or organization returns 400; an unreachable provider returns 502. Creates the connection, or replaces the credentials of an existing one (a new installation; event mappings stay). Records an `integration.connected` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "Azure DevOps personal access token. Stored encrypted and never returned."
                  },
                  "organization": {
                    "type": "string",
                    "maxLength": 50,
                    "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,48}[A-Za-z0-9])?$",
                    "description": "Organization name, as in dev.azure.com/{organization}.",
                    "example": "acme"
                  }
                },
                "required": [
                  "token",
                  "organization"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The connection without its token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "description": "The saved connection, without its credentials."
                        }
                      ]
                    }
                  },
                  "required": [
                    "integration"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Azure DevOps rejected the token or the organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store credentials encrypted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The provider could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/shortcut/connection": {
      "put": {
        "operationId": "saveQuillsShortcutToken",
        "tags": [
          "Integrations"
        ],
        "summary": "Connect Shortcut with an API token",
        "description": "Checks the token with one request to the Shortcut API. The token is stored encrypted and never returned. A rejected token returns 400; an unreachable provider returns 502. Creates the connection, or replaces the credentials of an existing one (a new installation; event mappings stay). Records an `integration.connected` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "apiToken": {
                    "type": "string",
                    "maxLength": 200,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "Shortcut API token. Stored encrypted and never returned."
                  }
                },
                "required": [
                  "apiToken"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The connection without its token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "description": "The saved connection, without its credentials."
                        }
                      ]
                    }
                  },
                  "required": [
                    "integration"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store credentials encrypted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/stripe/connection": {
      "put": {
        "operationId": "saveQuillsStripeKey",
        "tags": [
          "Integrations"
        ],
        "summary": "Connect Stripe with an API key",
        "description": "Use a restricted key (rk_) or a secret key (sk_). Checks it with one request to the Stripe API. The key is stored encrypted and never returned. A rejected key returns 400; an unreachable provider returns 502. Creates the connection, or replaces the credentials of an existing one (a new installation; event mappings stay). Records an `integration.connected` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "apiKey": {
                    "type": "string",
                    "maxLength": 255,
                    "pattern": "^(rk|sk)_[A-Za-z0-9_]+$",
                    "description": "Stripe restricted key (`rk_…`) or secret key (`sk_…`). Stored encrypted and never returned."
                  }
                },
                "required": [
                  "apiKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The connection without its key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "description": "The saved connection, without its credentials."
                        }
                      ]
                    }
                  },
                  "required": [
                    "integration"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store credentials encrypted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integration-platform-credentials": {
      "put": {
        "operationId": "saveQuillsPlatformCredentials",
        "tags": [
          "Integrations"
        ],
        "summary": "Save the OAuth app credentials for a provider",
        "description": "Creates or replaces the workspace's OAuth app for a provider, which its connect and token refresh use. A provider whose bot posts messages (Discord) also needs the bot token (400 without it). Slack takes the app's signing secret for the assistant's event hook: a save without `signingSecret` keeps the stored one, and an empty value or null removes it. Secrets are stored encrypted and never returned. Register the returned redirect URI in the provider app. Existing connections are not changed. Records an `integration.platform_credentials_saved` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "github",
                      "gitlab",
                      "slack",
                      "discord",
                      "jira",
                      "linear",
                      "asana",
                      "clickup",
                      "monday",
                      "notion",
                      "teams",
                      "hubspot",
                      "intercom",
                      "zendesk",
                      "salesforce",
                      "trello"
                    ],
                    "description": "Provider key of an OAuth provider.",
                    "example": "github"
                  },
                  "client": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500,
                        "pattern": "^[\\x21-\\x7e]+$",
                        "description": "Client ID of the provider's OAuth app.",
                        "example": "Iv23liAbCdEf123456"
                      },
                      "secret": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500,
                        "pattern": "^[\\x21-\\x7e]+$",
                        "description": "Client secret of the provider's OAuth app. Stored encrypted and never returned."
                      }
                    },
                    "required": [
                      "id",
                      "secret"
                    ],
                    "description": "The provider's OAuth app."
                  },
                  "botToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "Bot token of the provider app, for a provider whose bot posts messages (Discord; required there). Stored encrypted and never returned."
                  },
                  "signingSecret": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500,
                        "pattern": "^[\\x21-\\x7e]+$"
                      },
                      {
                        "type": "string",
                        "enum": [
                          ""
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Slack only: the app's signing secret, which checks the assistant's event hook. Omitted: the stored secret stays. Empty or null: it is removed. Stored encrypted and never returned."
                  }
                },
                "required": [
                  "type",
                  "client"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The masked credentials",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "configured": {
                      "type": "boolean",
                      "description": "True when the workspace has saved readable OAuth app credentials for the provider."
                    },
                    "clientId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Public client ID of the saved OAuth app. Null when none is saved. The client secret, bot token and signing secret are never returned.",
                      "example": "Iv23liAbCdEf123456"
                    },
                    "redirectUri": {
                      "type": "string",
                      "description": "Redirect URI to register in the provider's OAuth app: this instance's signed callback, or its bridge page for a provider that returns the token in the URL fragment (Trello).",
                      "example": "https://api.example.com/api/quills-public/signed/oauth/github/callback"
                    }
                  },
                  "required": [
                    "configured",
                    "clientId",
                    "redirectUri"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store credentials encrypted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "getQuillsPlatformCredentials",
        "tags": [
          "Integrations"
        ],
        "summary": "Get the masked OAuth app credentials for a provider",
        "description": "Returns whether the workspace saved an OAuth app for the provider, its public client ID and the redirect URI to register in the provider app. Secrets are never returned. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitlab",
                "slack",
                "discord",
                "jira",
                "linear",
                "asana",
                "clickup",
                "monday",
                "notion",
                "teams",
                "hubspot",
                "intercom",
                "zendesk",
                "salesforce",
                "trello"
              ],
              "description": "Provider key of an OAuth provider.",
              "example": "github"
            },
            "required": true,
            "description": "Provider key of an OAuth provider.",
            "name": "type",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether credentials are saved, the public client ID and the redirect URI",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "configured": {
                      "type": "boolean",
                      "description": "True when the workspace has saved readable OAuth app credentials for the provider."
                    },
                    "clientId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Public client ID of the saved OAuth app. Null when none is saved. The client secret, bot token and signing secret are never returned.",
                      "example": "Iv23liAbCdEf123456"
                    },
                    "redirectUri": {
                      "type": "string",
                      "description": "Redirect URI to register in the provider's OAuth app: this instance's signed callback, or its bridge page for a provider that returns the token in the URL fragment (Trello).",
                      "example": "https://api.example.com/api/quills-public/signed/oauth/github/callback"
                    }
                  },
                  "required": [
                    "configured",
                    "clientId",
                    "redirectUri"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsPlatformCredentials",
        "tags": [
          "Integrations"
        ],
        "summary": "Delete the OAuth app credentials for a provider",
        "description": "Deletes the workspace's OAuth app for the provider. The connection stays. Without credentials it cannot reconnect, and Discord cannot post. Records an `integration.platform_credentials_deleted` event when something was deleted. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "gitlab",
                "slack",
                "discord",
                "jira",
                "linear",
                "asana",
                "clickup",
                "monday",
                "notion",
                "teams",
                "hubspot",
                "intercom",
                "zendesk",
                "salesforce",
                "trello"
              ],
              "description": "Provider key of an OAuth provider.",
              "example": "github"
            },
            "required": true,
            "description": "Provider key of an OAuth provider.",
            "name": "type",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether credentials were deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "True when credentials were deleted; false when none were saved."
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/github/connect": {
      "get": {
        "operationId": "startQuillsGithubOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the GitHub OAuth connection",
        "description": "Returns the GitHub authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. GitHub then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/gitlab/connect": {
      "get": {
        "operationId": "startQuillsGitlabOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the GitLab OAuth connection",
        "description": "Returns the GitLab authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. GitLab then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/slack/connect": {
      "get": {
        "operationId": "startQuillsSlackOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Slack OAuth connection",
        "description": "Returns the Slack authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Slack then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/discord/connect": {
      "get": {
        "operationId": "startQuillsDiscordOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Discord OAuth connection",
        "description": "Returns the Discord authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Discord then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/jira/connect": {
      "get": {
        "operationId": "startQuillsJiraOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Jira OAuth connection",
        "description": "Returns the Jira authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Jira then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/linear/connect": {
      "get": {
        "operationId": "startQuillsLinearOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Linear OAuth connection",
        "description": "Returns the Linear authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Linear then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/asana/connect": {
      "get": {
        "operationId": "startQuillsAsanaOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Asana OAuth connection",
        "description": "Returns the Asana authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Asana then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/clickup/connect": {
      "get": {
        "operationId": "startQuillsClickupOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the ClickUp OAuth connection",
        "description": "Returns the ClickUp authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. ClickUp then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/monday/connect": {
      "get": {
        "operationId": "startQuillsMondayOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Monday.com OAuth connection",
        "description": "Returns the Monday.com authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Monday.com then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/notion/connect": {
      "get": {
        "operationId": "startQuillsNotionOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Notion OAuth connection",
        "description": "Returns the Notion authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Notion then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/teams/connect": {
      "get": {
        "operationId": "startQuillsTeamsOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Microsoft Teams OAuth connection",
        "description": "Returns the Microsoft Teams authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Microsoft Teams then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/hubspot/connect": {
      "get": {
        "operationId": "startQuillsHubspotOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the HubSpot OAuth connection",
        "description": "Returns the HubSpot authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. HubSpot then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/intercom/connect": {
      "get": {
        "operationId": "startQuillsIntercomOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Intercom OAuth connection",
        "description": "Returns the Intercom authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Intercom then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/zendesk/connect": {
      "get": {
        "operationId": "startQuillsZendeskOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Zendesk OAuth connection",
        "description": "Returns the Zendesk authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. The connect fields, sent as query values, are signed into the state and checked again by the callback. Zendesk then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 253,
              "pattern": "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)$",
              "description": "Connect field `subdomain` that the provider needs before the redirect (for Zendesk, the help desk subdomain, as in `acme` for acme.zendesk.com). The signed state carries it, and the callback checks it again."
            },
            "required": true,
            "description": "Connect field `subdomain` that the provider needs before the redirect (for Zendesk, the help desk subdomain, as in `acme` for acme.zendesk.com). The signed state carries it, and the callback checks it again.",
            "name": "subdomain",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A connect field is missing or not valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/salesforce/connect": {
      "get": {
        "operationId": "startQuillsSalesforceOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Salesforce OAuth connection",
        "description": "Returns the Salesforce authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Salesforce then sends the browser back to the signed callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/oauth/trello/connect": {
      "get": {
        "operationId": "startQuillsTrelloOAuthConnect",
        "tags": [
          "Integrations"
        ],
        "summary": "Start the Trello OAuth connection",
        "description": "Returns the Trello authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller and this workspace, and works once. Trello then sends the browser back to the bridge page, which posts the token to the callback, which connects as the caller. Reconnecting replaces the stored tokens and keeps the mappings. Nothing is stored or recorded by this request. Requires the `manage_settings` permission and saved OAuth app credentials for the provider.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The provider authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizeUrl": {
                      "type": "string",
                      "description": "Provider authorization URL with a signed state. Open it in the caller's browser."
                    }
                  },
                  "required": [
                    "authorizeUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No OAuth app credentials are saved for this provider, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/{integrationId}/destinations": {
      "get": {
        "operationId": "listQuillsIntegrationDestinations",
        "tags": [
          "Integrations"
        ],
        "summary": "List the channels an OAuth connection can send to",
        "description": "Lists the provider's destinations (for example repositories, projects or channels) that the connection can reach, at most 200, in the provider's order. A provider with more than one kind takes `kind`; a child kind also takes `parent`, which must be a destination of the parent kind. Calls the provider with no database transaction open; a refreshed access token is stored. Only for an active OAuth or Azure DevOps connection. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 40,
              "pattern": "^[a-z][a-z0-9_-]*$",
              "description": "Destination kind, for a provider with more than one: `space` or `list` (ClickUp), `project` or `work-item-type` (Azure DevOps), `project` or `issue-type` (Jira), `team` or `channel` (Microsoft Teams), `board` or `list` (Trello). Omitted: the provider's default kind.",
              "example": "list"
            },
            "required": false,
            "description": "Destination kind, for a provider with more than one: `space` or `list` (ClickUp), `project` or `work-item-type` (Azure DevOps), `project` or `issue-type` (Jira), `team` or `channel` (Microsoft Teams), `board` or `list` (Trello). Omitted: the provider's default kind.",
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[^/\\\\?#%]+$",
              "description": "ID of the parent destination (an Azure DevOps project name), for a child kind only: for example the Trello board whose lists to return. Required for a child kind and refused otherwise.",
              "example": "5f2a8c1b4e6d7a9b0c1d2e3f"
            },
            "required": false,
            "description": "ID of the parent destination (an Azure DevOps project name), for a child kind only: for example the Trello board whose lists to return. Required for a child kind and refused otherwise.",
            "name": "parent",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Destinations, in the provider's order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "destinations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Destination ID in the provider. Use it as a channel target or as `parent`.",
                            "example": "C08ABCD1234"
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name of the destination.",
                            "example": "#product-feedback"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "description": "Destinations, at most 200."
                    }
                  },
                  "required": [
                    "destinations"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The provider has no destinations of this kind, or `parent` is missing for a child kind or sent for another kind",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No active OAuth or Azure DevOps integration with this ID, or `parent` is not one of the connection's destinations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The saved credentials cannot be read or were refused; reconnect the integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The provider could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/{integrationId}/external-items": {
      "get": {
        "operationId": "searchQuillsExternalItems",
        "tags": [
          "Integrations"
        ],
        "summary": "Search issues in a repository or project of an OAuth connection",
        "description": "Searches issues to link to a post: at most 20 results, only in a repository or project that is one of the integration's channels. Search qualifiers are ignored. Calls the provider with no database transaction open; a refreshed access token is stored. Only for a provider with item search (GitHub, GitLab); 409 otherwise. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.:-]{1,100}$",
              "description": "Channel of this integration to search in: a GitHub repository as `owner:repo`, or a GitLab project ID.",
              "example": "acme:roadmap"
            },
            "required": true,
            "description": "Channel of this integration to search in: a GitHub repository as `owner:repo`, or a GitLab project ID.",
            "name": "target",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Search words. Words with a colon (provider qualifiers such as `is:open`) are dropped.",
              "example": "csv export"
            },
            "required": true,
            "description": "Search words. Words with a colon (provider qualifiers such as `is:open`) are dropped.",
            "name": "query",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching issues",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "externalId": {
                            "type": "string",
                            "description": "Issue ID in the provider: `owner/repo#number` for GitHub, `projectId#iid` for GitLab.",
                            "example": "acme/roadmap#142"
                          },
                          "title": {
                            "type": "string",
                            "description": "Issue title.",
                            "example": "Export boards to CSV"
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Link to the issue in the provider. Null when unknown.",
                            "example": "https://github.com/acme/roadmap/issues/142"
                          },
                          "state": {
                            "type": "string",
                            "description": "Issue state as the provider integration reports it: `Open` or `Closed` for GitHub, `opened` or `closed` for GitLab.",
                            "example": "Open"
                          }
                        },
                        "required": [
                          "externalId",
                          "title",
                          "url",
                          "state"
                        ]
                      },
                      "description": "Matching issues, at most 20."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the update permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No active OAuth or Azure DevOps integration with this ID, or `target` is not one of its channels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The saved credentials cannot be read or were refused (reconnect), or the provider has no item search",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The provider could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/{integrationId}/status-sync": {
      "get": {
        "operationId": "getQuillsStatusSync",
        "tags": [
          "Integrations"
        ],
        "summary": "Get an integration's status sync, external statuses and mappings",
        "description": "Returns whether status sync is on, the issue statuses that the provider reports, and the saved mappings from those statuses to post statuses. Only for GitHub and GitLab connections. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Status sync settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusSync": {
                      "$ref": "#/components/schemas/QuillsStatusSync"
                    },
                    "externalStatuses": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Issue statuses that the provider's webhooks report, to use as mapping keys.",
                      "example": [
                        "Open",
                        "Closed"
                      ]
                    },
                    "mappings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "externalStatus": {
                            "type": "string",
                            "description": "Issue status as the provider reports it: `Open` or `Closed` for GitHub, `opened` or `closed` for GitLab.",
                            "example": "Closed"
                          },
                          "statusId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Post status that linked posts move to when an issue reaches this status. Null: the status is ignored.",
                            "example": "post_status_01m8rxs5z8e8mtfnjpm7daknbw"
                          }
                        },
                        "required": [
                          "externalStatus",
                          "statusId"
                        ]
                      },
                      "description": "Saved status mappings. External statuses without one are ignored."
                    }
                  },
                  "required": [
                    "statusSync",
                    "externalStatuses",
                    "mappings"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No active integration with this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The provider has no status sync (only GitHub and GitLab do), or the integration must be reconnected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The provider could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "enableQuillsStatusSync",
        "tags": [
          "Integrations"
        ],
        "summary": "Enable status sync for a repository or project",
        "description": "Registers an issues webhook in the provider for `target`, with a new secret that is never returned, and turns status sync on: a closed or reopened issue then moves each linked post to the mapped status. A provider that does not answer leaves the state `uncertain`: check its webhook list before enabling again. A webhook that already exists in the provider gives 409. Turns the GitHub inbox off; turn it on again afterwards. Calls the provider with no database transaction open. Records an `integration.status_sync_enabled` event when something changed. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9_.:-]{1,100}$",
                    "description": "Repository or project to sync, from the destinations list: a GitHub repository as `owner:repo`, or a GitLab project ID.",
                    "example": "acme:roadmap"
                  }
                },
                "required": [
                  "target"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The status sync",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusSync": {
                      "$ref": "#/components/schemas/QuillsStatusSync"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when status sync was turned on. A failed registration answers with an error instead."
                    }
                  },
                  "required": [
                    "statusSync",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No active integration with this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The provider has no status sync, the integration must be reconnected or changed during the request, or the provider already has this webhook",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The provider could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "disableQuillsStatusSync",
        "tags": [
          "Integrations"
        ],
        "summary": "Disable status sync",
        "description": "Removes the webhook secret, so the inbound route rejects later deliveries. Nothing is sent to the provider: remove the webhook there too. The GitHub inbox uses this webhook, so it turns off too. Status mappings stay. Disabling when status sync is already off changes nothing. Records an `integration.status_sync_disabled` event when something changed. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The status sync",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusSync": {
                      "$ref": "#/components/schemas/QuillsStatusSync"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when status sync was turned off; false when it was already off."
                    }
                  },
                  "required": [
                    "statusSync",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No active integration with this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The provider has no status sync (only GitHub and GitLab do), or the integration must be reconnected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The provider could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/{integrationId}/status-mappings": {
      "put": {
        "operationId": "updateQuillsStatusMappings",
        "tags": [
          "Integrations"
        ],
        "summary": "Map external statuses to post statuses",
        "description": "Replaces every status mapping of the connection. Keys are the provider's statuses (see getQuillsStatusSync); an unknown key gives 400. Null ignores that status. Each status ID must be a post status of this workspace (404 otherwise). Takes effect for later issue events; existing posts do not change. Records an `integration.status_mappings_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mappings": {
                    "type": "object",
                    "additionalProperties": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "TypeID with the `post_status` prefix. Requests also accept the bare UUID.",
                      "example": "post_status_01h455vb4pex5vsknk084sn02q"
                    },
                    "description": "Post status ID for each external issue status, at most 20. Null ignores that status. Statuses left out are ignored too.",
                    "example": {
                      "Closed": "post_status_01m8rxs5z8e8mtfnjpm7daknbw",
                      "Open": null
                    }
                  }
                },
                "required": [
                  "mappings"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved mappings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mappings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "externalStatus": {
                            "type": "string",
                            "description": "Issue status as the provider reports it: `Open` or `Closed` for GitHub, `opened` or `closed` for GitLab.",
                            "example": "Closed"
                          },
                          "statusId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Post status that linked posts move to when an issue reaches this status. Null: the status is ignored.",
                            "example": "post_status_01m8rxs5z8e8mtfnjpm7daknbw"
                          }
                        },
                        "required": [
                          "externalStatus",
                          "statusId"
                        ]
                      },
                      "description": "Saved status mappings. External statuses without one are ignored."
                    }
                  },
                  "required": [
                    "mappings"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No active integration with this ID, or a status ID is not a post status of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The provider has no status sync (only GitHub and GitLab do), or the integration must be reconnected",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The provider could not be reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/{integrationId}/contacts": {
      "get": {
        "operationId": "searchQuillsIntegrationContact",
        "tags": [
          "Integrations"
        ],
        "summary": "Look up a contact by email in a CRM connection",
        "description": "Sends the email to the connected provider and returns its first matching record, with selected fields only. Calls the provider with no database transaction open, and gives up after 8 seconds (502). A refreshed access token is stored even when the lookup fails. Only for an active OAuth connection with contact lookup (HubSpot, Intercom, Zendesk, Salesforce): another OAuth connection gives 409, and a connection that is not OAuth gives 404. The customer context also reads Freshdesk and Stripe. Requires the `update` permission, because the email leaves the workspace. Nothing is recorded.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
              "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
            },
            "required": true,
            "description": "Integration ID (a TypeID; the bare UUID is also accepted).",
            "name": "integrationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 254,
              "format": "email",
              "description": "Email address to look up in the provider.",
              "example": "jane@example.com"
            },
            "required": true,
            "description": "Email address to look up in the provider.",
            "name": "email",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The matching contact, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contact": {
                      "$ref": "#/components/schemas/QuillsCrmContact"
                    }
                  },
                  "required": [
                    "contact"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the update permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No active integration with this ID, or it is not an OAuth connection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The saved credentials cannot be read or were refused (reconnect), or the provider has no contact lookup",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The provider could not be reached or did not answer in time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/people/{principalId}/context": {
      "get": {
        "operationId": "getQuillsCustomerContext",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Look up a customer in the connected CRM and support tools",
        "description": "Sends the customer's email to each active connection with a contact lookup (HubSpot, Intercom, Zendesk, Salesforce, Freshdesk, Stripe) and returns one entry for each, ordered by provider key, with selected fields only. The providers are called at once, with no database transaction open; each one stops after 8 seconds, and the whole read after 10. A provider that fails, or does not answer in time, gives `failed` and a fixed error text; the others still answer. A customer without a usable email address gives no entries. Refreshed access tokens are stored. Requires the `update` permission, because the email leaves the workspace. Nothing is recorded.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of a customer of this workspace (a TypeID; the bare UUID is also accepted). A teammate's principal gives 404.",
              "example": "principal_01m8rxs5z8e8mtfnk5r7ask0k8"
            },
            "required": true,
            "description": "Principal ID of a customer of this workspace (a TypeID; the bare UUID is also accepted). A teammate's principal gives 404.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "One entry for each connected provider with a lookup",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "providers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "integrationId": {
                            "type": "string",
                            "description": "ID of the connection that was asked.",
                            "example": "integration_01m8rxs5z7e8mtfnhk1f9zhgnz"
                          },
                          "integrationType": {
                            "type": "string",
                            "description": "Provider key, such as `hubspot` or `stripe`.",
                            "example": "hubspot"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "found",
                              "not_found",
                              "failed"
                            ],
                            "description": "`found`: the provider has a matching record, in `contact`. `not_found`: it has none. `failed`: the lookup failed or timed out; see `error`.",
                            "example": "found"
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Fixed, human-readable reason when `status` is `failed`, such as `The provider rejected the saved credentials. Reconnect.` Provider text never appears here. Null otherwise.",
                            "example": null
                          },
                          "contact": {
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/QuillsCrmContact"
                              },
                              {
                                "description": "The matching record. Null unless `status` is `found`."
                              }
                            ]
                          }
                        },
                        "required": [
                          "integrationId",
                          "integrationType",
                          "status",
                          "error",
                          "contact"
                        ]
                      },
                      "description": "One entry for each active connection with a contact lookup, ordered by provider key. Empty when none is connected or the customer has no usable email address."
                    }
                  },
                  "required": [
                    "providers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the update permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No customer with this principal ID in the workspace; a teammate or a removed person also gives 404",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/domains": {
      "get": {
        "operationId": "listQuillsCustomDomains",
        "tags": [
          "Settings and domains"
        ],
        "summary": "List the portal and help center custom domains",
        "description": "Lists the workspace's custom domains, at most one per kind, ordered by kind. A domain serves only when `active` is true. `entitled` is false when the workspace's cloud plan is not active; it is always true when billing is off. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The custom domains",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "entitled": {
                      "type": "boolean",
                      "description": "Whether the workspace may set and verify custom domains. False when the workspace's cloud plan is not active; always true when billing is off.",
                      "example": true
                    },
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "portal",
                              "help_center",
                              "widget"
                            ],
                            "description": "Which surface the domain serves: `portal`, `help_center` or `widget`",
                            "example": "help_center"
                          },
                          "domain": {
                            "type": "string",
                            "description": "The host name, lower case, without a trailing dot",
                            "example": "help.example.com"
                          },
                          "active": {
                            "type": "boolean",
                            "description": "Whether the domain serves: true once a DNS check found the TXT record",
                            "example": false
                          },
                          "verifiedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "When a DNS check last found the TXT record (ISO 8601). Null until then, and again after a check finds the record missing.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "checkedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "When the last DNS check finished (ISO 8601). Null when the domain was never checked.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "checkResult": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "verified",
                              "missing",
                              "unanswered",
                              null
                            ],
                            "description": "The last DNS check's outcome. `verified`: the TXT record holds the expected value. `missing`: the name or the value is absent, which deactivates the domain. `unanswered`: the lookup timed out or failed, which leaves `active` unchanged. Null when the domain was never checked.",
                            "example": "verified"
                          },
                          "record": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "TXT"
                                ],
                                "description": "The DNS record type"
                              },
                              "name": {
                                "type": "string",
                                "description": "The record's host name: a fixed verification label followed by the domain"
                              },
                              "value": {
                                "type": "string",
                                "description": "The value the record must hold. Setting a new domain generates a new value.",
                                "example": "9f2c4e7a1b3d4c5e8f6a7b9c0d1e2f3a"
                              }
                            },
                            "required": [
                              "type",
                              "name",
                              "value"
                            ],
                            "description": "The DNS TXT record that proves control of the domain"
                          }
                        },
                        "required": [
                          "kind",
                          "domain",
                          "active",
                          "verifiedAt",
                          "checkedAt",
                          "checkResult",
                          "record"
                        ]
                      },
                      "description": "The custom domains, ordered by kind"
                    }
                  },
                  "required": [
                    "entitled",
                    "domains"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/domains/portal": {
      "put": {
        "operationId": "setQuillsPortalDomain",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Set the portal custom domain",
        "description": "Sets or replaces the portal custom domain. A new domain starts inactive with a new TXT value; add the returned record to DNS, then call the verify operation. Sending the current domain again changes nothing and records no event, so a retry is safe. Returns 402 when the workspace's cloud plan is not active. Requires the `manage_settings` permission. Records a `custom_domain.set` event when the domain changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253,
                    "description": "A public host name. It is stored in lower case (punycode) without a trailing dot. Ports, paths, IP addresses and reserved suffixes such as .test and .localhost are refused.",
                    "example": "help.example.com"
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The portal custom domain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the domain changed. False when the body named the current domain.",
                      "example": true
                    },
                    "domain": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "portal",
                            "help_center",
                            "widget"
                          ],
                          "description": "Which surface the domain serves: `portal`, `help_center` or `widget`",
                          "example": "help_center"
                        },
                        "domain": {
                          "type": "string",
                          "description": "The host name, lower case, without a trailing dot",
                          "example": "help.example.com"
                        },
                        "active": {
                          "type": "boolean",
                          "description": "Whether the domain serves: true once a DNS check found the TXT record",
                          "example": false
                        },
                        "verifiedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "When a DNS check last found the TXT record (ISO 8601). Null until then, and again after a check finds the record missing.",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "checkedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "When the last DNS check finished (ISO 8601). Null when the domain was never checked.",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "checkResult": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "verified",
                            "missing",
                            "unanswered",
                            null
                          ],
                          "description": "The last DNS check's outcome. `verified`: the TXT record holds the expected value. `missing`: the name or the value is absent, which deactivates the domain. `unanswered`: the lookup timed out or failed, which leaves `active` unchanged. Null when the domain was never checked.",
                          "example": "verified"
                        },
                        "record": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "TXT"
                              ],
                              "description": "The DNS record type"
                            },
                            "name": {
                              "type": "string",
                              "description": "The record's host name: a fixed verification label followed by the domain"
                            },
                            "value": {
                              "type": "string",
                              "description": "The value the record must hold. Setting a new domain generates a new value.",
                              "example": "9f2c4e7a1b3d4c5e8f6a7b9c0d1e2f3a"
                            }
                          },
                          "required": [
                            "type",
                            "name",
                            "value"
                          ],
                          "description": "The DNS TXT record that proves control of the domain"
                        }
                      },
                      "required": [
                        "kind",
                        "domain",
                        "active",
                        "verifiedAt",
                        "checkedAt",
                        "checkResult",
                        "record"
                      ],
                      "description": "The portal custom domain"
                    }
                  },
                  "required": [
                    "changed",
                    "domain"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another workspace, or another custom domain kind of this workspace, already uses the domain",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsPortalDomain",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Remove the portal custom domain",
        "description": "Removes the portal custom domain. Always allowed, so a workspace without an active plan can still release its domain. Removing when no domain is set answers removed false. Requires the `manage_settings` permission. Records a `custom_domain.removed` event when a domain was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a domain was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "removed": {
                      "type": "boolean",
                      "description": "Whether a domain was removed. False when none was set.",
                      "example": true
                    },
                    "domain": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The removed host name. Null when none was set.",
                      "example": "help.example.com"
                    }
                  },
                  "required": [
                    "removed",
                    "domain"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/domains/portal/verify": {
      "post": {
        "operationId": "verifyQuillsPortalDomain",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Check the portal custom domain's TXT record",
        "description": "Queues a DNS check of the stored portal domain's TXT record. A background job looks the record up and updates `active`, `checkedAt` and `checkResult`; list the domains to read the result. The response is the domain as stored before the check. Returns 402 when the workspace's cloud plan is not active. Requires the `manage_settings` permission. Records a `custom_domain.verification_requested` event, which starts the check.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The domain as stored before the check",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "portal",
                        "help_center",
                        "widget"
                      ],
                      "description": "Which surface the domain serves: `portal`, `help_center` or `widget`",
                      "example": "help_center"
                    },
                    "domain": {
                      "type": "string",
                      "description": "The host name, lower case, without a trailing dot",
                      "example": "help.example.com"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether the domain serves: true once a DNS check found the TXT record",
                      "example": false
                    },
                    "verifiedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When a DNS check last found the TXT record (ISO 8601). Null until then, and again after a check finds the record missing.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "checkedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the last DNS check finished (ISO 8601). Null when the domain was never checked.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "checkResult": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "verified",
                        "missing",
                        "unanswered",
                        null
                      ],
                      "description": "The last DNS check's outcome. `verified`: the TXT record holds the expected value. `missing`: the name or the value is absent, which deactivates the domain. `unanswered`: the lookup timed out or failed, which leaves `active` unchanged. Null when the domain was never checked.",
                      "example": "verified"
                    },
                    "record": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "TXT"
                          ],
                          "description": "The DNS record type"
                        },
                        "name": {
                          "type": "string",
                          "description": "The record's host name: a fixed verification label followed by the domain"
                        },
                        "value": {
                          "type": "string",
                          "description": "The value the record must hold. Setting a new domain generates a new value.",
                          "example": "9f2c4e7a1b3d4c5e8f6a7b9c0d1e2f3a"
                        }
                      },
                      "required": [
                        "type",
                        "name",
                        "value"
                      ],
                      "description": "The DNS TXT record that proves control of the domain"
                    }
                  },
                  "required": [
                    "kind",
                    "domain",
                    "active",
                    "verifiedAt",
                    "checkedAt",
                    "checkResult",
                    "record"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No portal custom domain is set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/domains/help-center": {
      "put": {
        "operationId": "setQuillsHelpCenterDomain",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Set the help center custom domain",
        "description": "Sets or replaces the help center custom domain. A new domain starts inactive with a new TXT value; add the returned record to DNS, then call the verify operation. Sending the current domain again changes nothing and records no event, so a retry is safe. Returns 402 when the workspace's cloud plan is not active. Requires the `manage_settings` permission. Records a `custom_domain.set` event when the domain changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253,
                    "description": "A public host name. It is stored in lower case (punycode) without a trailing dot. Ports, paths, IP addresses and reserved suffixes such as .test and .localhost are refused.",
                    "example": "help.example.com"
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The help center custom domain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the domain changed. False when the body named the current domain.",
                      "example": true
                    },
                    "domain": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "portal",
                            "help_center",
                            "widget"
                          ],
                          "description": "Which surface the domain serves: `portal`, `help_center` or `widget`",
                          "example": "help_center"
                        },
                        "domain": {
                          "type": "string",
                          "description": "The host name, lower case, without a trailing dot",
                          "example": "help.example.com"
                        },
                        "active": {
                          "type": "boolean",
                          "description": "Whether the domain serves: true once a DNS check found the TXT record",
                          "example": false
                        },
                        "verifiedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "When a DNS check last found the TXT record (ISO 8601). Null until then, and again after a check finds the record missing.",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "checkedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "When the last DNS check finished (ISO 8601). Null when the domain was never checked.",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "checkResult": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "verified",
                            "missing",
                            "unanswered",
                            null
                          ],
                          "description": "The last DNS check's outcome. `verified`: the TXT record holds the expected value. `missing`: the name or the value is absent, which deactivates the domain. `unanswered`: the lookup timed out or failed, which leaves `active` unchanged. Null when the domain was never checked.",
                          "example": "verified"
                        },
                        "record": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "TXT"
                              ],
                              "description": "The DNS record type"
                            },
                            "name": {
                              "type": "string",
                              "description": "The record's host name: a fixed verification label followed by the domain"
                            },
                            "value": {
                              "type": "string",
                              "description": "The value the record must hold. Setting a new domain generates a new value.",
                              "example": "9f2c4e7a1b3d4c5e8f6a7b9c0d1e2f3a"
                            }
                          },
                          "required": [
                            "type",
                            "name",
                            "value"
                          ],
                          "description": "The DNS TXT record that proves control of the domain"
                        }
                      },
                      "required": [
                        "kind",
                        "domain",
                        "active",
                        "verifiedAt",
                        "checkedAt",
                        "checkResult",
                        "record"
                      ],
                      "description": "The help center custom domain"
                    }
                  },
                  "required": [
                    "changed",
                    "domain"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another workspace, or another custom domain kind of this workspace, already uses the domain",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsHelpCenterDomain",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Remove the help center custom domain",
        "description": "Removes the help center custom domain. Always allowed, so a workspace without an active plan can still release its domain. Removing when no domain is set answers removed false. Requires the `manage_settings` permission. Records a `custom_domain.removed` event when a domain was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a domain was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "removed": {
                      "type": "boolean",
                      "description": "Whether a domain was removed. False when none was set.",
                      "example": true
                    },
                    "domain": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The removed host name. Null when none was set.",
                      "example": "help.example.com"
                    }
                  },
                  "required": [
                    "removed",
                    "domain"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/domains/help-center/verify": {
      "post": {
        "operationId": "verifyQuillsHelpCenterDomain",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Check the help center custom domain's TXT record",
        "description": "Queues a DNS check of the stored help center domain's TXT record. A background job looks the record up and updates `active`, `checkedAt` and `checkResult`; list the domains to read the result. The response is the domain as stored before the check. Returns 402 when the workspace's cloud plan is not active. Requires the `manage_settings` permission. Records a `custom_domain.verification_requested` event, which starts the check.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The domain as stored before the check",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "portal",
                        "help_center",
                        "widget"
                      ],
                      "description": "Which surface the domain serves: `portal`, `help_center` or `widget`",
                      "example": "help_center"
                    },
                    "domain": {
                      "type": "string",
                      "description": "The host name, lower case, without a trailing dot",
                      "example": "help.example.com"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether the domain serves: true once a DNS check found the TXT record",
                      "example": false
                    },
                    "verifiedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When a DNS check last found the TXT record (ISO 8601). Null until then, and again after a check finds the record missing.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "checkedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the last DNS check finished (ISO 8601). Null when the domain was never checked.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "checkResult": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "verified",
                        "missing",
                        "unanswered",
                        null
                      ],
                      "description": "The last DNS check's outcome. `verified`: the TXT record holds the expected value. `missing`: the name or the value is absent, which deactivates the domain. `unanswered`: the lookup timed out or failed, which leaves `active` unchanged. Null when the domain was never checked.",
                      "example": "verified"
                    },
                    "record": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "TXT"
                          ],
                          "description": "The DNS record type"
                        },
                        "name": {
                          "type": "string",
                          "description": "The record's host name: a fixed verification label followed by the domain"
                        },
                        "value": {
                          "type": "string",
                          "description": "The value the record must hold. Setting a new domain generates a new value.",
                          "example": "9f2c4e7a1b3d4c5e8f6a7b9c0d1e2f3a"
                        }
                      },
                      "required": [
                        "type",
                        "name",
                        "value"
                      ],
                      "description": "The DNS TXT record that proves control of the domain"
                    }
                  },
                  "required": [
                    "kind",
                    "domain",
                    "active",
                    "verifiedAt",
                    "checkedAt",
                    "checkResult",
                    "record"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No help center custom domain is set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/domains/widget": {
      "put": {
        "operationId": "setQuillsWidgetDomain",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Set the widget custom domain",
        "description": "Sets or replaces the widget custom domain. A new domain starts inactive with a new TXT value; add the returned record to DNS, then call the verify operation. Sending the current domain again changes nothing and records no event, so a retry is safe. Returns 402 when the workspace's cloud plan is not active. Requires the `manage_settings` permission. Records a `custom_domain.set` event when the domain changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 253,
                    "description": "A public host name. It is stored in lower case (punycode) without a trailing dot. Ports, paths, IP addresses and reserved suffixes such as .test and .localhost are refused.",
                    "example": "help.example.com"
                  }
                },
                "required": [
                  "domain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The widget custom domain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the domain changed. False when the body named the current domain.",
                      "example": true
                    },
                    "domain": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "portal",
                            "help_center",
                            "widget"
                          ],
                          "description": "Which surface the domain serves: `portal`, `help_center` or `widget`",
                          "example": "help_center"
                        },
                        "domain": {
                          "type": "string",
                          "description": "The host name, lower case, without a trailing dot",
                          "example": "help.example.com"
                        },
                        "active": {
                          "type": "boolean",
                          "description": "Whether the domain serves: true once a DNS check found the TXT record",
                          "example": false
                        },
                        "verifiedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "When a DNS check last found the TXT record (ISO 8601). Null until then, and again after a check finds the record missing.",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "checkedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "When the last DNS check finished (ISO 8601). Null when the domain was never checked.",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "checkResult": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "verified",
                            "missing",
                            "unanswered",
                            null
                          ],
                          "description": "The last DNS check's outcome. `verified`: the TXT record holds the expected value. `missing`: the name or the value is absent, which deactivates the domain. `unanswered`: the lookup timed out or failed, which leaves `active` unchanged. Null when the domain was never checked.",
                          "example": "verified"
                        },
                        "record": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "TXT"
                              ],
                              "description": "The DNS record type"
                            },
                            "name": {
                              "type": "string",
                              "description": "The record's host name: a fixed verification label followed by the domain"
                            },
                            "value": {
                              "type": "string",
                              "description": "The value the record must hold. Setting a new domain generates a new value.",
                              "example": "9f2c4e7a1b3d4c5e8f6a7b9c0d1e2f3a"
                            }
                          },
                          "required": [
                            "type",
                            "name",
                            "value"
                          ],
                          "description": "The DNS TXT record that proves control of the domain"
                        }
                      },
                      "required": [
                        "kind",
                        "domain",
                        "active",
                        "verifiedAt",
                        "checkedAt",
                        "checkResult",
                        "record"
                      ],
                      "description": "The widget custom domain"
                    }
                  },
                  "required": [
                    "changed",
                    "domain"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another workspace, or another custom domain kind of this workspace, already uses the domain",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsWidgetDomain",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Remove the widget custom domain",
        "description": "Removes the widget custom domain. Always allowed, so a workspace without an active plan can still release its domain. Removing when no domain is set answers removed false. Requires the `manage_settings` permission. Records a `custom_domain.removed` event when a domain was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a domain was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "removed": {
                      "type": "boolean",
                      "description": "Whether a domain was removed. False when none was set.",
                      "example": true
                    },
                    "domain": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The removed host name. Null when none was set.",
                      "example": "help.example.com"
                    }
                  },
                  "required": [
                    "removed",
                    "domain"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/domains/widget/verify": {
      "post": {
        "operationId": "verifyQuillsWidgetDomain",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Check the widget custom domain's TXT record",
        "description": "Queues a DNS check of the stored widget domain's TXT record. A background job looks the record up and updates `active`, `checkedAt` and `checkResult`; list the domains to read the result. The response is the domain as stored before the check. Returns 402 when the workspace's cloud plan is not active. Requires the `manage_settings` permission. Records a `custom_domain.verification_requested` event, which starts the check.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The domain as stored before the check",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "portal",
                        "help_center",
                        "widget"
                      ],
                      "description": "Which surface the domain serves: `portal`, `help_center` or `widget`",
                      "example": "help_center"
                    },
                    "domain": {
                      "type": "string",
                      "description": "The host name, lower case, without a trailing dot",
                      "example": "help.example.com"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether the domain serves: true once a DNS check found the TXT record",
                      "example": false
                    },
                    "verifiedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When a DNS check last found the TXT record (ISO 8601). Null until then, and again after a check finds the record missing.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "checkedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the last DNS check finished (ISO 8601). Null when the domain was never checked.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "checkResult": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "verified",
                        "missing",
                        "unanswered",
                        null
                      ],
                      "description": "The last DNS check's outcome. `verified`: the TXT record holds the expected value. `missing`: the name or the value is absent, which deactivates the domain. `unanswered`: the lookup timed out or failed, which leaves `active` unchanged. Null when the domain was never checked.",
                      "example": "verified"
                    },
                    "record": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "TXT"
                          ],
                          "description": "The DNS record type"
                        },
                        "name": {
                          "type": "string",
                          "description": "The record's host name: a fixed verification label followed by the domain"
                        },
                        "value": {
                          "type": "string",
                          "description": "The value the record must hold. Setting a new domain generates a new value.",
                          "example": "9f2c4e7a1b3d4c5e8f6a7b9c0d1e2f3a"
                        }
                      },
                      "required": [
                        "type",
                        "name",
                        "value"
                      ],
                      "description": "The DNS TXT record that proves control of the domain"
                    }
                  },
                  "required": [
                    "kind",
                    "domain",
                    "active",
                    "verifiedAt",
                    "checkedAt",
                    "checkResult",
                    "record"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No widget custom domain is set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/domains/sending": {
      "get": {
        "operationId": "listQuillsSendingDomains",
        "tags": [
          "Settings and domains"
        ],
        "summary": "List the email sending domains",
        "description": "Lists up to 100 email sending domains, ordered by domain, each with the local parts of the sending addresses (not deleted) that send from it. Read-only: DNS setup and checks are on the support channel routes. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The sending domains",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The sending domain ID",
                            "example": "sending_domain_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "domain": {
                            "type": "string",
                            "description": "The domain that mail is sent from",
                            "example": "example.com"
                          },
                          "status": {
                            "type": "string",
                            "description": "The DNS verification status: `pending`, `verified` or `failed`",
                            "example": "verified"
                          },
                          "verifiedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "When the domain was verified (ISO 8601). Null while it is not verified.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "autoCheckUntil": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "End of the 72-hour check window that the last check restart opened (ISO 8601). Null when the checks were never restarted.",
                            "example": "2026-12-03T14:05:00.000Z"
                          },
                          "localParts": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The local parts of the sending addresses on this domain (not deleted), lower case with a trailing \"@\", sorted. An address without a stored domain link counts for the domain after its \"@\".",
                            "example": [
                              "help@",
                              "support@"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "domain",
                          "status",
                          "verifiedAt",
                          "autoCheckUntil",
                          "localParts"
                        ]
                      },
                      "description": "The sending domains, ordered by domain"
                    }
                  },
                  "required": [
                    "domains"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/usage": {
      "get": {
        "operationId": "getQuillsUsage",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get the workspace's Albus usage totals",
        "description": "Returns usage totals: AI tokens of successful chat completions in the current UTC month, and live posts and boards on boards the caller can see. Test customers' posts are not counted. Seats and invitations are workspace membership and are not included. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Usage totals",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "aiTokensThisMonth": {
                      "type": "number",
                      "description": "Total tokens of successful AI chat completions since the start of the current month (UTC)",
                      "example": 184250
                    },
                    "postCount": {
                      "type": "number",
                      "description": "Posts that are not deleted, on live boards the caller can see, excluding test customers' posts",
                      "example": 412
                    },
                    "boardCount": {
                      "type": "number",
                      "description": "Live boards the caller can see",
                      "example": 6
                    }
                  },
                  "required": [
                    "aiTokensThisMonth",
                    "postCount",
                    "boardCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/powered-by": {
      "get": {
        "operationId": "getQuillsPoweredBy",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Get whether the \"Powered by\" badge shows",
        "description": "Returns whether the \"Powered by\" badge shows on the portal, the widget and branded email. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The badge setting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "showPoweredBy": {
                      "type": "boolean",
                      "description": "Whether the \"Powered by\" badge shows on the portal, the widget and branded email",
                      "example": true
                    }
                  },
                  "required": [
                    "showPoweredBy"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsPoweredBy",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Show or hide the \"Powered by\" badge",
        "description": "Shows or hides the \"Powered by\" badge on the portal, the widget and branded email. Hiding the badge returns 402 when the workspace's cloud plan is not active; showing it is always allowed. Requires the `manage_settings` permission. Records a `settings.powered_by_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "showPoweredBy": {
                    "type": "boolean",
                    "description": "Whether the \"Powered by\" badge shows on the portal, the widget and branded email",
                    "example": true
                  }
                },
                "required": [
                  "showPoweredBy"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The badge setting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "showPoweredBy": {
                      "type": "boolean",
                      "description": "Whether the \"Powered by\" badge shows on the portal, the widget and branded email",
                      "example": true
                    }
                  },
                  "required": [
                    "showPoweredBy"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/operations/wipe": {
      "post": {
        "operationId": "wipeQuillsWorkspaceData",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Wipe the workspace's Albus data",
        "description": "Requests a wipe of the workspace's feature data. `confirm` must equal the workspace slug, or the request returns 400. Requires the `manage_settings` permission. Records a `workspace.wipe_requested` event, which starts the wipe job. A background job then deletes all of the workspace's Albus data and cannot be undone: feedback, support, help center, status page and customer data, and also Albus configuration such as webhooks, integrations, Albus API keys and OAuth clients, Albus teams (with their workspace team bindings), sending domains, workflows, macros, SLA policies and ticket types. It keeps the workspace and its members, teammate actors, Albus settings, the default statuses and roles, custom domains and the audit history.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirm": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "The workspace slug, typed to confirm the wipe. Any other value answers 400 and wipes nothing.",
                    "example": "acme"
                  }
                },
                "required": [
                  "confirm"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The wipe is queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "queued": {
                      "type": "boolean",
                      "description": "Always true: the wipe was requested and a background job deletes the data after this request commits",
                      "example": true
                    }
                  },
                  "required": [
                    "queued"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/merge/preview": {
      "post": {
        "operationId": "previewQuillsTicketMerge",
        "tags": [
          "Tickets"
        ],
        "summary": "Preview merging one or more tickets into a target ticket",
        "description": "Reports what merging the source tickets into the target would do, and changes nothing: how many ticket messages and notes would move, and whether the merge crosses requesters or companies. Repeated source IDs count once. It doesn't check whether a ticket is already merged, and it compares only the tickets' own companies, while the merge also falls back to the requesters' companies. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sourceTicketIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `ticket` prefix. Requests also accept the bare UUID.",
                      "example": "ticket_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "IDs of the tickets to merge into the target, 1 to 20. Each accepts the TypeID or its UUID; a repeated ID counts once.",
                    "example": [
                      "ticket_01m8rzbm5mfqfrqfjz2v3vzkrh"
                    ]
                  },
                  "targetTicketId": {
                    "type": "string",
                    "description": "ID of the ticket to merge into. Accepts the TypeID or its UUID.",
                    "example": "ticket_01m8rzbm5kfqfrqfjkzrcv5gtz"
                  }
                },
                "required": [
                  "sourceTicketIds",
                  "targetTicketId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Impact preview of the ticket merge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "targetTicketId": {
                      "type": "string",
                      "description": "ID of the target ticket.",
                      "example": "ticket_01m8rzbm5kfqfrqfjkzrcv5gtz"
                    },
                    "sourceCount": {
                      "type": "number",
                      "description": "Number of distinct source tickets.",
                      "example": 1
                    },
                    "messagesToMove": {
                      "type": "number",
                      "description": "Number of ticket-scoped messages and notes that would move to the target.",
                      "example": 4
                    },
                    "crossRequester": {
                      "type": "boolean",
                      "description": "Whether any source ticket has a different requester than the target, both set.",
                      "example": false
                    },
                    "crossCompany": {
                      "type": "boolean",
                      "description": "Whether any source ticket's company differs from the target ticket's company, both set.",
                      "example": false
                    },
                    "requiresConfirmation": {
                      "type": "boolean",
                      "description": "Whether the merge needs `confirmCrossRequester` or `confirmCrossCompany`: true when `crossRequester` or `crossCompany` is.",
                      "example": false
                    }
                  },
                  "required": [
                    "targetTicketId",
                    "sourceCount",
                    "messagesToMove",
                    "crossRequester",
                    "crossCompany",
                    "requiresConfirmation"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A source ticket is the target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The target or a source ticket was not found or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/merge": {
      "post": {
        "operationId": "mergeQuillsTickets",
        "tags": [
          "Tickets"
        ],
        "summary": "Merge one or more tickets into a target ticket (reversible)",
        "description": "Merges each source ticket into the target, in request order and in one transaction: when one fails, nothing is merged. For each source, its ticket-scoped messages and notes move to the target; its watchers that the target lacks are added; when both are customer tickets linked to different conversations, the source's conversation is merged into the target's (without needing the confirmation flags) unless it's already merged; an internal note about the merge is added to the target; and the source is moved to the first closed status (when the workspace has one), resolved and marked as merged. A merge between different requesters, or different companies (the ticket's company, else its requester's), needs the matching confirmation flag. Each merge can be undone. Requires the `update` permission. Records one `ticket.merged` event for the request.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sourceTicketIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `ticket` prefix. Requests also accept the bare UUID.",
                      "example": "ticket_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "IDs of the tickets to merge into the target, 1 to 20. Each accepts the TypeID or its UUID; a repeated ID counts once.",
                    "example": [
                      "ticket_01m8rzbm5mfqfrqfjz2v3vzkrh"
                    ]
                  },
                  "targetTicketId": {
                    "type": "string",
                    "description": "ID of the ticket to merge into. Accepts the TypeID or its UUID. Its status doesn't change.",
                    "example": "ticket_01m8rzbm5kfqfrqfjkzrcv5gtz"
                  },
                  "confirmCrossRequester": {
                    "type": "boolean",
                    "default": false,
                    "description": "Set to `true` to allow a merge between different requesters. Defaults to `false`; such a merge then answers 409.",
                    "example": false
                  },
                  "confirmCrossCompany": {
                    "type": "boolean",
                    "default": false,
                    "description": "Set to `true` to allow a merge between different companies. Defaults to `false`; such a merge then answers 409.",
                    "example": false
                  },
                  "notifyRequester": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the merge notices in merged linked conversations are posted as customer-visible system messages instead of internal notes. The note on the target ticket is always internal. Defaults to `false`.",
                    "example": false
                  }
                },
                "required": [
                  "sourceTicketIds",
                  "targetTicketId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created reversible ticket merge records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "merges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Merge record ID, a UUID. Use it to undo the merge.",
                            "example": "3da2c4ff-fd19-41fe-887b-a4abfdcd52fe"
                          },
                          "entityKind": {
                            "type": "string",
                            "enum": [
                              "conversation",
                              "ticket"
                            ],
                            "description": "What was merged. `conversation`: a conversation into another; `ticket`: a ticket into another.",
                            "example": "conversation"
                          },
                          "sourceId": {
                            "type": "string",
                            "description": "ID of the conversation or ticket that was merged away (the source).",
                            "example": "conversation_01m8rzbm5kfqfrqfj1rjzd94ch"
                          },
                          "targetId": {
                            "type": "string",
                            "description": "ID of the conversation or ticket that the source was merged into (the target).",
                            "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                          },
                          "crossRequester": {
                            "type": "boolean",
                            "description": "Whether the source and target had different requesters.",
                            "example": false
                          },
                          "crossCompany": {
                            "type": "boolean",
                            "description": "Whether the source and target belonged to different companies, both known.",
                            "example": false
                          },
                          "notifyRequester": {
                            "type": "boolean",
                            "description": "Whether the merge notices in the conversations were posted as customer-visible system messages rather than internal notes. A ticket's own merge note is always internal.",
                            "example": false
                          },
                          "mergedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who merged. Null when that principal was deleted.",
                            "example": "principal_01m8rzbm5kfqfrqfhab8sk7x9b"
                          },
                          "undoneAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the merge was undone, in ISO 8601 UTC. Null while it's in place.",
                            "example": null
                          },
                          "undoneByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who undid the merge. Null while it's in place or when that principal was deleted.",
                            "example": null
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time of the merge, in ISO 8601 UTC.",
                            "example": "2026-12-16T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "entityKind",
                          "sourceId",
                          "targetId",
                          "crossRequester",
                          "crossCompany",
                          "notifyRequester",
                          "mergedByPrincipalId",
                          "undoneAt",
                          "undoneByPrincipalId",
                          "createdAt"
                        ],
                        "description": "A reversible merge of one conversation or ticket into another, with what's needed to undo it kept on the server."
                      },
                      "description": "One merge record per distinct source ticket, in request order. Linked conversation merges have their own records and aren't listed."
                    }
                  },
                  "required": [
                    "merges"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A source ticket is the target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The target or a source ticket was not found or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A merge crosses requesters or companies without the confirmation flag, the target or a source ticket is already merged, or the target's linked conversation is already merged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/merges/{mergeId}/undo": {
      "post": {
        "operationId": "undoQuillsTicketMerge",
        "tags": [
          "Tickets"
        ],
        "summary": "Undo a ticket merge and restore messages, linked conversation, and state",
        "description": "Undoes a ticket merge: the messages and notes it moved go back to the source, its merge note is deleted, the watchers it added to the target are removed, the linked conversation merge it made is undone when it's still in place, and the source's status and resolved time are restored. Messages added to the target after the merge stay there. When the target has since been merged into another ticket, undo that merge first. Requires the `update` permission. Records a `ticket.merge_undone` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Merge record ID, a UUID, as returned by the merge.",
              "example": "3da2c4ff-fd19-41fe-887b-a4abfdcd52fe"
            },
            "required": true,
            "description": "Merge record ID, a UUID, as returned by the merge.",
            "name": "mergeId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The undone ticket merge record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Merge record ID, a UUID. Use it to undo the merge.",
                      "example": "3da2c4ff-fd19-41fe-887b-a4abfdcd52fe"
                    },
                    "entityKind": {
                      "type": "string",
                      "enum": [
                        "conversation",
                        "ticket"
                      ],
                      "description": "What was merged. `conversation`: a conversation into another; `ticket`: a ticket into another.",
                      "example": "conversation"
                    },
                    "sourceId": {
                      "type": "string",
                      "description": "ID of the conversation or ticket that was merged away (the source).",
                      "example": "conversation_01m8rzbm5kfqfrqfj1rjzd94ch"
                    },
                    "targetId": {
                      "type": "string",
                      "description": "ID of the conversation or ticket that the source was merged into (the target).",
                      "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                    },
                    "crossRequester": {
                      "type": "boolean",
                      "description": "Whether the source and target had different requesters.",
                      "example": false
                    },
                    "crossCompany": {
                      "type": "boolean",
                      "description": "Whether the source and target belonged to different companies, both known.",
                      "example": false
                    },
                    "notifyRequester": {
                      "type": "boolean",
                      "description": "Whether the merge notices in the conversations were posted as customer-visible system messages rather than internal notes. A ticket's own merge note is always internal.",
                      "example": false
                    },
                    "mergedByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who merged. Null when that principal was deleted.",
                      "example": "principal_01m8rzbm5kfqfrqfhab8sk7x9b"
                    },
                    "undoneAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the merge was undone, in ISO 8601 UTC. Null while it's in place.",
                      "example": null
                    },
                    "undoneByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who undid the merge. Null while it's in place or when that principal was deleted.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the merge, in ISO 8601 UTC.",
                      "example": "2026-12-16T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "entityKind",
                    "sourceId",
                    "targetId",
                    "crossRequester",
                    "crossCompany",
                    "notifyRequester",
                    "mergedByPrincipalId",
                    "undoneAt",
                    "undoneByPrincipalId",
                    "createdAt"
                  ],
                  "description": "A reversible merge of one conversation or ticket into another, with what's needed to undo it kept on the server."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No ticket merge record with that ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The merge was already undone, the target ticket has since been merged into another (undo that merge first), the source is now merged into a different ticket, or the linked conversation merge can't be undone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets": {
      "get": {
        "operationId": "listQuillsTickets",
        "tags": [
          "Tickets"
        ],
        "summary": "List support tickets",
        "description": "Lists non-deleted tickets that match every filter you send, one page at a time. `search` matches the title (case-insensitive substring) or the ticket number (`42` or `#42`). Paging is keyset-based: pass the previous page's `nextCursor` as `cursor`, keeping the same filters and sort. Callers without the `update` permission who belong to one or more teams only see tickets assigned to those teams; any other ticket is not found. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "customer",
                "back_office",
                "tracker"
              ],
              "description": "Only tickets of this category: `customer`, `back_office` or `tracker`.",
              "example": "customer"
            },
            "required": false,
            "description": "Only tickets of this category: `customer`, `back_office` or `tracker`.",
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tickets of this ticket type. Accepts the TypeID or its UUID.",
              "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
            },
            "required": false,
            "description": "Only tickets of this ticket type. Accepts the TypeID or its UUID.",
            "name": "ticketTypeId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tickets in this status. Accepts the TypeID or its UUID.",
              "example": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3"
            },
            "required": false,
            "description": "Only tickets in this status. Accepts the TypeID or its UUID.",
            "name": "statusId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "pending",
                "closed"
              ],
              "description": "Only tickets whose status is in this category: `open`, `pending` or `closed`.",
              "example": "open"
            },
            "required": false,
            "description": "Only tickets whose status is in this category: `open`, `pending` or `closed`.",
            "name": "statusCategory",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "received",
                "in_progress",
                "awaiting_requester",
                "resolved"
              ],
              "description": "Only tickets whose status projects to this requester-facing stage.",
              "example": "awaiting_requester"
            },
            "required": false,
            "description": "Only tickets whose status projects to this requester-facing stage.",
            "name": "stage",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "low",
                "medium",
                "high",
                "urgent"
              ],
              "description": "Only tickets with this priority. Priority: `none` (unset), `low`, `medium`, `high` or `urgent`.",
              "example": "urgent"
            },
            "required": false,
            "description": "Only tickets with this priority. Priority: `none` (unset), `low`, `medium`, `high` or `urgent`.",
            "name": "priority",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "me"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "unassigned"
                  ]
                },
                {
                  "type": "string",
                  "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                  "example": "principal_01h455vb4pex5vsknk084sn02q"
                }
              ],
              "description": "Only tickets assigned to this teammate: `me` for the caller, `unassigned` for tickets with no teammate assignee, or a principal ID (TypeID or UUID).",
              "example": "me"
            },
            "required": false,
            "description": "Only tickets assigned to this teammate: `me` for the caller, `unassigned` for tickets with no teammate assignee, or a principal ID (TypeID or UUID).",
            "name": "assignee",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tickets assigned to this team. Accepts the TypeID or its UUID.",
              "example": "team_01m8rxs1h9fk3s7qq9q8v971hw"
            },
            "required": false,
            "description": "Only tickets assigned to this team. Accepts the TypeID or its UUID.",
            "name": "teamId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tickets for this requester. Accepts the principal's TypeID or its UUID.",
              "example": "principal_01m8ry2xt8fzv9y3vahq9h816h"
            },
            "required": false,
            "description": "Only tickets for this requester. Accepts the principal's TypeID or its UUID.",
            "name": "requesterPrincipalId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only tickets for this company. Accepts the TypeID or its UUID.",
              "example": "company_01m8ry2xt8fzv9y3v0x01a68jg"
            },
            "required": false,
            "description": "Only tickets for this company. Accepts the TypeID or its UUID.",
            "name": "companyId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Text to find in the title, or a ticket number with or without `#`. 1 to 200 characters.",
              "example": "refund"
            },
            "required": false,
            "description": "Text to find in the title, or a ticket number with or without `#`. 1 to 200 characters.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "oldest",
                "created",
                "priority"
              ],
              "default": "recent",
              "description": "Sort order. `recent`: last updated first (the default); `oldest`: least recently updated first; `created`: newest first; `priority`: `urgent` first down to `none`. Ties break by ticket ID.",
              "example": "recent"
            },
            "required": false,
            "description": "Sort order. `recent`: last updated first (the default); `oldest`: least recently updated first; `created`: newest first; `priority`: `urgent` first down to `none`. Ties break by ticket ID.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "`nextCursor` from the previous page. Omit for the first page. A cursor naming a deleted or hidden ticket is not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": false,
            "description": "`nextCursor` from the previous page. Omit for the first page. A cursor naming a deleted or hidden ticket is not found.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of tickets to return, from 1 to 100. Defaults to 50.",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of tickets to return, from 1 to 100. Defaults to 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of tickets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsTicket"
                      },
                      "description": "Tickets on this page, in the requested sort order."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page (the last ticket's ID). Null on the last page.",
                      "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more tickets match after this page.",
                      "example": true
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The cursor names a ticket that is deleted or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsTicket",
        "tags": [
          "Tickets"
        ],
        "summary": "Open a support ticket",
        "description": "Opens a ticket in the workspace's default status. The number comes from the workspace ticket sequence. With a `ticketTypeId`, the type decides the category and `customAttributes` must answer its form: answers are checked against each field's type and required flag, and keys outside the form are dropped. Without an assignee, the ticket goes to the source conversation's assignee if they're still a teammate, else to the caller. The company defaults to the requester's company. A `customer` ticket with a requester and no `conversationId` gets its own conversation, which shares the ticket thread. A `description` becomes the first message, written as the caller. The requester, the assignee and the caller (when neither) become watchers. Requires the `create` permission. Records a `ticket.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "back_office",
                      "tracker"
                    ],
                    "description": "Ticket category: `customer`, `back_office` or `tracker`. Defaults to `customer`, or to the ticket type's category when `ticketTypeId` is sent; sending a different category than the type's is rejected.",
                    "example": "customer"
                  },
                  "ticketTypeId": {
                    "type": "string",
                    "description": "Ticket type to use. Accepts the TypeID or its UUID. Must not be archived. Omit for a ticket without a type.",
                    "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300,
                    "description": "Ticket title, 1 to 300 characters after trimming.",
                    "example": "Refund for duplicate charge on invoice INV-2291"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000,
                    "description": "Opening message, up to 4000 characters, posted on the ticket thread as the caller. On a new customer conversation it is also the conversation's subject (first 140 characters).",
                    "example": "The customer was charged twice for the March invoice."
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "none",
                      "low",
                      "medium",
                      "high",
                      "urgent"
                    ],
                    "description": "Priority: `none` (unset), `low`, `medium`, `high` or `urgent`. Defaults to `none`.",
                    "example": "high"
                  },
                  "requesterPrincipalId": {
                    "type": "string",
                    "description": "Principal ID of the person the ticket is for (TypeID or UUID). Omit for a ticket with no requester.",
                    "example": "principal_01m8ry2xt8fzv9y3vahq9h816h"
                  },
                  "assigneePrincipalId": {
                    "type": "string",
                    "description": "Principal ID of the teammate to assign (TypeID or UUID). Must be a current member of the workspace. Omit to use the default assignee described above.",
                    "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                  },
                  "conversationId": {
                    "type": "string",
                    "description": "Conversation the ticket comes from (TypeID or UUID). Its assignee becomes the default assignee. When sent, no new conversation is created.",
                    "example": "conversation_01m8ry2xt8fzv9y3vgkyf110vz"
                  },
                  "companyId": {
                    "type": "string",
                    "description": "Company the ticket is about (TypeID or UUID). Defaults to the requester's company.",
                    "example": "company_01m8ry2xt8fzv9y3v0x01a68jg"
                  },
                  "customAttributes": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 4000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Custom attributes, or the answers to the ticket type's form when `ticketTypeId` is sent. Keys are field keys; values are strings (up to 4000 characters), numbers, booleans or null. At most 50 keys.",
                    "example": {
                      "order_number": "A-10442",
                      "refund_amount": 49.5
                    }
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new ticket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsTicket"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket type, requester, company, conversation or assignee not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace has no default ticket status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/bulk": {
      "post": {
        "operationId": "bulkUpdateQuillsTickets",
        "tags": [
          "Tickets"
        ],
        "summary": "Apply one action to several support tickets",
        "description": "Applies one action to up to 100 tickets in one transaction. All or nothing: an unknown or deleted ticket, teammate, team or status changes no ticket. Requires the `update` permission. Records one `ticket.bulk_updated` event with the action type and ticket count.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ticketIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `ticket` prefix. Requests also accept the bare UUID.",
                      "example": "ticket_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Tickets to change, 1 to 100 IDs (TypeID or UUID), each at most once.",
                    "example": [
                      "ticket_01m8rxs1h9fk3s7qpjpm85d8v4",
                      "ticket_01m8ry2xt9fzv9y3w85v7zh5h9"
                    ]
                  },
                  "action": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "assign"
                            ],
                            "description": "Assign a teammate.",
                            "example": "assign"
                          },
                          "assignTo": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "me"
                                ]
                              },
                              {
                                "type": "string",
                                "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                                "example": "principal_01h455vb4pex5vsknk084sn02q"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "`me` for the caller, a principal ID (TypeID or UUID) of a current workspace member, or null to unassign.",
                            "example": "me"
                          }
                        },
                        "required": [
                          "type",
                          "assignTo"
                        ],
                        "description": "Assigns a teammate to every ticket."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "assign_team"
                            ],
                            "description": "Assign a team.",
                            "example": "assign_team"
                          },
                          "teamId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Team ID (TypeID or UUID), or null to unassign the team.",
                            "example": "team_01m8rxs1h9fk3s7qq9q8v971hw"
                          }
                        },
                        "required": [
                          "type",
                          "teamId"
                        ],
                        "description": "Assigns a team to every ticket."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "priority"
                            ],
                            "description": "Set the priority.",
                            "example": "priority"
                          },
                          "priority": {
                            "type": "string",
                            "enum": [
                              "none",
                              "low",
                              "medium",
                              "high",
                              "urgent"
                            ],
                            "description": "Priority: `none` (unset), `low`, `medium`, `high` or `urgent`.",
                            "example": "high"
                          }
                        },
                        "required": [
                          "type",
                          "priority"
                        ],
                        "description": "Sets the priority of every ticket."
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "set_status"
                            ],
                            "description": "Move to a status.",
                            "example": "set_status"
                          },
                          "statusId": {
                            "type": "string",
                            "description": "Status ID (TypeID or UUID). Must not be deleted.",
                            "example": "ticket_status_01m8rxs1h9fk3s7qp6pvwkrgpj"
                          }
                        },
                        "required": [
                          "type",
                          "statusId"
                        ],
                        "description": "Moves every ticket to a status, with the same effects as setting one ticket's status, including tracker cascades."
                      }
                    ],
                    "description": "The one action to apply, chosen by `type`."
                  }
                },
                "required": [
                  "ticketIds",
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The changed tickets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsTicket"
                      },
                      "description": "The tickets after the change, in the order of `ticketIds`."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A ticket, teammate, team or status not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}": {
      "get": {
        "operationId": "getQuillsTicket",
        "tags": [
          "Tickets"
        ],
        "summary": "Get a support ticket",
        "description": "Returns one non-deleted ticket. Callers without the `update` permission who belong to one or more teams only see tickets assigned to those teams; any other ticket is not found. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The ticket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsTicket"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found, deleted, or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/status": {
      "post": {
        "operationId": "setQuillsTicketStatus",
        "tags": [
          "Tickets"
        ],
        "summary": "Set a support ticket's status",
        "description": "Moves the ticket to another status. Entering a `closed` status sets `resolvedAt`; leaving one clears it and adds one to `reopenedCount`. When the requester-facing stage changes, a system message with the new stage label is posted on the customer thread. A `tracker` moving between categories also moves its linked tickets in the same transaction, but never reopens a closed one. Requires the `update` permission. Records a `ticket.status_changed` event; teammate watchers get an in-app notification.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "statusId": {
                    "type": "string",
                    "description": "Status to move the ticket to. Accepts the TypeID or its UUID. Must not be deleted.",
                    "example": "ticket_status_01m8rxs1h9fk3s7qp6pvwkrgpj"
                  }
                },
                "required": [
                  "statusId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated ticket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsTicket"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket or status not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/priority": {
      "post": {
        "operationId": "setQuillsTicketPriority",
        "tags": [
          "Tickets"
        ],
        "summary": "Set a support ticket's priority",
        "description": "Changes the ticket's priority and logs it in the ticket activity. Requires the `update` permission. Records a `ticket.priority_changed` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "priority": {
                    "type": "string",
                    "enum": [
                      "none",
                      "low",
                      "medium",
                      "high",
                      "urgent"
                    ],
                    "description": "Priority: `none` (unset), `low`, `medium`, `high` or `urgent`.",
                    "example": "urgent"
                  }
                },
                "required": [
                  "priority"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated ticket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsTicket"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/assign": {
      "post": {
        "operationId": "assignQuillsTicket",
        "tags": [
          "Tickets"
        ],
        "summary": "Assign a support ticket to a teammate or a team",
        "description": "Changes the teammate assignee, the team assignee, or both; send at least one. A field you leave out stays as it is, and null clears it. The teammate must be a current member and the team must not be deleted. A newly assigned teammate becomes a watcher. Requires the `update` permission. Records a `ticket.assigned` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assigneePrincipalId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "me"
                        ]
                      },
                      {
                        "type": "string",
                        "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                        "example": "principal_01h455vb4pex5vsknk084sn02q"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Teammate to assign: `me` for the caller, or a principal ID (TypeID or UUID) of a current workspace member. Null unassigns the teammate; omit to keep the current one.",
                    "example": "me"
                  },
                  "assigneeTeamId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Team to assign (TypeID or UUID). Null unassigns the team; omit to keep the current one.",
                    "example": "team_01m8rxs1h9fk3s7qq9q8v971hw"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated ticket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsTicket"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket, teammate or team not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/messages": {
      "get": {
        "operationId": "listQuillsTicketMessages",
        "tags": [
          "Tickets"
        ],
        "summary": "List a support ticket's thread",
        "description": "Returns the newest page of the ticket's thread, oldest message first within the page. A customer ticket's thread also includes its paired conversation's messages. Deleted and recalled messages are left out, and internal notes only appear with `includeInternal=true`. To page back in time, pass `nextCursor` as `before`. Callers without the `update` permission who belong to one or more teams only reach tickets assigned to those teams; any other ticket is not found. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Return messages older than this message (TypeID or UUID), usually the previous page's `nextCursor`. Omit for the newest page.",
              "example": "conversation_msg_01m8ry2xt9fzv9y3vza7xjnt5j"
            },
            "required": false,
            "description": "Return messages older than this message (TypeID or UUID), usually the previous page's `nextCursor`. Omit for the newest page.",
            "name": "before",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "`true` also returns internal notes. Defaults to `false`.",
              "example": "true"
            },
            "required": false,
            "description": "`true` also returns internal notes. Defaults to `false`.",
            "name": "includeInternal",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of messages to return, from 1 to 100. Defaults to 50.",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of messages to return, from 1 to 100. Defaults to 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the thread",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Message ID (TypeID).",
                            "example": "conversation_msg_01m8ry2xt9fzv9y3vza7xjnt5j"
                          },
                          "ticketId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Ticket the message is stored on (TypeID). Null when it's stored on the paired conversation instead.",
                            "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                          },
                          "conversationId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Conversation the message is stored on (TypeID). Set for messages of a customer ticket's paired conversation; null for messages stored on the ticket.",
                            "example": null
                          },
                          "senderType": {
                            "type": "string",
                            "enum": [
                              "visitor",
                              "agent",
                              "system"
                            ],
                            "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate; `system`: written automatically for status and link updates.",
                            "example": "agent"
                          },
                          "isInternal": {
                            "type": "boolean",
                            "description": "Whether the message is an internal note, never shown to the customer.",
                            "example": false
                          },
                          "sendStatus": {
                            "type": "string",
                            "enum": [
                              "sent",
                              "scheduled",
                              "recalled"
                            ],
                            "description": "Delivery state. `sent`: posted; `scheduled`: held until `scheduledSendAt` and can still be recalled; `recalled`: withdrawn before delivery.",
                            "example": "sent"
                          },
                          "scheduledSendAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time a scheduled message will be sent, in ISO 8601 UTC. Null for a message that wasn't scheduled.",
                            "example": null
                          },
                          "author": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "principalId": {
                                "type": "string",
                                "description": "Principal ID of the author (TypeID).",
                                "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                              },
                              "displayName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Author's display name. Null when unknown.",
                                "example": "Dana Whitaker"
                              }
                            },
                            "required": [
                              "principalId",
                              "displayName"
                            ],
                            "description": "Author of the message. Null for system messages."
                          },
                          "content": {
                            "type": "string",
                            "description": "Message text.",
                            "example": "We've issued the refund; it should arrive within 5 business days."
                          },
                          "systemEvent": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Kind of system event, such as `ticket_status_changed`.",
                                "example": "ticket_status_changed"
                              },
                              "stageLabel": {
                                "type": "string",
                                "description": "Requester-facing stage label the ticket moved to, for a status change.",
                                "example": "In progress"
                              },
                              "closed": {
                                "type": "boolean",
                                "description": "Present and true when the event closed the ticket.",
                                "example": true
                              },
                              "ticketReference": {
                                "type": "string",
                                "description": "Reference (`#1042`) of a ticket the event names.",
                                "example": "#1042"
                              },
                              "trackerReference": {
                                "type": "string",
                                "description": "Reference (`#987`) of a tracker the event names.",
                                "example": "#987"
                              }
                            },
                            "required": [
                              "kind"
                            ],
                            "description": "Details of a system message, such as a status change. Null for messages people wrote."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the message was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:30:12.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "ticketId",
                          "conversationId",
                          "senderType",
                          "isInternal",
                          "sendStatus",
                          "scheduledSendAt",
                          "author",
                          "content",
                          "systemEvent",
                          "createdAt"
                        ]
                      },
                      "description": "Messages on this page, oldest first."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the oldest message on this page, to pass as `before` for older messages. Null when there are none.",
                      "example": "conversation_msg_01m8ry2xt9fzv9y3vza7xjnt5j"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether older messages exist before this page.",
                      "example": false
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or hidden from the caller, or the `before` message isn't in the visible thread",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/reply": {
      "post": {
        "operationId": "replyQuillsTicket",
        "tags": [
          "Tickets"
        ],
        "summary": "Reply to a support ticket",
        "description": "Posts a customer-visible reply as the caller. On a customer ticket the reply goes on the paired conversation; otherwise it stays on the ticket thread and sets `firstResponseAt` if unset. The request only records the reply: delivery to the requester runs after commit. Send `scheduledAt`, or `delaySeconds` from 5 to 30, or rely on the workspace's undo-send setting, to hold the reply as `scheduled` so it can be recalled before delivery. The caller becomes a watcher. On a tracker, `replyAll: true` also posts the reply on every linked ticket in the same transaction. Requires the `update` permission. Records a `ticket.replied` event (teammate watchers get an in-app notification), or `message.send_scheduled` for a held reply.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "Reply text, 1 to 4000 characters after trimming.",
                    "example": "We've issued the refund; it should arrive within 5 business days."
                  },
                  "replyAll": {
                    "type": "boolean",
                    "default": false,
                    "description": "On a `tracker`, also post the reply on every ticket it tracks. Ignored on other tickets. Defaults to `false`.",
                    "example": false
                  },
                  "scheduledAt": {
                    "type": "string",
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "Time to send the reply, as an ISO 8601 date-time with `Z` (UTC). Must be in the future and at most 30 days ahead.",
                    "example": "2026-03-15T14:00:00Z"
                  },
                  "delaySeconds": {
                    "type": "integer",
                    "description": "Seconds to hold the reply so it can be recalled: 0 sends it now, or 5 to 30. Omit to use the workspace's undo-send setting. Ignored when `scheduledAt` is sent.",
                    "example": 10
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reply",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Message ID (TypeID).",
                      "example": "conversation_msg_01m8ry2xt9fzv9y3vza7xjnt5j"
                    },
                    "ticketId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Ticket the message is stored on (TypeID). Null when it's stored on the paired conversation instead.",
                      "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                    },
                    "conversationId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Conversation the message is stored on (TypeID). Set for messages of a customer ticket's paired conversation; null for messages stored on the ticket.",
                      "example": null
                    },
                    "senderType": {
                      "type": "string",
                      "enum": [
                        "visitor",
                        "agent",
                        "system"
                      ],
                      "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate; `system`: written automatically for status and link updates.",
                      "example": "agent"
                    },
                    "isInternal": {
                      "type": "boolean",
                      "description": "Whether the message is an internal note, never shown to the customer.",
                      "example": false
                    },
                    "sendStatus": {
                      "type": "string",
                      "enum": [
                        "sent",
                        "scheduled",
                        "recalled"
                      ],
                      "description": "Delivery state. `sent`: posted; `scheduled`: held until `scheduledSendAt` and can still be recalled; `recalled`: withdrawn before delivery.",
                      "example": "sent"
                    },
                    "scheduledSendAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a scheduled message will be sent, in ISO 8601 UTC. Null for a message that wasn't scheduled.",
                      "example": null
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "principalId": {
                          "type": "string",
                          "description": "Principal ID of the author (TypeID).",
                          "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                        },
                        "displayName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name. Null when unknown.",
                          "example": "Dana Whitaker"
                        }
                      },
                      "required": [
                        "principalId",
                        "displayName"
                      ],
                      "description": "Author of the message. Null for system messages."
                    },
                    "content": {
                      "type": "string",
                      "description": "Message text.",
                      "example": "We've issued the refund; it should arrive within 5 business days."
                    },
                    "systemEvent": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "description": "Kind of system event, such as `ticket_status_changed`.",
                          "example": "ticket_status_changed"
                        },
                        "stageLabel": {
                          "type": "string",
                          "description": "Requester-facing stage label the ticket moved to, for a status change.",
                          "example": "In progress"
                        },
                        "closed": {
                          "type": "boolean",
                          "description": "Present and true when the event closed the ticket.",
                          "example": true
                        },
                        "ticketReference": {
                          "type": "string",
                          "description": "Reference (`#1042`) of a ticket the event names.",
                          "example": "#1042"
                        },
                        "trackerReference": {
                          "type": "string",
                          "description": "Reference (`#987`) of a tracker the event names.",
                          "example": "#987"
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "description": "Details of a system message, such as a status change. Null for messages people wrote."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the message was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:30:12.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "ticketId",
                    "conversationId",
                    "senderType",
                    "isInternal",
                    "sendStatus",
                    "scheduledSendAt",
                    "author",
                    "content",
                    "systemEvent",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/note": {
      "post": {
        "operationId": "addQuillsTicketNote",
        "tags": [
          "Tickets"
        ],
        "summary": "Add an internal note to a support ticket",
        "description": "Adds an internal note to the ticket thread. Notes are never shown to the customer. `shareWithConversation: true` also copies the note, as an internal note, onto each conversation the ticket was opened from (not a customer ticket's paired conversation). Each mentioned principal must be a teammate who is a current workspace member. Callers without the `update` permission who belong to one or more teams only reach tickets assigned to those teams; any other ticket is not found. Requires the `comment_internal` or `update` permission. Records a `ticket.note_added` event; teammate watchers and mentioned teammates get an in-app notification.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "Note text, 1 to 4000 characters after trimming.",
                    "example": "Engineering confirmed the double charge; refund approved."
                  },
                  "shareWithConversation": {
                    "type": "boolean",
                    "default": false,
                    "description": "Also copy the note onto the conversations the ticket was opened from. Defaults to `false`.",
                    "example": false
                  },
                  "mentionPrincipalIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Principal ID of a teammate (TypeID or UUID).",
                      "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                    },
                    "maxItems": 20,
                    "default": [],
                    "description": "Teammates to mention, up to 20, each at most once. Defaults to none.",
                    "example": [
                      "principal_01m8rxs1h9fk3s7qprjefcmm25"
                    ]
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The note",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Message ID (TypeID).",
                      "example": "conversation_msg_01m8ry2xt9fzv9y3vza7xjnt5j"
                    },
                    "ticketId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Ticket the message is stored on (TypeID). Null when it's stored on the paired conversation instead.",
                      "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                    },
                    "conversationId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Conversation the message is stored on (TypeID). Set for messages of a customer ticket's paired conversation; null for messages stored on the ticket.",
                      "example": null
                    },
                    "senderType": {
                      "type": "string",
                      "enum": [
                        "visitor",
                        "agent",
                        "system"
                      ],
                      "description": "Who wrote the message. `visitor`: the customer; `agent`: a teammate; `system`: written automatically for status and link updates.",
                      "example": "agent"
                    },
                    "isInternal": {
                      "type": "boolean",
                      "description": "Whether the message is an internal note, never shown to the customer.",
                      "example": false
                    },
                    "sendStatus": {
                      "type": "string",
                      "enum": [
                        "sent",
                        "scheduled",
                        "recalled"
                      ],
                      "description": "Delivery state. `sent`: posted; `scheduled`: held until `scheduledSendAt` and can still be recalled; `recalled`: withdrawn before delivery.",
                      "example": "sent"
                    },
                    "scheduledSendAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a scheduled message will be sent, in ISO 8601 UTC. Null for a message that wasn't scheduled.",
                      "example": null
                    },
                    "author": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "principalId": {
                          "type": "string",
                          "description": "Principal ID of the author (TypeID).",
                          "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                        },
                        "displayName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name. Null when unknown.",
                          "example": "Dana Whitaker"
                        }
                      },
                      "required": [
                        "principalId",
                        "displayName"
                      ],
                      "description": "Author of the message. Null for system messages."
                    },
                    "content": {
                      "type": "string",
                      "description": "Message text.",
                      "example": "We've issued the refund; it should arrive within 5 business days."
                    },
                    "systemEvent": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "description": "Kind of system event, such as `ticket_status_changed`.",
                          "example": "ticket_status_changed"
                        },
                        "stageLabel": {
                          "type": "string",
                          "description": "Requester-facing stage label the ticket moved to, for a status change.",
                          "example": "In progress"
                        },
                        "closed": {
                          "type": "boolean",
                          "description": "Present and true when the event closed the ticket.",
                          "example": true
                        },
                        "ticketReference": {
                          "type": "string",
                          "description": "Reference (`#1042`) of a ticket the event names.",
                          "example": "#1042"
                        },
                        "trackerReference": {
                          "type": "string",
                          "description": "Reference (`#987`) of a tracker the event names.",
                          "example": "#987"
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "description": "Details of a system message, such as a status change. Null for messages people wrote."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the message was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:30:12.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "ticketId",
                    "conversationId",
                    "senderType",
                    "isInternal",
                    "sendStatus",
                    "scheduledSendAt",
                    "author",
                    "content",
                    "systemEvent",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or hidden from the caller, or a mentioned principal isn't a current teammate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/activity": {
      "get": {
        "operationId": "listQuillsTicketActivity",
        "tags": [
          "Tickets"
        ],
        "summary": "List a support ticket's activity timeline",
        "description": "Lists the ticket's activity log (creation, status, priority and assignment changes), newest first, at most 200 entries, with no pagination. Callers without the `update` permission who belong to one or more teams only reach tickets assigned to those teams; any other ticket is not found. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The ticket's activity",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Activity entry ID (TypeID).",
                            "example": "ticket_activity_01m8ry2xt9fzv9y3w85v7zh5h9"
                          },
                          "type": {
                            "type": "string",
                            "description": "What happened: `ticket.created`, `status.changed`, `priority.changed` or `ticket.assigned`.",
                            "example": "status.changed"
                          },
                          "principalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of who did it (TypeID). Null when unknown or removed.",
                            "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                          },
                          "actorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of who did it. Null when unknown.",
                            "example": "Dana Whitaker"
                          },
                          "metadata": {
                            "type": "object",
                            "properties": {
                              "fromId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the previous status. Present only for the activity types that record it; null when the value was empty."
                              },
                              "fromName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Name of the previous status. Present only for the activity types that record it; null when the value was empty."
                              },
                              "toId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the new status. Present only for the activity types that record it; null when the value was empty."
                              },
                              "toName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Name of the new status. Present only for the activity types that record it; null when the value was empty."
                              },
                              "from": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Previous value, such as the previous priority. Present only for the activity types that record it; null when the value was empty."
                              },
                              "to": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "New value, such as the new priority. Present only for the activity types that record it; null when the value was empty."
                              },
                              "fromPrincipalId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Previously assigned teammate's principal ID. Present only for the activity types that record it; null when the value was empty."
                              },
                              "fromPrincipalName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Previously assigned teammate's name. Present only for the activity types that record it; null when the value was empty."
                              },
                              "toPrincipalId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Newly assigned teammate's principal ID. Present only for the activity types that record it; null when the value was empty."
                              },
                              "toPrincipalName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Newly assigned teammate's name. Present only for the activity types that record it; null when the value was empty."
                              },
                              "fromTeamId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Previously assigned team's ID. Present only for the activity types that record it; null when the value was empty."
                              },
                              "fromTeamName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Previously assigned team's name. Present only for the activity types that record it; null when the value was empty."
                              },
                              "toTeamId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Newly assigned team's ID. Present only for the activity types that record it; null when the value was empty."
                              },
                              "toTeamName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Newly assigned team's name. Present only for the activity types that record it; null when the value was empty."
                              },
                              "ticketType": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Ticket category at creation. Present only for the activity types that record it; null when the value was empty."
                              }
                            },
                            "description": "Details of the change. Which keys appear depends on `type`; only string and null values are returned.",
                            "example": {
                              "fromId": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3",
                              "fromName": "Open",
                              "toId": "ticket_status_01m8rxs1h9fk3s7qp6pvwkrgpj",
                              "toName": "Waiting on engineering"
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time of the change, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:41:10.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "principalId",
                          "actorName",
                          "metadata",
                          "createdAt"
                        ]
                      },
                      "description": "Activity entries, newest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/watch": {
      "get": {
        "operationId": "getQuillsTicketWatchStatus",
        "tags": [
          "Tickets"
        ],
        "summary": "Get the caller's watch state on a support ticket",
        "description": "Returns whether the caller watches the ticket, why, and until when it's muted. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "requester",
                        "assignee",
                        "replier",
                        "manual",
                        null
                      ],
                      "description": "Why the person watches the ticket. `requester`: they're the ticket's requester; `assignee`: they were assigned the ticket; `replier`: they replied on it; `manual`: they chose to watch it, a teammate added them, or they created the ticket. Null when the caller doesn't watch the ticket.",
                      "example": "manual"
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the watcher gets no in-app notifications for the ticket, in ISO 8601 UTC. Null when not muted; a time in the past also means not muted.",
                      "example": "2026-03-21T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "watching",
                    "reason",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "watchQuillsTicket",
        "tags": [
          "Tickets"
        ],
        "summary": "Watch a support ticket",
        "description": "Subscribes the caller to the ticket with the `manual` reason. Idempotent: an existing subscription keeps its reason and mute. Teammate watchers who haven't muted the ticket get in-app notifications for its replies, status changes and internal notes, except for their own actions. Requires the `read` permission. Records no event, since a watch is personal state.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "requester",
                        "assignee",
                        "replier",
                        "manual",
                        null
                      ],
                      "description": "Why the person watches the ticket. `requester`: they're the ticket's requester; `assignee`: they were assigned the ticket; `replier`: they replied on it; `manual`: they chose to watch it, a teammate added them, or they created the ticket. Null when the caller doesn't watch the ticket.",
                      "example": "manual"
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the watcher gets no in-app notifications for the ticket, in ISO 8601 UTC. Null when not muted; a time in the past also means not muted.",
                      "example": "2026-03-21T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "watching",
                    "reason",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "unwatchQuillsTicket",
        "tags": [
          "Tickets"
        ],
        "summary": "Stop watching a support ticket",
        "description": "Removes the caller's subscription to the ticket, whatever its reason. Idempotent. The caller can be subscribed again later, for example by replying. Requires the `read` permission. Records no event, since a watch is personal state.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "requester",
                        "assignee",
                        "replier",
                        "manual",
                        null
                      ],
                      "description": "Why the person watches the ticket. `requester`: they're the ticket's requester; `assignee`: they were assigned the ticket; `replier`: they replied on it; `manual`: they chose to watch it, a teammate added them, or they created the ticket. Null when the caller doesn't watch the ticket.",
                      "example": "manual"
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the watcher gets no in-app notifications for the ticket, in ISO 8601 UTC. Null when not muted; a time in the past also means not muted.",
                      "example": "2026-03-21T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "watching",
                    "reason",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/mute": {
      "put": {
        "operationId": "muteQuillsTicket",
        "tags": [
          "Tickets"
        ],
        "summary": "Mute a watched support ticket for some days",
        "description": "Mutes the caller's in-app notifications for the ticket until `days` days from now, replacing any earlier mute. Does nothing when the caller doesn't watch the ticket. Requires the `read` permission. Records no event, since a mute is personal state.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30,
                    "description": "Number of days to mute the ticket for, from 1 to 30, counted from now in 24-hour periods.",
                    "example": 7
                  }
                },
                "required": [
                  "days"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "requester",
                        "assignee",
                        "replier",
                        "manual",
                        null
                      ],
                      "description": "Why the person watches the ticket. `requester`: they're the ticket's requester; `assignee`: they were assigned the ticket; `replier`: they replied on it; `manual`: they chose to watch it, a teammate added them, or they created the ticket. Null when the caller doesn't watch the ticket.",
                      "example": "manual"
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the watcher gets no in-app notifications for the ticket, in ISO 8601 UTC. Null when not muted; a time in the past also means not muted.",
                      "example": "2026-03-21T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "watching",
                    "reason",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "unmuteQuillsTicket",
        "tags": [
          "Tickets"
        ],
        "summary": "Unmute a support ticket",
        "description": "Clears the caller's mute on the ticket. Does nothing when the caller doesn't watch it. Requires the `read` permission. Records no event, since a mute is personal state.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's watch state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watching": {
                      "type": "boolean",
                      "description": "Whether the caller watches the ticket.",
                      "example": true
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "requester",
                        "assignee",
                        "replier",
                        "manual",
                        null
                      ],
                      "description": "Why the person watches the ticket. `requester`: they're the ticket's requester; `assignee`: they were assigned the ticket; `replier`: they replied on it; `manual`: they chose to watch it, a teammate added them, or they created the ticket. Null when the caller doesn't watch the ticket.",
                      "example": "manual"
                    },
                    "mutedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time until which the watcher gets no in-app notifications for the ticket, in ISO 8601 UTC. Null when not muted; a time in the past also means not muted.",
                      "example": "2026-03-21T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "watching",
                    "reason",
                    "mutedUntil"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/watchers": {
      "get": {
        "operationId": "listQuillsTicketWatchers",
        "tags": [
          "Tickets"
        ],
        "summary": "List a support ticket's watchers",
        "description": "Lists everyone subscribed to the ticket, teammates and customers, oldest subscription first. Returns at most 500 watchers, with no pagination. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The watchers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the watcher (TypeID).",
                            "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                          },
                          "reason": {
                            "type": "string",
                            "enum": [
                              "requester",
                              "assignee",
                              "replier",
                              "manual"
                            ],
                            "description": "Why the person watches the ticket. `requester`: they're the ticket's requester; `assignee`: they were assigned the ticket; `replier`: they replied on it; `manual`: they chose to watch it, a teammate added them, or they created the ticket.",
                            "example": "assignee"
                          },
                          "mutedUntil": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time until which the watcher gets no in-app notifications for the ticket, in ISO 8601 UTC. Null when not muted; a time in the past also means not muted.",
                            "example": null
                          },
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Watcher's display name. Null when the principal has none.",
                            "example": "Dana Whitaker"
                          },
                          "avatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the watcher's avatar. Null when unset.",
                            "example": "https://example.com/avatars/dana.png"
                          },
                          "teammate": {
                            "type": "boolean",
                            "description": "Whether the watcher is a teammate (linked to a user) rather than a customer.",
                            "example": true
                          }
                        },
                        "required": [
                          "principalId",
                          "reason",
                          "mutedUntil",
                          "displayName",
                          "avatarUrl",
                          "teammate"
                        ]
                      },
                      "description": "Watchers, oldest subscription first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/watchers/{principalId}": {
      "put": {
        "operationId": "addQuillsTicketWatcher",
        "tags": [
          "Tickets"
        ],
        "summary": "Add a teammate as a support ticket watcher",
        "description": "Subscribes a teammate to the ticket with the `manual` reason. Only a principal linked to a current member of the workspace can be added. Idempotent: an existing subscription keeps its reason and mute. Teammate watchers who haven't muted the ticket get in-app notifications for its replies, status changes and internal notes, except for their own actions. Requires the `update` permission. Records a `ticket.watcher_added` event when a watcher was added.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the watcher. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
            },
            "required": true,
            "description": "Principal ID of the watcher. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a watcher was added",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the call changed anything. False when the person already had (or didn't have) a subscription.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted, or the principal isn't a current teammate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsTicketWatcher",
        "tags": [
          "Tickets"
        ],
        "summary": "Remove a support ticket watcher",
        "description": "Removes anyone's subscription to the ticket, teammate or customer, whatever its reason. Idempotent. Requires the `update` permission. Records a `ticket.watcher_removed` event when a watcher was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the watcher. Accepts the TypeID or its UUID.",
              "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
            },
            "required": true,
            "description": "Principal ID of the watcher. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a watcher was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the call changed anything. False when the person already had (or didn't have) a subscription.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted, or no such principal",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/links": {
      "get": {
        "operationId": "getQuillsTicketLinks",
        "tags": [
          "Tickets"
        ],
        "summary": "Get a support ticket's tracker links",
        "description": "For a tracker, lists the non-deleted tickets it tracks in `linked`, by ticket number, at most 500; `tracker` is null. For any other ticket, returns its tracker in `tracker`, or null, and an empty `linked`. Callers without the `update` permission who belong to teams only reach tickets assigned to those teams. Tickets outside the caller's teams are left out. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The tracker links",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tracker": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsTicket"
                        },
                        {
                          "type": [
                            "object",
                            "null"
                          ]
                        }
                      ]
                    },
                    "linked": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsTicket"
                      },
                      "description": "Tickets this tracker tracks, by ascending number. Empty unless the ticket is a tracker."
                    }
                  },
                  "required": [
                    "tracker",
                    "linked"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found, deleted, or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/tracker/{trackerTicketId}": {
      "put": {
        "operationId": "linkQuillsTicketToTracker",
        "tags": [
          "Tickets"
        ],
        "summary": "Track a customer ticket under a tracker",
        "description": "Puts a customer ticket under a tracker, so the tracker's status changes and reply-all reach it. A customer ticket has at most one tracker; linking it again to the same tracker changes nothing. A new link posts an internal system note on the customer ticket. Requires the `update` permission. Records a `ticket.tracker_linked` event when a link was added.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Tracker ticket (a ticket of category `tracker`). Accepts the TypeID or its UUID.",
              "example": "ticket_01m8ry2xt9fzv9y3w85v7zh5h9"
            },
            "required": true,
            "description": "Tracker ticket (a ticket of category `tracker`). Accepts the TypeID or its UUID.",
            "name": "trackerTicketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a link was added",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the call changed anything. False when the link was already in the requested state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket or tracker not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The ticket is the tracker itself, the tracker isn't a `tracker`, the ticket isn't a `customer` ticket, or another tracker already tracks it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "unlinkQuillsTicketFromTracker",
        "tags": [
          "Tickets"
        ],
        "summary": "Stop tracking a customer ticket under a tracker",
        "description": "Removes the link between a ticket and its tracker. Idempotent: `changed` is false when they weren't linked. Requires the `update` permission. Records a `ticket.tracker_unlinked` event when a link was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Tracker ticket (a ticket of category `tracker`). Accepts the TypeID or its UUID.",
              "example": "ticket_01m8ry2xt9fzv9y3w85v7zh5h9"
            },
            "required": true,
            "description": "Tracker ticket (a ticket of category `tracker`). Accepts the TypeID or its UUID.",
            "name": "trackerTicketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a link was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the call changed anything. False when the link was already in the requested state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket or tracker not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/conversations/{conversationId}": {
      "put": {
        "operationId": "linkQuillsTicketToConversation",
        "tags": [
          "Tickets"
        ],
        "summary": "Link a support ticket to the conversation it was opened from",
        "description": "Links a ticket to a conversation. A customer ticket becomes the conversation's pair and shares its thread (at most one pair each way), and takes its `firstResponseAt` from the conversation's first public teammate reply if it had none. Any other ticket records the conversation as its origin. Test records and real records can't be linked to each other. Posts a system message on the conversation: public for a customer ticket, internal otherwise. Requires the `create` permission. Records a `ticket.conversation_linked` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation to link. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8ry2xt8fzv9y3vgkyf110vz"
            },
            "required": true,
            "description": "Conversation to link. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether the link was added",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the call changed anything. False when the link was already in the requested state.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket or conversation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The ticket or conversation is already linked, or one is test data and the other isn't",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/conversations": {
      "get": {
        "operationId": "listQuillsTicketConversations",
        "tags": [
          "Tickets"
        ],
        "summary": "List the conversations a support ticket is linked to",
        "description": "Returns the conversations linked to the ticket: the paired conversation that shares a customer ticket's thread, and the conversations a non-customer ticket was opened from. Callers without the `update` permission who belong to teams only reach tickets assigned to those teams. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The linked conversations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pairConversationId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Conversation that shares a customer ticket's thread (TypeID). Null when the ticket has no pair.",
                      "example": "conversation_01m8ry2xt8fzv9y3vgkyf110vz"
                    },
                    "provenanceConversationIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Conversations the ticket was opened from (TypeIDs), oldest link first, at most 100. Excludes the pair.",
                      "example": [
                        "conversation_01m8ry2xt8fzv9y3vgkyf110vz"
                      ]
                    },
                    "count": {
                      "type": "number",
                      "description": "Number of entries in `provenanceConversationIds`.",
                      "example": 1
                    }
                  },
                  "required": [
                    "pairConversationId",
                    "provenanceConversationIds",
                    "count"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found, deleted, or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/external-links": {
      "get": {
        "operationId": "listQuillsTicketExternalLinks",
        "tags": [
          "Tickets"
        ],
        "summary": "List a ticket's linked tracker issues",
        "description": "Returns the ticket's active issue links, oldest first (at most 100), and the workspace's active GitHub and GitLab connections with the channels (repositories or projects) an issue can be linked in or created in. Callers without the `update` permission who belong to teams only reach tickets assigned to those teams. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Links and linkable trackers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Link ID (TypeID).",
                            "example": "ticket_external_link_01m8rza3sbferr4fq8ezt1wj7s"
                          },
                          "integrationType": {
                            "type": "string",
                            "description": "Issue tracker the link points into: `github` or `gitlab`.",
                            "example": "github"
                          },
                          "externalId": {
                            "type": "string",
                            "description": "Issue reference in the tracker: `owner/repo#number` on GitHub, `<project ID>#number` on GitLab.",
                            "example": "acme/website#128"
                          },
                          "externalDisplayId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Reference shown to teammates. Null when the link has none.",
                            "example": "acme/website#128"
                          },
                          "externalUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "HTTPS URL of the issue. Null when unknown, for example for a GitLab reference linked by hand.",
                            "example": "https://github.com/acme/website/issues/128"
                          },
                          "createdAt": {
                            "type": "string",
                            "description": "Time the link was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T11:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "integrationType",
                          "externalId",
                          "externalDisplayId",
                          "externalUrl",
                          "createdAt"
                        ]
                      },
                      "description": "Active issue links, oldest first."
                    },
                    "trackers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "integrationId": {
                            "type": "string",
                            "description": "Connection ID (TypeID).",
                            "example": "integration_01m8rza3saferr4fq7m4tsszcr"
                          },
                          "integrationType": {
                            "type": "string",
                            "description": "Tracker type: `github` or `gitlab`.",
                            "example": "github"
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name of the tracker.",
                            "example": "GitHub"
                          },
                          "channels": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Channels configured on the connection, up to 200: `owner:repo` for GitHub, the numeric project ID for GitLab.",
                            "example": [
                              "acme:website",
                              "acme:api"
                            ]
                          }
                        },
                        "required": [
                          "integrationId",
                          "integrationType",
                          "name",
                          "channels"
                        ]
                      },
                      "description": "Active issue-tracker connections an issue can be linked or created in."
                    }
                  },
                  "required": [
                    "links",
                    "trackers"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found, deleted, or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "linkQuillsTicketIssue",
        "tags": [
          "Tickets"
        ],
        "summary": "Link a ticket to an existing tracker issue",
        "description": "Links the ticket to an issue that already exists in a connected tracker. The repository or project must be one of the connection's channels. Linking the same issue again changes nothing. No provider call is made, so the reference isn't checked remotely. A new link posts an internal system note on the ticket. Requires the `update` permission. Records a `ticket.external_linked` event when a link was created.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integrationId": {
                    "type": "string",
                    "description": "Active GitHub or GitLab connection of the workspace (TypeID or UUID).",
                    "example": "integration_01m8rza3saferr4fq7m4tsszcr"
                  },
                  "issue": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Issue reference, up to 500 characters. GitHub: `owner/repo#12` or `https://github.com/owner/repo/issues/12`; GitLab: `<project ID>#12`.",
                    "example": "acme/website#128"
                  }
                },
                "required": [
                  "integrationId",
                  "issue"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The link",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Link ID (TypeID).",
                      "example": "ticket_external_link_01m8rza3sbferr4fq8ezt1wj7s"
                    },
                    "integrationType": {
                      "type": "string",
                      "description": "Issue tracker the link points into: `github` or `gitlab`.",
                      "example": "github"
                    },
                    "externalId": {
                      "type": "string",
                      "description": "Issue reference in the tracker: `owner/repo#number` on GitHub, `<project ID>#number` on GitLab.",
                      "example": "acme/website#128"
                    },
                    "externalDisplayId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Reference shown to teammates. Null when the link has none.",
                      "example": "acme/website#128"
                    },
                    "externalUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "HTTPS URL of the issue. Null when unknown, for example for a GitLab reference linked by hand.",
                      "example": "https://github.com/acme/website/issues/128"
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "Time the link was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T11:05:00.000Z"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether a new link was created. False when the ticket was already linked to the issue.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "integrationType",
                    "externalId",
                    "externalDisplayId",
                    "externalUrl",
                    "createdAt",
                    "changed"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The reference doesn't name an issue in one of the connection's channels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted, or no active GitHub or GitLab connection with this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/external-links/issue": {
      "post": {
        "operationId": "createQuillsTicketIssue",
        "tags": [
          "Tickets"
        ],
        "summary": "Create a tracker issue from a ticket",
        "description": "Queues a new issue for the ticket in a connected tracker. The integration worker creates the issue after this request commits and then links it to the ticket. One create per ticket and channel: asking again returns the same operation instead of queuing another. Follow the operation in the connection's sync history. Requires the `update` permission. Records a `ticket.issue_requested` event when an operation was queued.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integrationId": {
                    "type": "string",
                    "description": "Active GitHub or GitLab connection of the workspace (TypeID or UUID).",
                    "example": "integration_01m8rza3saferr4fq7m4tsszcr"
                  },
                  "target": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Channel to create the issue in, one of the connection's `channels`: `owner:repo` for GitHub, the numeric project ID for GitLab.",
                    "example": "acme:website"
                  }
                },
                "required": [
                  "integrationId",
                  "target"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The queued operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "operationId": {
                      "type": "string",
                      "description": "ID of the queued sync operation.",
                      "example": "6f0c2a8e-4b1d-4c55-9a7e-2d3f1b8c9e01"
                    },
                    "state": {
                      "type": "string",
                      "description": "Current state of the operation; `queued` until the worker picks it up.",
                      "example": "queued"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this call queued the operation. False when it already existed.",
                      "example": true
                    }
                  },
                  "required": [
                    "operationId",
                    "state",
                    "changed"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The target isn't one of the connection's channels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted, or no active GitHub or GitLab connection with this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/external-links/{linkId}": {
      "delete": {
        "operationId": "unlinkQuillsTicketIssue",
        "tags": [
          "Tickets"
        ],
        "summary": "Remove a ticket's tracker issue link",
        "description": "Deletes the link between the ticket and a tracker issue and posts an internal system note on the ticket. The issue itself stays in the tracker. Requires the `update` permission. Records a `ticket.external_unlinked` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Link ID (TypeID or UUID).",
              "example": "ticket_external_link_01m8rza3sbferr4fq8ezt1wj7s"
            },
            "required": true,
            "description": "Link ID (TypeID or UUID).",
            "name": "linkId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a link was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Always true: a missing link is a 404.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted, or the link doesn't belong to it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/posts": {
      "post": {
        "operationId": "createQuillsPostFromTicket",
        "tags": [
          "Tickets"
        ],
        "summary": "Record a ticket's request as feedback",
        "description": "Records the ticket requester's request as feedback: creates a post authored by the requester on a board the caller can see, or, with `asUpvoteOfPostId`, adds the requester's vote to an existing visible post. The requester comes from the stored ticket and must be a real customer (not a teammate, service or test customer). As for every request recorded for a customer: the requester is the author and first voter and is subscribed as the author, a vote doesn't subscribe, a person has one vote per post, and the post history and the audit log record the caller, the requester and the source `ticket`. The ticket is linked to the post; repeating the call doesn't duplicate the link or the vote. Requires the `create` and `update` permissions. Records a `post.created` or `post.voted` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket whose requester the feedback is recorded for. Accepts the TypeID or its UUID.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket whose requester the feedback is recorded for. Accepts the TypeID or its UUID.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardId": {
                    "type": "string",
                    "description": "Board for a new post (TypeID or UUID). Required with `title` unless `asUpvoteOfPostId` is sent.",
                    "example": "board_01m8ry2xt9fzv9y3wgy5bg3zn6"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Title of the new post, 1 to 200 characters after trimming. Required with `boardId` unless `asUpvoteOfPostId` is sent.",
                    "example": "Export invoices as CSV"
                  },
                  "content": {
                    "type": "string",
                    "maxLength": 10000,
                    "default": "",
                    "description": "Body of the new post, up to 10000 characters. Defaults to empty. Ignored with `asUpvoteOfPostId`.",
                    "example": "Our finance team needs a CSV export of every invoice each month."
                  },
                  "asUpvoteOfPostId": {
                    "type": "string",
                    "description": "Existing post to add the requester's vote to instead of creating a post (TypeID or UUID). Takes precedence over `boardId` and `title`.",
                    "example": "post_01m8ry2xt9fzv9y3wgy5bg3zn6"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post that holds the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "ID of the post that holds the request (TypeID).",
                      "example": "post_01m8ry2xt9fzv9y3wgy5bg3zn6"
                    },
                    "created": {
                      "type": "boolean",
                      "description": "Whether a new post was created (false for a vote).",
                      "example": true
                    },
                    "voted": {
                      "type": "boolean",
                      "description": "Whether a vote was added to an existing post. False for a new post, or when the requester had already voted on it.",
                      "example": false
                    }
                  },
                  "required": [
                    "postId",
                    "created",
                    "voted"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found or deleted, or the board or post is missing or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The ticket has no customer requester",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/read": {
      "post": {
        "operationId": "markQuillsTicketRead",
        "tags": [
          "Tickets"
        ],
        "summary": "Mark a support ticket read for teammates",
        "description": "Sets the teammate read marker to now, so every message counts as read. The marker is shared by all teammates. A customer ticket keeps it on its paired conversation; any other ticket keeps it on the ticket, without changing the ticket's `updatedAt`. Callers without the `update` permission who belong to teams only reach tickets assigned to those teams. Requires the `read` permission. Records no event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The teammate read marker",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Teammates' shared read marker, in ISO 8601 UTC: messages created after it count as unread for teammates. Null when the ticket was never read.",
                      "example": "2026-03-14T09:31:00.000Z"
                    }
                  },
                  "required": [
                    "agentLastReadAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found, deleted, or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/unread": {
      "post": {
        "operationId": "markQuillsTicketUnread",
        "tags": [
          "Tickets"
        ],
        "summary": "Mark a support ticket unread from one message",
        "description": "Moves the teammate read marker to just before a message, so that message and every later one count as unread for teammates. The marker is shared by all teammates. A customer ticket keeps it on its paired conversation; any other ticket keeps it on the ticket, without changing the ticket's `updatedAt`. Callers without the `update` permission who belong to teams only reach tickets assigned to those teams. Requires the `read` permission. Records no event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "messageId": {
                    "type": "string",
                    "description": "First message to mark unread (TypeID or UUID). Must be a non-deleted message of the ticket's thread, including its paired conversation.",
                    "example": "conversation_msg_01m8ry2xt9fzv9y3vza7xjnt5j"
                  }
                },
                "required": [
                  "messageId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The teammate read marker",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Teammates' shared read marker, in ISO 8601 UTC: messages created after it count as unread for teammates. Null when the ticket was never read.",
                      "example": "2026-03-14T09:31:00.000Z"
                    }
                  },
                  "required": [
                    "agentLastReadAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found, deleted or hidden from the caller, or the message isn't in its thread",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/ticket-statuses": {
      "get": {
        "operationId": "listQuillsTicketStatuses",
        "tags": [
          "Tickets"
        ],
        "summary": "List ticket statuses",
        "description": "Lists the workspace's ticket statuses, excluding deleted ones, ordered by category (`open`, `pending`, then `closed`) and then by position. Returns at most 500 statuses, with no pagination. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The ticket statuses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Ticket status ID (TypeID).",
                            "example": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3"
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name shown to teammates.",
                            "example": "Waiting on engineering"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Stable machine name derived from the name when the status was created: lowercase letters, digits and underscores, with `_2`, `_3`… added when taken. Renaming the status doesn't change it.",
                            "example": "waiting_on_engineering"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                            "example": "#6b7280"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "open",
                              "pending",
                              "closed"
                            ],
                            "description": "Coarse category the status rolls up to, used for reporting and the ticket lifecycle. `open`: work is waiting on the team; `pending`: waiting on someone else, such as the requester; `closed`: the ticket is done. Moving a ticket into a `closed` status closes it, and moving it out reopens it.",
                            "example": "pending"
                          },
                          "position": {
                            "type": "number",
                            "description": "Sort position within the catalogue. Lists order statuses by category (`open`, `pending`, `closed`), then by ascending position.",
                            "example": 2
                          },
                          "isDefault": {
                            "type": "boolean",
                            "description": "Whether this is the workspace's default status. The default status can't be deleted.",
                            "example": false
                          },
                          "publicStage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "received",
                              "in_progress",
                              "awaiting_requester",
                              "resolved",
                              null
                            ],
                            "description": "Requester-facing stage the status projects to. `received`: the request was logged; `in_progress`: the team is working on it; `awaiting_requester`: the team needs a reply from the requester; `resolved`: the request is done. Requesters see the stage's label (see the stage labels routes), never the status name. Null keeps the status internal: requesters don't see it.",
                            "example": "in_progress"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "color",
                          "category",
                          "position",
                          "isDefault",
                          "publicStage"
                        ]
                      },
                      "description": "Ticket statuses in display order."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsTicketStatus",
        "tags": [
          "Tickets"
        ],
        "summary": "Create a ticket status",
        "description": "Creates a ticket status at the end of the catalogue (after the highest current position). The slug is derived from the name, with a numeric suffix when taken. The new status is never the default. Requires the `manage_settings` permission. Records a `ticket_status.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Display name shown to teammates, 1 to 50 characters after trimming. On create, it also seeds the status's slug.",
                    "example": "Waiting on engineering"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "description": "Color as a six-digit hex code in `#RRGGBB` form",
                    "example": "#6b7280"
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "open",
                      "pending",
                      "closed"
                    ],
                    "description": "Coarse category the status rolls up to, used for reporting and the ticket lifecycle. `open`: work is waiting on the team; `pending`: waiting on someone else, such as the requester; `closed`: the ticket is done. Moving a ticket into a `closed` status closes it, and moving it out reopens it.",
                    "example": "pending"
                  },
                  "publicStage": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "received",
                      "in_progress",
                      "awaiting_requester",
                      "resolved",
                      null
                    ],
                    "description": "Requester-facing stage the status projects to. `received`: the request was logged; `in_progress`: the team is working on it; `awaiting_requester`: the team needs a reply from the requester; `resolved`: the request is done. Requesters see the stage's label (see the stage labels routes), never the status name. Null keeps the status internal: requesters don't see it. Omit it or send null for an internal status.",
                    "example": "in_progress"
                  }
                },
                "required": [
                  "name",
                  "color",
                  "category"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Ticket status ID (TypeID).",
                      "example": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name shown to teammates.",
                      "example": "Waiting on engineering"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Stable machine name derived from the name when the status was created: lowercase letters, digits and underscores, with `_2`, `_3`… added when taken. Renaming the status doesn't change it.",
                      "example": "waiting_on_engineering"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "open",
                        "pending",
                        "closed"
                      ],
                      "description": "Coarse category the status rolls up to, used for reporting and the ticket lifecycle. `open`: work is waiting on the team; `pending`: waiting on someone else, such as the requester; `closed`: the ticket is done. Moving a ticket into a `closed` status closes it, and moving it out reopens it.",
                      "example": "pending"
                    },
                    "position": {
                      "type": "number",
                      "description": "Sort position within the catalogue. Lists order statuses by category (`open`, `pending`, `closed`), then by ascending position.",
                      "example": 2
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "Whether this is the workspace's default status. The default status can't be deleted.",
                      "example": false
                    },
                    "publicStage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "received",
                        "in_progress",
                        "awaiting_requester",
                        "resolved",
                        null
                      ],
                      "description": "Requester-facing stage the status projects to. `received`: the request was logged; `in_progress`: the team is working on it; `awaiting_requester`: the team needs a reply from the requester; `resolved`: the request is done. Requesters see the stage's label (see the stage labels routes), never the status name. Null keeps the status internal: requesters don't see it.",
                      "example": "in_progress"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "color",
                    "category",
                    "position",
                    "isDefault",
                    "publicStage"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another request created a status with the same slug at the same time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/ticket-statuses/order": {
      "put": {
        "operationId": "reorderQuillsTicketStatuses",
        "tags": [
          "Tickets"
        ],
        "summary": "Reorder the ticket statuses",
        "description": "Rewrites the position of every ticket status: each status's position becomes its index in `statusIds`. Lists still group statuses by category first, so the order only matters within a category. Requires the `manage_settings` permission. Records a `ticket_status.reordered` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "statusIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "Ticket status ID. Accepts the TypeID or its UUID.",
                      "example": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3"
                    },
                    "minItems": 1,
                    "maxItems": 500,
                    "description": "Every non-deleted ticket status ID exactly once, in the new order (1 to 500 IDs, no duplicates).",
                    "example": [
                      "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3",
                      "ticket_status_01m8rxs1h9fk3s7qp6pvwkrgpj"
                    ]
                  }
                },
                "required": [
                  "statusIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reordered statuses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Ticket status ID (TypeID).",
                            "example": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3"
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name shown to teammates.",
                            "example": "Waiting on engineering"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Stable machine name derived from the name when the status was created: lowercase letters, digits and underscores, with `_2`, `_3`… added when taken. Renaming the status doesn't change it.",
                            "example": "waiting_on_engineering"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                            "example": "#6b7280"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "open",
                              "pending",
                              "closed"
                            ],
                            "description": "Coarse category the status rolls up to, used for reporting and the ticket lifecycle. `open`: work is waiting on the team; `pending`: waiting on someone else, such as the requester; `closed`: the ticket is done. Moving a ticket into a `closed` status closes it, and moving it out reopens it.",
                            "example": "pending"
                          },
                          "position": {
                            "type": "number",
                            "description": "Sort position within the catalogue. Lists order statuses by category (`open`, `pending`, `closed`), then by ascending position.",
                            "example": 2
                          },
                          "isDefault": {
                            "type": "boolean",
                            "description": "Whether this is the workspace's default status. The default status can't be deleted.",
                            "example": false
                          },
                          "publicStage": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "received",
                              "in_progress",
                              "awaiting_requester",
                              "resolved",
                              null
                            ],
                            "description": "Requester-facing stage the status projects to. `received`: the request was logged; `in_progress`: the team is working on it; `awaiting_requester`: the team needs a reply from the requester; `resolved`: the request is done. Requesters see the stage's label (see the stage labels routes), never the status name. Null keeps the status internal: requesters don't see it.",
                            "example": "in_progress"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "color",
                          "category",
                          "position",
                          "isDefault",
                          "publicStage"
                        ]
                      },
                      "description": "Ticket statuses in their new display order."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "An ID doesn't name a non-deleted ticket status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The list leaves out a non-deleted status (stale or partial order)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/ticket-statuses/{statusId}": {
      "patch": {
        "operationId": "updateQuillsTicketStatus",
        "tags": [
          "Tickets"
        ],
        "summary": "Update a ticket status",
        "description": "Changes the fields you send and leaves the others as they are. Send at least one field. The slug never changes. Changing the category doesn't move, close or reopen tickets that already use the status. Requires the `manage_settings` permission. Records a `ticket_status.updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket status ID. Accepts the TypeID or its UUID. Deleted statuses are not found.",
              "example": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3"
            },
            "required": true,
            "description": "Ticket status ID. Accepts the TypeID or its UUID. Deleted statuses are not found.",
            "name": "statusId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Display name shown to teammates, 1 to 50 characters after trimming. On create, it also seeds the status's slug.",
                    "example": "Waiting on engineering"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "description": "Color as a six-digit hex code in `#RRGGBB` form",
                    "example": "#6b7280"
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "open",
                      "pending",
                      "closed"
                    ],
                    "description": "Coarse category the status rolls up to, used for reporting and the ticket lifecycle. `open`: work is waiting on the team; `pending`: waiting on someone else, such as the requester; `closed`: the ticket is done. Moving a ticket into a `closed` status closes it, and moving it out reopens it. Omit it to keep the current category.",
                    "example": "closed"
                  },
                  "publicStage": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "received",
                      "in_progress",
                      "awaiting_requester",
                      "resolved",
                      null
                    ],
                    "description": "Requester-facing stage the status projects to. `received`: the request was logged; `in_progress`: the team is working on it; `awaiting_requester`: the team needs a reply from the requester; `resolved`: the request is done. Requesters see the stage's label (see the stage labels routes), never the status name. Null keeps the status internal: requesters don't see it. Omit it to keep the current stage.",
                    "example": "resolved"
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000,
                    "description": "New sort position, an integer from 0 to 10000. Other statuses keep their positions; use the reorder route to rewrite the whole order.",
                    "example": 3
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Ticket status ID (TypeID).",
                      "example": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name shown to teammates.",
                      "example": "Waiting on engineering"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Stable machine name derived from the name when the status was created: lowercase letters, digits and underscores, with `_2`, `_3`… added when taken. Renaming the status doesn't change it.",
                      "example": "waiting_on_engineering"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "open",
                        "pending",
                        "closed"
                      ],
                      "description": "Coarse category the status rolls up to, used for reporting and the ticket lifecycle. `open`: work is waiting on the team; `pending`: waiting on someone else, such as the requester; `closed`: the ticket is done. Moving a ticket into a `closed` status closes it, and moving it out reopens it.",
                      "example": "pending"
                    },
                    "position": {
                      "type": "number",
                      "description": "Sort position within the catalogue. Lists order statuses by category (`open`, `pending`, `closed`), then by ascending position.",
                      "example": 2
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "Whether this is the workspace's default status. The default status can't be deleted.",
                      "example": false
                    },
                    "publicStage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "received",
                        "in_progress",
                        "awaiting_requester",
                        "resolved",
                        null
                      ],
                      "description": "Requester-facing stage the status projects to. `received`: the request was logged; `in_progress`: the team is working on it; `awaiting_requester`: the team needs a reply from the requester; `resolved`: the request is done. Requesters see the stage's label (see the stage labels routes), never the status name. Null keeps the status internal: requesters don't see it.",
                      "example": "in_progress"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "color",
                    "category",
                    "position",
                    "isDefault",
                    "publicStage"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket status not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsTicketStatus",
        "tags": [
          "Tickets"
        ],
        "summary": "Delete a ticket status",
        "description": "Soft-deletes a ticket status: it disappears from lists, and tickets that used it before keep their history. Refused for the default status, the last status of its category, or a status that any non-deleted ticket still uses (move those tickets first). Requires the `manage_settings` permission. Records a `ticket_status.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket status ID. Accepts the TypeID or its UUID. Deleted statuses are not found.",
              "example": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3"
            },
            "required": true,
            "description": "Ticket status ID. Accepts the TypeID or its UUID. Deleted statuses are not found.",
            "name": "statusId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted ticket status (TypeID).",
                      "example": "ticket_status_01m8rxs1h8fk3s7qnra8n1c4x3"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket status not found or already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The status is the default, the last status of its category, or still used by tickets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/ticket-stage-labels": {
      "get": {
        "operationId": "getQuillsTicketStageLabels",
        "tags": [
          "Tickets"
        ],
        "summary": "Get the requester-facing ticket stage labels",
        "description": "Returns the label requesters see for each ticket stage: the saved label, or the default for a stage without one. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The stage labels",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "received": {
                      "type": "string",
                      "description": "Label requesters see for the `received` stage. Defaults to \"Received\".",
                      "example": "Received"
                    },
                    "in_progress": {
                      "type": "string",
                      "description": "Label requesters see for the `in_progress` stage. Defaults to \"In progress\".",
                      "example": "In progress"
                    },
                    "awaiting_requester": {
                      "type": "string",
                      "description": "Label requesters see for the `awaiting_requester` stage. Defaults to \"Awaiting your reply\".",
                      "example": "Awaiting your reply"
                    },
                    "resolved": {
                      "type": "string",
                      "description": "Label requesters see for the `resolved` stage. Defaults to \"Resolved\".",
                      "example": "Resolved"
                    }
                  },
                  "required": [
                    "received",
                    "in_progress",
                    "awaiting_requester",
                    "resolved"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsTicketStageLabels",
        "tags": [
          "Tickets"
        ],
        "summary": "Set the requester-facing ticket stage labels",
        "description": "Replaces the requester-facing stage labels. Send at least one label; a stage you leave out goes back to its default label. Requires the `manage_settings` permission. Records a `settings.ticket_stage_labels_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "received": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "Label requesters see for the `received` stage, 1 to 60 characters after trimming. Omit it to use the default, \"Received\".",
                    "example": "Received"
                  },
                  "in_progress": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "Label requesters see for the `in_progress` stage, 1 to 60 characters after trimming. Omit it to use the default, \"In progress\".",
                    "example": "In progress"
                  },
                  "awaiting_requester": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "Label requesters see for the `awaiting_requester` stage, 1 to 60 characters after trimming. Omit it to use the default, \"Awaiting your reply\".",
                    "example": "Awaiting your reply"
                  },
                  "resolved": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "Label requesters see for the `resolved` stage, 1 to 60 characters after trimming. Omit it to use the default, \"Resolved\".",
                    "example": "Resolved"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stage labels",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "received": {
                      "type": "string",
                      "description": "Label requesters see for the `received` stage. Defaults to \"Received\".",
                      "example": "Received"
                    },
                    "in_progress": {
                      "type": "string",
                      "description": "Label requesters see for the `in_progress` stage. Defaults to \"In progress\".",
                      "example": "In progress"
                    },
                    "awaiting_requester": {
                      "type": "string",
                      "description": "Label requesters see for the `awaiting_requester` stage. Defaults to \"Awaiting your reply\".",
                      "example": "Awaiting your reply"
                    },
                    "resolved": {
                      "type": "string",
                      "description": "Label requesters see for the `resolved` stage. Defaults to \"Resolved\".",
                      "example": "Resolved"
                    }
                  },
                  "required": [
                    "received",
                    "in_progress",
                    "awaiting_requester",
                    "resolved"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/ticket-types": {
      "get": {
        "operationId": "listQuillsTicketTypes",
        "tags": [
          "Tickets"
        ],
        "summary": "List ticket types and their form fields",
        "description": "Lists the workspace's ticket types with their intake fields and ticket counts, ordered by category (`customer`, `back_office`, `tracker`), then position, then name. Returns at most 500 types, with no pagination. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "`true` also returns archived types. Defaults to `false`.",
              "example": "false"
            },
            "required": false,
            "description": "`true` also returns archived types. Defaults to `false`.",
            "name": "includeArchived",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "customer",
                "back_office",
                "tracker"
              ],
              "description": "Only return types of this category. Omit for all.",
              "example": "customer"
            },
            "required": false,
            "description": "Only return types of this category. Omit for all.",
            "name": "category",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The ticket types",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Ticket type ID (TypeID).",
                            "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name of the type.",
                            "example": "Refund request"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Unique machine name: lowercase letters, digits and underscores.",
                            "example": "refund_request"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "customer",
                              "back_office",
                              "tracker"
                            ],
                            "description": "Fixed ticket category the type belongs to, which decides ticket behavior. `customer`: a request from a customer, paired with their conversation and shown to them in the portal; `back_office`: internal work that customers don't see; `tracker`: an issue that groups other tickets, whose status changes and replies can cascade to the tickets it tracks.",
                            "example": "customer"
                          },
                          "icon": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Icon name shown next to the type. Null when the type has no icon.",
                            "example": "receipt"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                            "example": "#6b7280"
                          },
                          "fields": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "key": {
                                  "type": "string",
                                  "description": "Machine key of the field. Answers are stored on the ticket's custom attributes under this key.",
                                  "example": "order_number"
                                },
                                "label": {
                                  "type": "string",
                                  "description": "Label shown on the form.",
                                  "example": "Order number"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "text",
                                    "long_text",
                                    "number",
                                    "select",
                                    "date",
                                    "checkbox"
                                  ],
                                  "description": "Input type. `text` and `long_text`: free text; `number`: a number; `select`: one of `options`; `date`: an ISO 8601 date or date-time; `checkbox`: a boolean.",
                                  "example": "text"
                                },
                                "required": {
                                  "type": "boolean",
                                  "description": "Whether an answer is required.",
                                  "example": true
                                },
                                "visibleToCustomer": {
                                  "type": "boolean",
                                  "description": "Whether the field appears on the requester's intake form in the portal and widget.",
                                  "example": true
                                },
                                "order": {
                                  "type": "number",
                                  "description": "Sort order on the form; lower values come first.",
                                  "example": 10
                                },
                                "options": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "Choices of a `select` field. Absent for other types.",
                                  "example": [
                                    "Billing",
                                    "Shipping",
                                    "Returns"
                                  ]
                                }
                              },
                              "required": [
                                "key",
                                "label",
                                "type",
                                "required",
                                "visibleToCustomer",
                                "order"
                              ]
                            },
                            "description": "Intake form fields of the type."
                          },
                          "isDefault": {
                            "type": "boolean",
                            "description": "Whether this is its category's default type, preselected when a teammate creates a ticket of that category. Each category has at most one non-archived default.",
                            "example": true
                          },
                          "position": {
                            "type": "number",
                            "description": "Sort position within the category; lists order by category, then position, then name.",
                            "example": 0
                          },
                          "intakeVisible": {
                            "type": "boolean",
                            "description": "Whether customers can pick the type when they open a ticket in the portal or widget. Only applies to `customer` types.",
                            "example": true
                          },
                          "archived": {
                            "type": "boolean",
                            "description": "Whether the type is archived. Archived types keep their tickets but aren't offered for new tickets.",
                            "example": false
                          },
                          "ticketCount": {
                            "type": "number",
                            "description": "Number of non-deleted tickets that use the type.",
                            "example": 42
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "category",
                          "icon",
                          "color",
                          "fields",
                          "isDefault",
                          "position",
                          "intakeVisible",
                          "archived",
                          "ticketCount"
                        ]
                      },
                      "description": "Ticket types in display order."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsTicketType",
        "tags": [
          "Tickets"
        ],
        "summary": "Create a ticket type",
        "description": "Creates a ticket type at the end of its category. Without a `slug`, one is derived from the name, with a numeric suffix when taken. `isDefault: true` makes it the category's default and demotes the current default. Requires the `manage_settings` permission. Records a `ticket_type.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Display name, 1 to 50 characters after trimming.",
                    "example": "Refund request"
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "back_office",
                      "tracker"
                    ],
                    "description": "Fixed ticket category the type belongs to, which decides ticket behavior. `customer`: a request from a customer, paired with their conversation and shown to them in the portal; `back_office`: internal work that customers don't see; `tracker`: an issue that groups other tickets, whose status changes and replies can cascade to the tickets it tracks. Can't change later while tickets use the type.",
                    "example": "customer"
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 50,
                    "pattern": "^[a-z0-9][a-z0-9_]*$",
                    "description": "Unique machine name, up to 50 characters: a lowercase letter or digit followed by lowercase letters, digits and underscores.",
                    "example": "refund_request"
                  },
                  "icon": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 50,
                    "description": "Icon name, up to 50 characters. Null or an empty string removes the icon.",
                    "example": "receipt"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "description": "Badge color as a six-digit hex code in `#RRGGBB` form. Defaults to `#6b7280`.",
                    "example": "#2563eb"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "pattern": "^[a-z0-9_]+$",
                          "description": "Machine key of the field, 1 to 64 lowercase letters, digits and underscores. Answers are stored on the ticket's custom attributes under this key, and stay stored if the field is later removed.",
                          "example": "order_number"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120,
                          "description": "Label shown on the form, 1 to 120 characters.",
                          "example": "Order number"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "long_text",
                            "number",
                            "select",
                            "date",
                            "checkbox"
                          ],
                          "description": "Input type, which decides how answers are checked. `text` and `long_text`: up to 4000 characters; `number`: a finite number (a numeric string is converted); `select`: one of `options`; `date`: an ISO 8601 date (`2026-03-14`) or date-time; `checkbox`: a boolean.",
                          "example": "text"
                        },
                        "required": {
                          "type": "boolean",
                          "description": "Whether an answer is required. A required `checkbox` must be checked.",
                          "example": true
                        },
                        "visibleToCustomer": {
                          "type": "boolean",
                          "description": "Whether the field appears on the requester's intake form in the portal and widget. Teammate forms always show every field.",
                          "example": true
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -100000,
                          "maximum": 100000,
                          "description": "Sort order on the form, an integer from -100000 to 100000; lower values come first.",
                          "example": 10
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "maxItems": 100,
                          "description": "Choices for a `select` field, up to 100 strings of 1 to 200 characters. Required (at least one) for `select`; ignored for other types.",
                          "example": [
                            "Billing",
                            "Shipping",
                            "Returns"
                          ]
                        }
                      },
                      "required": [
                        "key",
                        "label",
                        "type",
                        "required",
                        "visibleToCustomer",
                        "order"
                      ]
                    },
                    "maxItems": 50,
                    "description": "Intake form fields of the ticket type, up to 50, each with a unique `key`. Sending the list replaces the whole form."
                  },
                  "intakeVisible": {
                    "type": "boolean",
                    "description": "Whether customers can pick the type when they open a ticket in the portal or widget. Only applies to `customer` types. Defaults to `true`.",
                    "example": true
                  },
                  "isDefault": {
                    "type": "boolean",
                    "description": "`true` makes the new type its category's default, demoting the current one. Defaults to `false`.",
                    "example": false
                  }
                },
                "required": [
                  "name",
                  "category"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new ticket type",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Ticket type ID (TypeID).",
                      "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the type.",
                      "example": "Refund request"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Unique machine name: lowercase letters, digits and underscores.",
                      "example": "refund_request"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "customer",
                        "back_office",
                        "tracker"
                      ],
                      "description": "Fixed ticket category the type belongs to, which decides ticket behavior. `customer`: a request from a customer, paired with their conversation and shown to them in the portal; `back_office`: internal work that customers don't see; `tracker`: an issue that groups other tickets, whose status changes and replies can cascade to the tickets it tracks.",
                      "example": "customer"
                    },
                    "icon": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Icon name shown next to the type. Null when the type has no icon.",
                      "example": "receipt"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Machine key of the field. Answers are stored on the ticket's custom attributes under this key.",
                            "example": "order_number"
                          },
                          "label": {
                            "type": "string",
                            "description": "Label shown on the form.",
                            "example": "Order number"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "text",
                              "long_text",
                              "number",
                              "select",
                              "date",
                              "checkbox"
                            ],
                            "description": "Input type. `text` and `long_text`: free text; `number`: a number; `select`: one of `options`; `date`: an ISO 8601 date or date-time; `checkbox`: a boolean.",
                            "example": "text"
                          },
                          "required": {
                            "type": "boolean",
                            "description": "Whether an answer is required.",
                            "example": true
                          },
                          "visibleToCustomer": {
                            "type": "boolean",
                            "description": "Whether the field appears on the requester's intake form in the portal and widget.",
                            "example": true
                          },
                          "order": {
                            "type": "number",
                            "description": "Sort order on the form; lower values come first.",
                            "example": 10
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Choices of a `select` field. Absent for other types.",
                            "example": [
                              "Billing",
                              "Shipping",
                              "Returns"
                            ]
                          }
                        },
                        "required": [
                          "key",
                          "label",
                          "type",
                          "required",
                          "visibleToCustomer",
                          "order"
                        ]
                      },
                      "description": "Intake form fields of the type."
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "Whether this is its category's default type, preselected when a teammate creates a ticket of that category. Each category has at most one non-archived default.",
                      "example": true
                    },
                    "position": {
                      "type": "number",
                      "description": "Sort position within the category; lists order by category, then position, then name.",
                      "example": 0
                    },
                    "intakeVisible": {
                      "type": "boolean",
                      "description": "Whether customers can pick the type when they open a ticket in the portal or widget. Only applies to `customer` types.",
                      "example": true
                    },
                    "archived": {
                      "type": "boolean",
                      "description": "Whether the type is archived. Archived types keep their tickets but aren't offered for new tickets.",
                      "example": false
                    },
                    "ticketCount": {
                      "type": "number",
                      "description": "Number of non-deleted tickets that use the type.",
                      "example": 42
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "category",
                    "icon",
                    "color",
                    "fields",
                    "isDefault",
                    "position",
                    "intakeVisible",
                    "archived",
                    "ticketCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another ticket type already uses the slug",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/ticket-types/{ticketTypeId}": {
      "patch": {
        "operationId": "updateQuillsTicketType",
        "tags": [
          "Tickets"
        ],
        "summary": "Update a ticket type",
        "description": "Changes the fields you send and leaves the others as they are. Send at least one field. The category can change only while no non-deleted ticket uses the type, and never for the category's default type. A default can't be unset directly: make another type the default instead. Replacing `fields` doesn't rewrite answers already stored on tickets. Archived types can't be updated. Requires the `manage_settings` permission. Records a `ticket_type.updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket type ID. Accepts the TypeID or its UUID.",
              "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
            },
            "required": true,
            "description": "Ticket type ID. Accepts the TypeID or its UUID.",
            "name": "ticketTypeId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Display name, 1 to 50 characters after trimming.",
                    "example": "Refund request"
                  },
                  "slug": {
                    "type": "string",
                    "maxLength": 50,
                    "pattern": "^[a-z0-9][a-z0-9_]*$",
                    "description": "Unique machine name, up to 50 characters: a lowercase letter or digit followed by lowercase letters, digits and underscores.",
                    "example": "refund_request"
                  },
                  "icon": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 50,
                    "description": "Icon name, up to 50 characters. Null or an empty string removes the icon.",
                    "example": "receipt"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "description": "Color as a six-digit hex code in `#RRGGBB` form",
                    "example": "#6b7280"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "pattern": "^[a-z0-9_]+$",
                          "description": "Machine key of the field, 1 to 64 lowercase letters, digits and underscores. Answers are stored on the ticket's custom attributes under this key, and stay stored if the field is later removed.",
                          "example": "order_number"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120,
                          "description": "Label shown on the form, 1 to 120 characters.",
                          "example": "Order number"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "long_text",
                            "number",
                            "select",
                            "date",
                            "checkbox"
                          ],
                          "description": "Input type, which decides how answers are checked. `text` and `long_text`: up to 4000 characters; `number`: a finite number (a numeric string is converted); `select`: one of `options`; `date`: an ISO 8601 date (`2026-03-14`) or date-time; `checkbox`: a boolean.",
                          "example": "text"
                        },
                        "required": {
                          "type": "boolean",
                          "description": "Whether an answer is required. A required `checkbox` must be checked.",
                          "example": true
                        },
                        "visibleToCustomer": {
                          "type": "boolean",
                          "description": "Whether the field appears on the requester's intake form in the portal and widget. Teammate forms always show every field.",
                          "example": true
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -100000,
                          "maximum": 100000,
                          "description": "Sort order on the form, an integer from -100000 to 100000; lower values come first.",
                          "example": 10
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "maxItems": 100,
                          "description": "Choices for a `select` field, up to 100 strings of 1 to 200 characters. Required (at least one) for `select`; ignored for other types.",
                          "example": [
                            "Billing",
                            "Shipping",
                            "Returns"
                          ]
                        }
                      },
                      "required": [
                        "key",
                        "label",
                        "type",
                        "required",
                        "visibleToCustomer",
                        "order"
                      ]
                    },
                    "maxItems": 50,
                    "description": "Intake form fields of the ticket type, up to 50, each with a unique `key`. Sending the list replaces the whole form."
                  },
                  "intakeVisible": {
                    "type": "boolean",
                    "description": "Whether customers can pick the type when they open a ticket in the portal or widget. Only applies to `customer` types.",
                    "example": true
                  },
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000,
                    "description": "Sort position within the category, an integer from 0 to 10000.",
                    "example": 1
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "customer",
                      "back_office",
                      "tracker"
                    ],
                    "description": "Fixed ticket category the type belongs to, which decides ticket behavior. `customer`: a request from a customer, paired with their conversation and shown to them in the portal; `back_office`: internal work that customers don't see; `tracker`: an issue that groups other tickets, whose status changes and replies can cascade to the tickets it tracks. Only changes while no ticket uses the type.",
                    "example": "back_office"
                  },
                  "isDefault": {
                    "type": "boolean",
                    "description": "`true` makes the type its category's default and demotes the current one. `false` is refused for the current default.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated ticket type",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Ticket type ID (TypeID).",
                      "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the type.",
                      "example": "Refund request"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Unique machine name: lowercase letters, digits and underscores.",
                      "example": "refund_request"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "customer",
                        "back_office",
                        "tracker"
                      ],
                      "description": "Fixed ticket category the type belongs to, which decides ticket behavior. `customer`: a request from a customer, paired with their conversation and shown to them in the portal; `back_office`: internal work that customers don't see; `tracker`: an issue that groups other tickets, whose status changes and replies can cascade to the tickets it tracks.",
                      "example": "customer"
                    },
                    "icon": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Icon name shown next to the type. Null when the type has no icon.",
                      "example": "receipt"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Machine key of the field. Answers are stored on the ticket's custom attributes under this key.",
                            "example": "order_number"
                          },
                          "label": {
                            "type": "string",
                            "description": "Label shown on the form.",
                            "example": "Order number"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "text",
                              "long_text",
                              "number",
                              "select",
                              "date",
                              "checkbox"
                            ],
                            "description": "Input type. `text` and `long_text`: free text; `number`: a number; `select`: one of `options`; `date`: an ISO 8601 date or date-time; `checkbox`: a boolean.",
                            "example": "text"
                          },
                          "required": {
                            "type": "boolean",
                            "description": "Whether an answer is required.",
                            "example": true
                          },
                          "visibleToCustomer": {
                            "type": "boolean",
                            "description": "Whether the field appears on the requester's intake form in the portal and widget.",
                            "example": true
                          },
                          "order": {
                            "type": "number",
                            "description": "Sort order on the form; lower values come first.",
                            "example": 10
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Choices of a `select` field. Absent for other types.",
                            "example": [
                              "Billing",
                              "Shipping",
                              "Returns"
                            ]
                          }
                        },
                        "required": [
                          "key",
                          "label",
                          "type",
                          "required",
                          "visibleToCustomer",
                          "order"
                        ]
                      },
                      "description": "Intake form fields of the type."
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "Whether this is its category's default type, preselected when a teammate creates a ticket of that category. Each category has at most one non-archived default.",
                      "example": true
                    },
                    "position": {
                      "type": "number",
                      "description": "Sort position within the category; lists order by category, then position, then name.",
                      "example": 0
                    },
                    "intakeVisible": {
                      "type": "boolean",
                      "description": "Whether customers can pick the type when they open a ticket in the portal or widget. Only applies to `customer` types.",
                      "example": true
                    },
                    "archived": {
                      "type": "boolean",
                      "description": "Whether the type is archived. Archived types keep their tickets but aren't offered for new tickets.",
                      "example": false
                    },
                    "ticketCount": {
                      "type": "number",
                      "description": "Number of non-deleted tickets that use the type.",
                      "example": 42
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "category",
                    "icon",
                    "color",
                    "fields",
                    "isDefault",
                    "position",
                    "intakeVisible",
                    "archived",
                    "ticketCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket type not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Tickets use the type and the category changed, the change unsets or moves the category default, or another type uses the slug",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/ticket-types/{ticketTypeId}/archive": {
      "post": {
        "operationId": "archiveQuillsTicketType",
        "tags": [
          "Tickets"
        ],
        "summary": "Archive a ticket type",
        "description": "Archives a ticket type. Tickets keep the type, but it's no longer offered for new tickets. Archiving the category's default leaves the category without a default until another type is made the default. Requires the `manage_settings` permission. Records a `ticket_type.archived` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket type ID. Accepts the TypeID or its UUID.",
              "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
            },
            "required": true,
            "description": "Ticket type ID. Accepts the TypeID or its UUID.",
            "name": "ticketTypeId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The archived ticket type",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Ticket type ID (TypeID).",
                      "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the type.",
                      "example": "Refund request"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Unique machine name: lowercase letters, digits and underscores.",
                      "example": "refund_request"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "customer",
                        "back_office",
                        "tracker"
                      ],
                      "description": "Fixed ticket category the type belongs to, which decides ticket behavior. `customer`: a request from a customer, paired with their conversation and shown to them in the portal; `back_office`: internal work that customers don't see; `tracker`: an issue that groups other tickets, whose status changes and replies can cascade to the tickets it tracks.",
                      "example": "customer"
                    },
                    "icon": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Icon name shown next to the type. Null when the type has no icon.",
                      "example": "receipt"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Machine key of the field. Answers are stored on the ticket's custom attributes under this key.",
                            "example": "order_number"
                          },
                          "label": {
                            "type": "string",
                            "description": "Label shown on the form.",
                            "example": "Order number"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "text",
                              "long_text",
                              "number",
                              "select",
                              "date",
                              "checkbox"
                            ],
                            "description": "Input type. `text` and `long_text`: free text; `number`: a number; `select`: one of `options`; `date`: an ISO 8601 date or date-time; `checkbox`: a boolean.",
                            "example": "text"
                          },
                          "required": {
                            "type": "boolean",
                            "description": "Whether an answer is required.",
                            "example": true
                          },
                          "visibleToCustomer": {
                            "type": "boolean",
                            "description": "Whether the field appears on the requester's intake form in the portal and widget.",
                            "example": true
                          },
                          "order": {
                            "type": "number",
                            "description": "Sort order on the form; lower values come first.",
                            "example": 10
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Choices of a `select` field. Absent for other types.",
                            "example": [
                              "Billing",
                              "Shipping",
                              "Returns"
                            ]
                          }
                        },
                        "required": [
                          "key",
                          "label",
                          "type",
                          "required",
                          "visibleToCustomer",
                          "order"
                        ]
                      },
                      "description": "Intake form fields of the type."
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "Whether this is its category's default type, preselected when a teammate creates a ticket of that category. Each category has at most one non-archived default.",
                      "example": true
                    },
                    "position": {
                      "type": "number",
                      "description": "Sort position within the category; lists order by category, then position, then name.",
                      "example": 0
                    },
                    "intakeVisible": {
                      "type": "boolean",
                      "description": "Whether customers can pick the type when they open a ticket in the portal or widget. Only applies to `customer` types.",
                      "example": true
                    },
                    "archived": {
                      "type": "boolean",
                      "description": "Whether the type is archived. Archived types keep their tickets but aren't offered for new tickets.",
                      "example": false
                    },
                    "ticketCount": {
                      "type": "number",
                      "description": "Number of non-deleted tickets that use the type.",
                      "example": 42
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "category",
                    "icon",
                    "color",
                    "fields",
                    "isDefault",
                    "position",
                    "intakeVisible",
                    "archived",
                    "ticketCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket type not found or already archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/ticket-types/{ticketTypeId}/restore": {
      "post": {
        "operationId": "restoreQuillsTicketType",
        "tags": [
          "Tickets"
        ],
        "summary": "Restore an archived ticket type",
        "description": "Restores an archived ticket type so it's offered for new tickets again. It comes back as its category's default only when it was the default and the category has no other non-archived default now. Requires the `manage_settings` permission. Records a `ticket_type.restored` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket type ID. Accepts the TypeID or its UUID.",
              "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
            },
            "required": true,
            "description": "Ticket type ID. Accepts the TypeID or its UUID.",
            "name": "ticketTypeId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored ticket type",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Ticket type ID (TypeID).",
                      "example": "ticket_type_01m8rxs1h9fk3s7qpfdw6vvggn"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name of the type.",
                      "example": "Refund request"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Unique machine name: lowercase letters, digits and underscores.",
                      "example": "refund_request"
                    },
                    "category": {
                      "type": "string",
                      "enum": [
                        "customer",
                        "back_office",
                        "tracker"
                      ],
                      "description": "Fixed ticket category the type belongs to, which decides ticket behavior. `customer`: a request from a customer, paired with their conversation and shown to them in the portal; `back_office`: internal work that customers don't see; `tracker`: an issue that groups other tickets, whose status changes and replies can cascade to the tickets it tracks.",
                      "example": "customer"
                    },
                    "icon": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Icon name shown next to the type. Null when the type has no icon.",
                      "example": "receipt"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Machine key of the field. Answers are stored on the ticket's custom attributes under this key.",
                            "example": "order_number"
                          },
                          "label": {
                            "type": "string",
                            "description": "Label shown on the form.",
                            "example": "Order number"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "text",
                              "long_text",
                              "number",
                              "select",
                              "date",
                              "checkbox"
                            ],
                            "description": "Input type. `text` and `long_text`: free text; `number`: a number; `select`: one of `options`; `date`: an ISO 8601 date or date-time; `checkbox`: a boolean.",
                            "example": "text"
                          },
                          "required": {
                            "type": "boolean",
                            "description": "Whether an answer is required.",
                            "example": true
                          },
                          "visibleToCustomer": {
                            "type": "boolean",
                            "description": "Whether the field appears on the requester's intake form in the portal and widget.",
                            "example": true
                          },
                          "order": {
                            "type": "number",
                            "description": "Sort order on the form; lower values come first.",
                            "example": 10
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Choices of a `select` field. Absent for other types.",
                            "example": [
                              "Billing",
                              "Shipping",
                              "Returns"
                            ]
                          }
                        },
                        "required": [
                          "key",
                          "label",
                          "type",
                          "required",
                          "visibleToCustomer",
                          "order"
                        ]
                      },
                      "description": "Intake form fields of the type."
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "Whether this is its category's default type, preselected when a teammate creates a ticket of that category. Each category has at most one non-archived default.",
                      "example": true
                    },
                    "position": {
                      "type": "number",
                      "description": "Sort position within the category; lists order by category, then position, then name.",
                      "example": 0
                    },
                    "intakeVisible": {
                      "type": "boolean",
                      "description": "Whether customers can pick the type when they open a ticket in the portal or widget. Only applies to `customer` types.",
                      "example": true
                    },
                    "archived": {
                      "type": "boolean",
                      "description": "Whether the type is archived. Archived types keep their tickets but aren't offered for new tickets.",
                      "example": false
                    },
                    "ticketCount": {
                      "type": "number",
                      "description": "Number of non-deleted tickets that use the type.",
                      "example": 42
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "category",
                    "icon",
                    "color",
                    "fields",
                    "isDefault",
                    "position",
                    "intakeVisible",
                    "archived",
                    "ticketCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket type not found or not archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/macros": {
      "get": {
        "operationId": "listQuillsMacros",
        "tags": [
          "Inbox and views"
        ],
        "summary": "List saved replies (macros)",
        "description": "Lists the workspace's macros, newest first, at most 500 with no pagination. Deleted macros are left out. `surface` limits the list to the macros a composer offers: those of its own scope and those scoped `both`. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "support",
                "feedback"
              ],
              "description": "Composer to list macros for. `support`: macros scoped `support` or `both`; `feedback`: macros scoped `feedback` or `both`. Omit for every macro.",
              "example": "support"
            },
            "required": false,
            "description": "Composer to list macros for. `support`: macros scoped `support` or `both`; `feedback`: macros scoped `feedback` or `both`. Omit for every macro.",
            "name": "surface",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The macros",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Macro ID (TypeID).",
                            "example": "macro_01m8rzdgxqecrb410yhjewaqhc"
                          },
                          "name": {
                            "type": "string",
                            "description": "Macro name shown in the macro list and the composer picker.",
                            "example": "Password reset steps"
                          },
                          "body": {
                            "type": "string",
                            "description": "Reply text with optional `{firstName}`, `{lastName}`, `{email}` and `{conversationTitle}` variables, filled in when the macro is applied.",
                            "example": "Hi {firstName}, you can reset your password from the sign-in page. Let me know if the link doesn't arrive."
                          },
                          "scope": {
                            "type": "string",
                            "enum": [
                              "support",
                              "feedback",
                              "both"
                            ],
                            "description": "Where the macro is offered. `support`: the support inbox composer; `feedback`: the feedback surfaces; `both`: everywhere.",
                            "example": "support"
                          },
                          "actions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "assign_agent",
                                    "assign_team",
                                    "add_tag",
                                    "set_priority",
                                    "snooze",
                                    "close",
                                    "set_attribute"
                                  ],
                                  "description": "Action type. `assign_agent`: assign a teammate (`principalId`); `assign_team`: assign a team (`teamId`); `add_tag`: add a tag (`tagId`); `set_priority`: set the priority (`priority`); `snooze`: snooze (`preset`); `close`: close the conversation; `set_attribute`: set a custom attribute (`key` with `value` or `values`).",
                                  "example": "add_tag"
                                },
                                "principalId": {
                                  "type": "string",
                                  "description": "Principal ID (TypeID) of the teammate to assign. Only on `assign_agent`.",
                                  "example": "principal_01m8rzdgxqecrb4117p85yxmdw"
                                },
                                "teamId": {
                                  "type": "string",
                                  "description": "ID (TypeID) of the team to assign. Only on `assign_team`.",
                                  "example": "team_01m8rzdgxqecrb411a33m7dten"
                                },
                                "tagId": {
                                  "type": "string",
                                  "description": "ID (TypeID) of the tag to add. Only on `add_tag`.",
                                  "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                                },
                                "priority": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "low",
                                    "medium",
                                    "high",
                                    "urgent"
                                  ],
                                  "description": "Priority to set. `none` clears it; `low`, `medium`, `high` and `urgent` go from lowest to highest. Only on `set_priority`.",
                                  "example": "high"
                                },
                                "preset": {
                                  "type": "string",
                                  "enum": [
                                    "until_reply",
                                    "tomorrow",
                                    "next_week"
                                  ],
                                  "description": "When the conversation wakes. `until_reply`: when the customer replies; `tomorrow`: 09:00 UTC the next day; `next_week`: 09:00 UTC seven days later. Only on `snooze`.",
                                  "example": "tomorrow"
                                },
                                "key": {
                                  "type": "string",
                                  "description": "Conversation attribute key. Only on `set_attribute`.",
                                  "example": "plan_tier"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Single value to set. Only on `set_attribute` with a non-list value; null unsets.",
                                  "example": "enterprise"
                                },
                                "values": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  },
                                  "description": "List value to set. Only on `set_attribute` with a list value, in place of `value`.",
                                  "example": [
                                    "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                                  ]
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "description": "One action the macro runs when applied."
                            },
                            "description": "Actions the macro runs when applied, in order."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "body",
                          "scope",
                          "actions"
                        ],
                        "description": "A macro: a saved reply with optional actions."
                      },
                      "description": "Macros, newest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsMacro",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Create a macro",
        "description": "Creates a macro: a saved reply with up to 20 actions to run when it's applied, created by the caller. An `assign_agent` action must name a current workspace member, `assign_team` a live team and `add_tag` a live tag. `set_attribute` keys and values aren't checked. Requires the `manage_settings` permission. Records a `macro.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Macro name, 1 to 80 characters after trimming.",
                    "example": "Password reset steps"
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "Reply text, 1 to 4,000 characters. `{firstName}`, `{lastName}`, `{email}` and `{conversationTitle}` are filled in when the macro is applied; any other `{word}` is removed.",
                    "example": "Hi {firstName}, you can reset your password from the sign-in page. Let me know if the link doesn't arrive."
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "support",
                      "feedback",
                      "both"
                    ],
                    "default": "support",
                    "description": "Where the macro is offered. `support`: the support inbox composer; `feedback`: the feedback surfaces; `both`: everywhere. Defaults to `support`.",
                    "example": "support"
                  },
                  "actions": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "assign_agent"
                              ],
                              "description": "Action type. `assign_agent`: assign the conversation to a teammate."
                            },
                            "principalId": {
                              "type": "string",
                              "description": "Principal ID of a current workspace member to assign. Accepts the TypeID or its UUID.",
                              "example": "principal_01m8rzdgxqecrb4117p85yxmdw"
                            }
                          },
                          "required": [
                            "type",
                            "principalId"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "assign_team"
                              ],
                              "description": "Action type. `assign_team`: assign the conversation to a team."
                            },
                            "teamId": {
                              "type": "string",
                              "description": "ID of a live team of this workspace. Accepts the TypeID or its UUID.",
                              "example": "team_01m8rzdgxqecrb411a33m7dten"
                            }
                          },
                          "required": [
                            "type",
                            "teamId"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "add_tag"
                              ],
                              "description": "Action type. `add_tag`: add a tag to the conversation."
                            },
                            "tagId": {
                              "type": "string",
                              "description": "ID of a live conversation tag of this workspace. Accepts the TypeID or its UUID.",
                              "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                            }
                          },
                          "required": [
                            "type",
                            "tagId"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "set_priority"
                              ],
                              "description": "Action type. `set_priority`: set the conversation's priority."
                            },
                            "priority": {
                              "type": "string",
                              "enum": [
                                "none",
                                "low",
                                "medium",
                                "high",
                                "urgent"
                              ],
                              "description": "Priority to set. `none` clears it; `low`, `medium`, `high` and `urgent` go from lowest to highest.",
                              "example": "high"
                            }
                          },
                          "required": [
                            "type",
                            "priority"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "snooze"
                              ],
                              "description": "Action type. `snooze`: snooze the conversation."
                            },
                            "preset": {
                              "type": "string",
                              "enum": [
                                "until_reply",
                                "tomorrow",
                                "next_week"
                              ],
                              "description": "When the conversation wakes. `until_reply`: when the customer replies; `tomorrow`: 09:00 UTC the next day; `next_week`: 09:00 UTC seven days later.",
                              "example": "tomorrow"
                            }
                          },
                          "required": [
                            "type",
                            "preset"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "close"
                              ],
                              "description": "Action type. `close`: close the conversation."
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "set_attribute"
                              ],
                              "description": "Action type. `set_attribute`: set a custom attribute on the conversation."
                            },
                            "key": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80,
                              "description": "Conversation attribute key to set, 1 to 80 characters. Not checked against the attribute definitions.",
                              "example": "plan_tier"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 1000
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "maxItems": 50
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Value to store: a string up to 1,000 characters, a number, a boolean, an array of up to 50 strings (up to 200 characters each), or null. Not checked against the attribute's field type.",
                              "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                            }
                          },
                          "required": [
                            "type",
                            "key",
                            "value"
                          ]
                        }
                      ],
                      "description": "One action the macro runs on the conversation it's applied to. `type` selects the action and its fields."
                    },
                    "maxItems": 20,
                    "default": [],
                    "description": "Actions to run, in order, when the macro is applied. Up to 20. Defaults to none."
                  }
                },
                "required": [
                  "name",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new macro",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Macro ID (TypeID).",
                      "example": "macro_01m8rzdgxqecrb410yhjewaqhc"
                    },
                    "name": {
                      "type": "string",
                      "description": "Macro name shown in the macro list and the composer picker.",
                      "example": "Password reset steps"
                    },
                    "body": {
                      "type": "string",
                      "description": "Reply text with optional `{firstName}`, `{lastName}`, `{email}` and `{conversationTitle}` variables, filled in when the macro is applied.",
                      "example": "Hi {firstName}, you can reset your password from the sign-in page. Let me know if the link doesn't arrive."
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "support",
                        "feedback",
                        "both"
                      ],
                      "description": "Where the macro is offered. `support`: the support inbox composer; `feedback`: the feedback surfaces; `both`: everywhere.",
                      "example": "support"
                    },
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "assign_agent",
                              "assign_team",
                              "add_tag",
                              "set_priority",
                              "snooze",
                              "close",
                              "set_attribute"
                            ],
                            "description": "Action type. `assign_agent`: assign a teammate (`principalId`); `assign_team`: assign a team (`teamId`); `add_tag`: add a tag (`tagId`); `set_priority`: set the priority (`priority`); `snooze`: snooze (`preset`); `close`: close the conversation; `set_attribute`: set a custom attribute (`key` with `value` or `values`).",
                            "example": "add_tag"
                          },
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID (TypeID) of the teammate to assign. Only on `assign_agent`.",
                            "example": "principal_01m8rzdgxqecrb4117p85yxmdw"
                          },
                          "teamId": {
                            "type": "string",
                            "description": "ID (TypeID) of the team to assign. Only on `assign_team`.",
                            "example": "team_01m8rzdgxqecrb411a33m7dten"
                          },
                          "tagId": {
                            "type": "string",
                            "description": "ID (TypeID) of the tag to add. Only on `add_tag`.",
                            "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                          },
                          "priority": {
                            "type": "string",
                            "enum": [
                              "none",
                              "low",
                              "medium",
                              "high",
                              "urgent"
                            ],
                            "description": "Priority to set. `none` clears it; `low`, `medium`, `high` and `urgent` go from lowest to highest. Only on `set_priority`.",
                            "example": "high"
                          },
                          "preset": {
                            "type": "string",
                            "enum": [
                              "until_reply",
                              "tomorrow",
                              "next_week"
                            ],
                            "description": "When the conversation wakes. `until_reply`: when the customer replies; `tomorrow`: 09:00 UTC the next day; `next_week`: 09:00 UTC seven days later. Only on `snooze`.",
                            "example": "tomorrow"
                          },
                          "key": {
                            "type": "string",
                            "description": "Conversation attribute key. Only on `set_attribute`.",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Single value to set. Only on `set_attribute` with a non-list value; null unsets.",
                            "example": "enterprise"
                          },
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "List value to set. Only on `set_attribute` with a list value, in place of `value`.",
                            "example": [
                              "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "description": "One action the macro runs when applied."
                      },
                      "description": "Actions the macro runs when applied, in order."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "body",
                    "scope",
                    "actions"
                  ],
                  "description": "A macro: a saved reply with optional actions."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A teammate, team or tag that an action names doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/macros/{macroId}": {
      "patch": {
        "operationId": "updateQuillsMacro",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Update a macro",
        "description": "Updates a macro's name, body, scope or actions. Send at least one field; omitted fields keep their value, and `actions` replaces the whole list. Actions are checked as on create. Requires the `manage_settings` permission. Records a `macro.updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Macro ID. Accepts the TypeID or its UUID. Deleted macros are not found.",
              "example": "macro_01m8rzdgxqecrb410yhjewaqhc"
            },
            "required": true,
            "description": "Macro ID. Accepts the TypeID or its UUID. Deleted macros are not found.",
            "name": "macroId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Macro name, 1 to 80 characters after trimming.",
                    "example": "Password reset steps"
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "Reply text, 1 to 4,000 characters. `{firstName}`, `{lastName}`, `{email}` and `{conversationTitle}` are filled in when the macro is applied; any other `{word}` is removed.",
                    "example": "Hi {firstName}, you can reset your password from the sign-in page. Let me know if the link doesn't arrive."
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "support",
                      "feedback",
                      "both"
                    ],
                    "description": "Where the macro is offered. `support`: the support inbox composer; `feedback`: the feedback surfaces; `both`: everywhere.",
                    "example": "both"
                  },
                  "actions": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "assign_agent"
                              ],
                              "description": "Action type. `assign_agent`: assign the conversation to a teammate."
                            },
                            "principalId": {
                              "type": "string",
                              "description": "Principal ID of a current workspace member to assign. Accepts the TypeID or its UUID.",
                              "example": "principal_01m8rzdgxqecrb4117p85yxmdw"
                            }
                          },
                          "required": [
                            "type",
                            "principalId"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "assign_team"
                              ],
                              "description": "Action type. `assign_team`: assign the conversation to a team."
                            },
                            "teamId": {
                              "type": "string",
                              "description": "ID of a live team of this workspace. Accepts the TypeID or its UUID.",
                              "example": "team_01m8rzdgxqecrb411a33m7dten"
                            }
                          },
                          "required": [
                            "type",
                            "teamId"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "add_tag"
                              ],
                              "description": "Action type. `add_tag`: add a tag to the conversation."
                            },
                            "tagId": {
                              "type": "string",
                              "description": "ID of a live conversation tag of this workspace. Accepts the TypeID or its UUID.",
                              "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                            }
                          },
                          "required": [
                            "type",
                            "tagId"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "set_priority"
                              ],
                              "description": "Action type. `set_priority`: set the conversation's priority."
                            },
                            "priority": {
                              "type": "string",
                              "enum": [
                                "none",
                                "low",
                                "medium",
                                "high",
                                "urgent"
                              ],
                              "description": "Priority to set. `none` clears it; `low`, `medium`, `high` and `urgent` go from lowest to highest.",
                              "example": "high"
                            }
                          },
                          "required": [
                            "type",
                            "priority"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "snooze"
                              ],
                              "description": "Action type. `snooze`: snooze the conversation."
                            },
                            "preset": {
                              "type": "string",
                              "enum": [
                                "until_reply",
                                "tomorrow",
                                "next_week"
                              ],
                              "description": "When the conversation wakes. `until_reply`: when the customer replies; `tomorrow`: 09:00 UTC the next day; `next_week`: 09:00 UTC seven days later.",
                              "example": "tomorrow"
                            }
                          },
                          "required": [
                            "type",
                            "preset"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "close"
                              ],
                              "description": "Action type. `close`: close the conversation."
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "set_attribute"
                              ],
                              "description": "Action type. `set_attribute`: set a custom attribute on the conversation."
                            },
                            "key": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80,
                              "description": "Conversation attribute key to set, 1 to 80 characters. Not checked against the attribute definitions.",
                              "example": "plan_tier"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 1000
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "maxItems": 50
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Value to store: a string up to 1,000 characters, a number, a boolean, an array of up to 50 strings (up to 200 characters each), or null. Not checked against the attribute's field type.",
                              "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                            }
                          },
                          "required": [
                            "type",
                            "key",
                            "value"
                          ]
                        }
                      ],
                      "description": "One action the macro runs on the conversation it's applied to. `type` selects the action and its fields."
                    },
                    "maxItems": 20,
                    "description": "New action list, up to 20, run in order when the macro is applied. Replaces every saved action; `[]` removes them all."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated macro",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Macro ID (TypeID).",
                      "example": "macro_01m8rzdgxqecrb410yhjewaqhc"
                    },
                    "name": {
                      "type": "string",
                      "description": "Macro name shown in the macro list and the composer picker.",
                      "example": "Password reset steps"
                    },
                    "body": {
                      "type": "string",
                      "description": "Reply text with optional `{firstName}`, `{lastName}`, `{email}` and `{conversationTitle}` variables, filled in when the macro is applied.",
                      "example": "Hi {firstName}, you can reset your password from the sign-in page. Let me know if the link doesn't arrive."
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "support",
                        "feedback",
                        "both"
                      ],
                      "description": "Where the macro is offered. `support`: the support inbox composer; `feedback`: the feedback surfaces; `both`: everywhere.",
                      "example": "support"
                    },
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "assign_agent",
                              "assign_team",
                              "add_tag",
                              "set_priority",
                              "snooze",
                              "close",
                              "set_attribute"
                            ],
                            "description": "Action type. `assign_agent`: assign a teammate (`principalId`); `assign_team`: assign a team (`teamId`); `add_tag`: add a tag (`tagId`); `set_priority`: set the priority (`priority`); `snooze`: snooze (`preset`); `close`: close the conversation; `set_attribute`: set a custom attribute (`key` with `value` or `values`).",
                            "example": "add_tag"
                          },
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID (TypeID) of the teammate to assign. Only on `assign_agent`.",
                            "example": "principal_01m8rzdgxqecrb4117p85yxmdw"
                          },
                          "teamId": {
                            "type": "string",
                            "description": "ID (TypeID) of the team to assign. Only on `assign_team`.",
                            "example": "team_01m8rzdgxqecrb411a33m7dten"
                          },
                          "tagId": {
                            "type": "string",
                            "description": "ID (TypeID) of the tag to add. Only on `add_tag`.",
                            "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                          },
                          "priority": {
                            "type": "string",
                            "enum": [
                              "none",
                              "low",
                              "medium",
                              "high",
                              "urgent"
                            ],
                            "description": "Priority to set. `none` clears it; `low`, `medium`, `high` and `urgent` go from lowest to highest. Only on `set_priority`.",
                            "example": "high"
                          },
                          "preset": {
                            "type": "string",
                            "enum": [
                              "until_reply",
                              "tomorrow",
                              "next_week"
                            ],
                            "description": "When the conversation wakes. `until_reply`: when the customer replies; `tomorrow`: 09:00 UTC the next day; `next_week`: 09:00 UTC seven days later. Only on `snooze`.",
                            "example": "tomorrow"
                          },
                          "key": {
                            "type": "string",
                            "description": "Conversation attribute key. Only on `set_attribute`.",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Single value to set. Only on `set_attribute` with a non-list value; null unsets.",
                            "example": "enterprise"
                          },
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "List value to set. Only on `set_attribute` with a list value, in place of `value`.",
                            "example": [
                              "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "description": "One action the macro runs when applied."
                      },
                      "description": "Actions the macro runs when applied, in order."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "body",
                    "scope",
                    "actions"
                  ],
                  "description": "A macro: a saved reply with optional actions."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The macro doesn't exist in this workspace or was deleted, or a teammate, team or tag that an action names doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsMacro",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Delete a macro",
        "description": "Deletes (soft-deletes) a macro: it leaves every list and can no longer be applied, and the row stays for attribution. Requires the `manage_settings` permission. Records a `macro.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Macro ID. Accepts the TypeID or its UUID. Deleted macros are not found.",
              "example": "macro_01m8rzdgxqecrb410yhjewaqhc"
            },
            "required": true,
            "description": "Macro ID. Accepts the TypeID or its UUID. Deleted macros are not found.",
            "name": "macroId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted macro's ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted macro (TypeID).",
                      "example": "macro_01m8rzdgxqecrb410yhjewaqhc"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The macro doesn't exist in this workspace or was already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/macros/{macroId}/apply": {
      "post": {
        "operationId": "applyQuillsMacro",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Apply a macro to a conversation",
        "description": "Renders the macro's body for a conversation and runs its actions on that conversation in one transaction. It doesn't send a reply: the rendered body is returned for the composer. Variables are filled from the conversation's customer: `{firstName}` is the first word of their name and `{lastName}` the rest, `{email}` is their email address (never a generated placeholder address), `{conversationTitle}` is the conversation's subject; a variable with no value, or an unknown `{word}`, becomes empty. Actions run in order and a later one wins on the same field: `snooze` sets the status to `snoozed` with its wake time, `close` sets it to `closed` and records the resolution time without checking attributes marked required to close, and `set_attribute` stores the value as given. An action whose teammate, team or tag no longer exists is skipped and not listed in `applied`. Requires the `update` permission. Records a `macro.applied` event with the conversation ID.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Macro ID. Accepts the TypeID or its UUID. Deleted macros are not found.",
              "example": "macro_01m8rzdgxqecrb410yhjewaqhc"
            },
            "required": true,
            "description": "Macro ID. Accepts the TypeID or its UUID. Deleted macros are not found.",
            "name": "macroId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationId": {
                    "type": "string",
                    "description": "ID of the conversation to apply the macro to. Accepts the TypeID or its UUID.",
                    "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                  }
                },
                "required": [
                  "conversationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The rendered body and the applied actions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "body": {
                      "type": "string",
                      "description": "The macro body with its variables filled in, ready to edit and send.",
                      "example": "Hi Ada, you can reset your password from the sign-in page. Let me know if the link doesn't arrive."
                    },
                    "applied": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Short human-readable line per action that ran, in order, such as `Assigned to team Billing`, `Tagged Refund`, `Priority set to high`, `Snoozed`, `Closed` or `Set plan_tier`.",
                      "example": [
                        "Tagged Billing",
                        "Priority set to high",
                        "Closed"
                      ]
                    }
                  },
                  "required": [
                    "body",
                    "applied"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The macro or the conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/sla-policies": {
      "get": {
        "operationId": "listQuillsSlaPolicies",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "List SLA policies, archived included",
        "description": "Lists the workspace's SLA policies, live and archived, newest first, up to 500. There is no paging. Each policy names the workflows that apply it. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The SLA policies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "SLA policy ID (TypeID).",
                            "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
                          },
                          "name": {
                            "type": "string",
                            "description": "Policy name.",
                            "example": "Enterprise priority"
                          },
                          "firstResponseTargetSecs": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Target time to the first teammate reply in a conversation, in seconds. Null: no target.",
                            "example": 3600
                          },
                          "nextResponseTargetSecs": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Target time to each next teammate reply after a customer message, in seconds. Null: no target.",
                            "example": 14400
                          },
                          "timeToCloseTargetSecs": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Target time to close the conversation, in seconds. Null: no target.",
                            "example": 172800
                          },
                          "timeToResolveTargetSecs": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Ticket target: seconds from the policy being applied to the ticket until the ticket reaches a `closed`-category status. Null: no target.",
                            "example": 259200
                          },
                          "pauseOnSnooze": {
                            "type": "boolean",
                            "description": "Whether the conversation clocks pause while the conversation is snoozed.",
                            "example": true
                          },
                          "pauseOnPending": {
                            "type": "boolean",
                            "description": "Whether the ticket time-to-resolve clock pauses while the ticket is in a `pending`-category status, such as waiting on the customer.",
                            "example": true
                          },
                          "officeHoursScheduleId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the office-hours schedule (TypeID) that the policy's clocks follow. Null: none.",
                            "example": null
                          },
                          "archivedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the policy was archived, in ISO 8601 UTC. Null while it's live.",
                            "example": null
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the policy was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the policy was last changed, archived or restored, in ISO 8601 UTC.",
                            "example": "2026-03-20T16:02:11.000Z"
                          },
                          "usedByWorkflows": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Workflow ID (TypeID).",
                                  "example": "workflow_01m8rzbes5fett3ws9s1avsngp"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Workflow name.",
                                  "example": "Route enterprise email"
                                },
                                "status": {
                                  "type": "string",
                                  "description": "Workflow status. `draft`: not running yet; `live`: running; `paused`: stopped for now.",
                                  "example": "live"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "status"
                              ]
                            },
                            "description": "Workflows, in any status, whose graph has an Apply SLA step for this policy. Deleted workflows are left out. Empty for a new policy."
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "firstResponseTargetSecs",
                          "nextResponseTargetSecs",
                          "timeToCloseTargetSecs",
                          "timeToResolveTargetSecs",
                          "pauseOnSnooze",
                          "pauseOnPending",
                          "officeHoursScheduleId",
                          "archivedAt",
                          "createdAt",
                          "updatedAt",
                          "usedByWorkflows"
                        ]
                      },
                      "description": "SLA policies, newest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsSlaPolicy",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Create an SLA policy",
        "description": "Creates a live SLA policy. Set at least one target. `pauseOnSnooze` and `pauseOnPending` default to true. Requires the `manage_settings` permission. Records an `sla_policy.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Policy name, 1 to 120 characters after trimming.",
                    "example": "Enterprise priority"
                  },
                  "firstResponseTargetSecs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "exclusiveMinimum": 0,
                    "maximum": 31536000,
                    "description": "Target time to the first teammate reply in a conversation, in seconds. From 1 to 31,536,000 (365 days). Null or omitted on create: no target. On update, omit to keep the current value; a set target can be changed but not cleared.",
                    "example": 3600
                  },
                  "nextResponseTargetSecs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "exclusiveMinimum": 0,
                    "maximum": 31536000,
                    "description": "Target time to each next teammate reply after a customer message, in seconds. From 1 to 31,536,000 (365 days). Null or omitted on create: no target. On update, omit to keep the current value; a set target can be changed but not cleared.",
                    "example": 14400
                  },
                  "timeToCloseTargetSecs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "exclusiveMinimum": 0,
                    "maximum": 31536000,
                    "description": "Target time to close the conversation, in seconds. From 1 to 31,536,000 (365 days). Null or omitted on create: no target. On update, omit to keep the current value; a set target can be changed but not cleared.",
                    "example": 172800
                  },
                  "timeToResolveTargetSecs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "exclusiveMinimum": 0,
                    "maximum": 31536000,
                    "description": "Ticket target: seconds from the policy being applied to the ticket until it reaches a `closed`-category status. From 1 to 31,536,000 (365 days). Null or omitted on create: no target. On update, omit to keep the current value; a set target can be changed but not cleared.",
                    "example": 259200
                  },
                  "pauseOnSnooze": {
                    "type": "boolean",
                    "description": "Whether the conversation clocks pause while the conversation is snoozed. Defaults to true on create; omit on update to keep the current value.",
                    "example": true
                  },
                  "pauseOnPending": {
                    "type": "boolean",
                    "description": "Whether the ticket time-to-resolve clock pauses while the ticket is in a `pending`-category status. Defaults to true on create; omit on update to keep the current value.",
                    "example": true
                  },
                  "officeHoursScheduleId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ID of an existing office-hours schedule for the policy's clocks. Accepts the TypeID or its UUID. Null: none. Omitted on create: none; on update: keeps the current schedule.",
                    "example": "office_hours_01m8rzbes5fett3ws79xsvk7x2"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new SLA policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "SLA policy ID (TypeID).",
                      "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
                    },
                    "name": {
                      "type": "string",
                      "description": "Policy name.",
                      "example": "Enterprise priority"
                    },
                    "firstResponseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to the first teammate reply in a conversation, in seconds. Null: no target.",
                      "example": 3600
                    },
                    "nextResponseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to each next teammate reply after a customer message, in seconds. Null: no target.",
                      "example": 14400
                    },
                    "timeToCloseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to close the conversation, in seconds. Null: no target.",
                      "example": 172800
                    },
                    "timeToResolveTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Ticket target: seconds from the policy being applied to the ticket until the ticket reaches a `closed`-category status. Null: no target.",
                      "example": 259200
                    },
                    "pauseOnSnooze": {
                      "type": "boolean",
                      "description": "Whether the conversation clocks pause while the conversation is snoozed.",
                      "example": true
                    },
                    "pauseOnPending": {
                      "type": "boolean",
                      "description": "Whether the ticket time-to-resolve clock pauses while the ticket is in a `pending`-category status, such as waiting on the customer.",
                      "example": true
                    },
                    "officeHoursScheduleId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the office-hours schedule (TypeID) that the policy's clocks follow. Null: none.",
                      "example": null
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the policy was archived, in ISO 8601 UTC. Null while it's live.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the policy was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the policy was last changed, archived or restored, in ISO 8601 UTC.",
                      "example": "2026-03-20T16:02:11.000Z"
                    },
                    "usedByWorkflows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Workflow ID (TypeID).",
                            "example": "workflow_01m8rzbes5fett3ws9s1avsngp"
                          },
                          "name": {
                            "type": "string",
                            "description": "Workflow name.",
                            "example": "Route enterprise email"
                          },
                          "status": {
                            "type": "string",
                            "description": "Workflow status. `draft`: not running yet; `live`: running; `paused`: stopped for now.",
                            "example": "live"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "status"
                        ]
                      },
                      "description": "Workflows, in any status, whose graph has an Apply SLA step for this policy. Deleted workflows are left out. Empty for a new policy."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "firstResponseTargetSecs",
                    "nextResponseTargetSecs",
                    "timeToCloseTargetSecs",
                    "timeToResolveTargetSecs",
                    "pauseOnSnooze",
                    "pauseOnPending",
                    "officeHoursScheduleId",
                    "archivedAt",
                    "createdAt",
                    "updatedAt",
                    "usedByWorkflows"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Office-hours schedule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/sla-policies/options": {
      "get": {
        "operationId": "listQuillsSlaPolicyOptions",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "List live SLA policies for a picker",
        "description": "Lists the live (not archived) SLA policies for a policy picker, newest first, up to 500, each with a short summary of its targets. There is no paging. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The live SLA policies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "SLA policy ID (TypeID).",
                            "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
                          },
                          "name": {
                            "type": "string",
                            "description": "Policy name.",
                            "example": "Enterprise priority"
                          },
                          "targetsSummary": {
                            "type": "string",
                            "description": "Short summary of the set targets, in the order first response, next response, close, resolve, joined by ` · `. Each duration uses the largest unit that divides it evenly (`d`, `h`, `m` or `s`), so 5,400 seconds reads `90m`. `No targets` when none is set.",
                            "example": "First response 1h · Close 2d"
                          },
                          "hasTimeToResolveTarget": {
                            "type": "boolean",
                            "description": "Whether the policy has a ticket time-to-resolve target.",
                            "example": false
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "targetsSummary",
                          "hasTimeToResolveTarget"
                        ]
                      },
                      "description": "Live SLA policies, newest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/sla-policies/office-hours": {
      "get": {
        "operationId": "getQuillsSlaOfficeHours",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Get whether the workspace office hours are on",
        "description": "Returns whether the workspace office hours (`GET /support/office-hours`) are turned on, for the SLA policy editor. A stored value without `enabled: true` reads as off. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The office-hours state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "officeHoursEnabled": {
                      "type": "boolean",
                      "description": "Whether the workspace office hours are turned on.",
                      "example": true
                    }
                  },
                  "required": [
                    "officeHoursEnabled"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/sla-policies/{slaPolicyId}": {
      "patch": {
        "operationId": "updateQuillsSlaPolicy",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Update an SLA policy",
        "description": "Updates a live SLA policy; send at least one field, and omitted fields keep their values. Targets can be added or changed, never removed once set. Changes apply to conversations and tickets that get the policy later. Requires the `manage_settings` permission. Records an `sla_policy.updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "SLA policy ID. Accepts the TypeID or its UUID.",
              "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
            },
            "required": true,
            "description": "SLA policy ID. Accepts the TypeID or its UUID.",
            "name": "slaPolicyId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Policy name, 1 to 120 characters after trimming.",
                    "example": "Enterprise priority"
                  },
                  "firstResponseTargetSecs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "exclusiveMinimum": 0,
                    "maximum": 31536000,
                    "description": "Target time to the first teammate reply in a conversation, in seconds. From 1 to 31,536,000 (365 days). Null or omitted on create: no target. On update, omit to keep the current value; a set target can be changed but not cleared.",
                    "example": 3600
                  },
                  "nextResponseTargetSecs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "exclusiveMinimum": 0,
                    "maximum": 31536000,
                    "description": "Target time to each next teammate reply after a customer message, in seconds. From 1 to 31,536,000 (365 days). Null or omitted on create: no target. On update, omit to keep the current value; a set target can be changed but not cleared.",
                    "example": 14400
                  },
                  "timeToCloseTargetSecs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "exclusiveMinimum": 0,
                    "maximum": 31536000,
                    "description": "Target time to close the conversation, in seconds. From 1 to 31,536,000 (365 days). Null or omitted on create: no target. On update, omit to keep the current value; a set target can be changed but not cleared.",
                    "example": 172800
                  },
                  "timeToResolveTargetSecs": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "exclusiveMinimum": 0,
                    "maximum": 31536000,
                    "description": "Ticket target: seconds from the policy being applied to the ticket until it reaches a `closed`-category status. From 1 to 31,536,000 (365 days). Null or omitted on create: no target. On update, omit to keep the current value; a set target can be changed but not cleared.",
                    "example": 259200
                  },
                  "pauseOnSnooze": {
                    "type": "boolean",
                    "description": "Whether the conversation clocks pause while the conversation is snoozed. Defaults to true on create; omit on update to keep the current value.",
                    "example": true
                  },
                  "pauseOnPending": {
                    "type": "boolean",
                    "description": "Whether the ticket time-to-resolve clock pauses while the ticket is in a `pending`-category status. Defaults to true on create; omit on update to keep the current value.",
                    "example": true
                  },
                  "officeHoursScheduleId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ID of an existing office-hours schedule for the policy's clocks. Accepts the TypeID or its UUID. Null: none. Omitted on create: none; on update: keeps the current schedule.",
                    "example": "office_hours_01m8rzbes5fett3ws79xsvk7x2"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The SLA policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "SLA policy ID (TypeID).",
                      "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
                    },
                    "name": {
                      "type": "string",
                      "description": "Policy name.",
                      "example": "Enterprise priority"
                    },
                    "firstResponseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to the first teammate reply in a conversation, in seconds. Null: no target.",
                      "example": 3600
                    },
                    "nextResponseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to each next teammate reply after a customer message, in seconds. Null: no target.",
                      "example": 14400
                    },
                    "timeToCloseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to close the conversation, in seconds. Null: no target.",
                      "example": 172800
                    },
                    "timeToResolveTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Ticket target: seconds from the policy being applied to the ticket until the ticket reaches a `closed`-category status. Null: no target.",
                      "example": 259200
                    },
                    "pauseOnSnooze": {
                      "type": "boolean",
                      "description": "Whether the conversation clocks pause while the conversation is snoozed.",
                      "example": true
                    },
                    "pauseOnPending": {
                      "type": "boolean",
                      "description": "Whether the ticket time-to-resolve clock pauses while the ticket is in a `pending`-category status, such as waiting on the customer.",
                      "example": true
                    },
                    "officeHoursScheduleId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the office-hours schedule (TypeID) that the policy's clocks follow. Null: none.",
                      "example": null
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the policy was archived, in ISO 8601 UTC. Null while it's live.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the policy was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the policy was last changed, archived or restored, in ISO 8601 UTC.",
                      "example": "2026-03-20T16:02:11.000Z"
                    },
                    "usedByWorkflows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Workflow ID (TypeID).",
                            "example": "workflow_01m8rzbes5fett3ws9s1avsngp"
                          },
                          "name": {
                            "type": "string",
                            "description": "Workflow name.",
                            "example": "Route enterprise email"
                          },
                          "status": {
                            "type": "string",
                            "description": "Workflow status. `draft`: not running yet; `live`: running; `paused`: stopped for now.",
                            "example": "live"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "status"
                        ]
                      },
                      "description": "Workflows, in any status, whose graph has an Apply SLA step for this policy. Deleted workflows are left out. Empty for a new policy."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "firstResponseTargetSecs",
                    "nextResponseTargetSecs",
                    "timeToCloseTargetSecs",
                    "timeToResolveTargetSecs",
                    "pauseOnSnooze",
                    "pauseOnPending",
                    "officeHoursScheduleId",
                    "archivedAt",
                    "createdAt",
                    "updatedAt",
                    "usedByWorkflows"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "SLA policy not found or archived, or office-hours schedule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Targets can be changed but not removed once set: the body sets a target that has a value to null",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/sla-policies/{slaPolicyId}/archive": {
      "post": {
        "operationId": "archiveQuillsSlaPolicy",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Archive an SLA policy",
        "description": "Archives a live SLA policy: it leaves the picker list and can no longer be set as the default. Refused (409) while a live workflow applies it. Conversations and tickets that have it keep it, and archiving the default policy doesn't clear the default. Requires the `manage_settings` permission. Records an `sla_policy.archived` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "SLA policy ID. Accepts the TypeID or its UUID.",
              "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
            },
            "required": true,
            "description": "SLA policy ID. Accepts the TypeID or its UUID.",
            "name": "slaPolicyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The archived SLA policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "SLA policy ID (TypeID).",
                      "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
                    },
                    "name": {
                      "type": "string",
                      "description": "Policy name.",
                      "example": "Enterprise priority"
                    },
                    "firstResponseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to the first teammate reply in a conversation, in seconds. Null: no target.",
                      "example": 3600
                    },
                    "nextResponseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to each next teammate reply after a customer message, in seconds. Null: no target.",
                      "example": 14400
                    },
                    "timeToCloseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to close the conversation, in seconds. Null: no target.",
                      "example": 172800
                    },
                    "timeToResolveTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Ticket target: seconds from the policy being applied to the ticket until the ticket reaches a `closed`-category status. Null: no target.",
                      "example": 259200
                    },
                    "pauseOnSnooze": {
                      "type": "boolean",
                      "description": "Whether the conversation clocks pause while the conversation is snoozed.",
                      "example": true
                    },
                    "pauseOnPending": {
                      "type": "boolean",
                      "description": "Whether the ticket time-to-resolve clock pauses while the ticket is in a `pending`-category status, such as waiting on the customer.",
                      "example": true
                    },
                    "officeHoursScheduleId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the office-hours schedule (TypeID) that the policy's clocks follow. Null: none.",
                      "example": null
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the policy was archived, in ISO 8601 UTC. Null while it's live.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the policy was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the policy was last changed, archived or restored, in ISO 8601 UTC.",
                      "example": "2026-03-20T16:02:11.000Z"
                    },
                    "usedByWorkflows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Workflow ID (TypeID).",
                            "example": "workflow_01m8rzbes5fett3ws9s1avsngp"
                          },
                          "name": {
                            "type": "string",
                            "description": "Workflow name.",
                            "example": "Route enterprise email"
                          },
                          "status": {
                            "type": "string",
                            "description": "Workflow status. `draft`: not running yet; `live`: running; `paused`: stopped for now.",
                            "example": "live"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "status"
                        ]
                      },
                      "description": "Workflows, in any status, whose graph has an Apply SLA step for this policy. Deleted workflows are left out. Empty for a new policy."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "firstResponseTargetSecs",
                    "nextResponseTargetSecs",
                    "timeToCloseTargetSecs",
                    "timeToResolveTargetSecs",
                    "pauseOnSnooze",
                    "pauseOnPending",
                    "officeHoursScheduleId",
                    "archivedAt",
                    "createdAt",
                    "updatedAt",
                    "usedByWorkflows"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "SLA policy not found or already archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Live workflows apply this policy; the message names them",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/sla-policies/{slaPolicyId}/restore": {
      "post": {
        "operationId": "restoreQuillsSlaPolicy",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Restore an archived SLA policy",
        "description": "Restores an archived SLA policy so it is live again. Requires the `manage_settings` permission. Records an `sla_policy.restored` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "SLA policy ID. Accepts the TypeID or its UUID.",
              "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
            },
            "required": true,
            "description": "SLA policy ID. Accepts the TypeID or its UUID.",
            "name": "slaPolicyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored SLA policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "SLA policy ID (TypeID).",
                      "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
                    },
                    "name": {
                      "type": "string",
                      "description": "Policy name.",
                      "example": "Enterprise priority"
                    },
                    "firstResponseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to the first teammate reply in a conversation, in seconds. Null: no target.",
                      "example": 3600
                    },
                    "nextResponseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to each next teammate reply after a customer message, in seconds. Null: no target.",
                      "example": 14400
                    },
                    "timeToCloseTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Target time to close the conversation, in seconds. Null: no target.",
                      "example": 172800
                    },
                    "timeToResolveTargetSecs": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Ticket target: seconds from the policy being applied to the ticket until the ticket reaches a `closed`-category status. Null: no target.",
                      "example": 259200
                    },
                    "pauseOnSnooze": {
                      "type": "boolean",
                      "description": "Whether the conversation clocks pause while the conversation is snoozed.",
                      "example": true
                    },
                    "pauseOnPending": {
                      "type": "boolean",
                      "description": "Whether the ticket time-to-resolve clock pauses while the ticket is in a `pending`-category status, such as waiting on the customer.",
                      "example": true
                    },
                    "officeHoursScheduleId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the office-hours schedule (TypeID) that the policy's clocks follow. Null: none.",
                      "example": null
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the policy was archived, in ISO 8601 UTC. Null while it's live.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the policy was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the policy was last changed, archived or restored, in ISO 8601 UTC.",
                      "example": "2026-03-20T16:02:11.000Z"
                    },
                    "usedByWorkflows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Workflow ID (TypeID).",
                            "example": "workflow_01m8rzbes5fett3ws9s1avsngp"
                          },
                          "name": {
                            "type": "string",
                            "description": "Workflow name.",
                            "example": "Route enterprise email"
                          },
                          "status": {
                            "type": "string",
                            "description": "Workflow status. `draft`: not running yet; `live`: running; `paused`: stopped for now.",
                            "example": "live"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "status"
                        ]
                      },
                      "description": "Workflows, in any status, whose graph has an Apply SLA step for this policy. Deleted workflows are left out. Empty for a new policy."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "firstResponseTargetSecs",
                    "nextResponseTargetSecs",
                    "timeToCloseTargetSecs",
                    "timeToResolveTargetSecs",
                    "pauseOnSnooze",
                    "pauseOnPending",
                    "officeHoursScheduleId",
                    "archivedAt",
                    "createdAt",
                    "updatedAt",
                    "usedByWorkflows"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "SLA policy not found or not archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/default-sla-policy": {
      "get": {
        "operationId": "getQuillsDefaultSlaPolicy",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the default SLA policy",
        "description": "Returns the workspace's default SLA policy, meant for new conversations that no workflow gives a policy. `policyId` is null when none is set. The ID is returned as stored, even if that policy was archived later. The default is stored only: nothing currently applies it to conversations automatically. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The default SLA policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policyId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the default SLA policy (TypeID). Null when no default is set.",
                      "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
                    }
                  },
                  "required": [
                    "policyId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsDefaultSlaPolicy",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Set the default SLA policy",
        "description": "Sets or clears the workspace's default SLA policy and returns it. The policy must be live. The default is stored only: nothing currently applies it to conversations automatically. Requires the `manage_settings` permission. Records a `settings.default_sla_policy_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policyId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "ID of a live SLA policy to make the default. Accepts the TypeID or its UUID. Null clears the default.",
                    "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
                  }
                },
                "required": [
                  "policyId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The default SLA policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policyId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the default SLA policy (TypeID). Null when no default is set.",
                      "example": "sla_policy_01m8rzbes4fett3wrywmap3pfd"
                    }
                  },
                  "required": [
                    "policyId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "SLA policy not found or archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored workspace settings are not a JSON object; they were left unchanged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/office-hours": {
      "get": {
        "operationId": "getQuillsOfficeHours",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the workspace office hours",
        "description": "Returns the workspace office hours. With `enabled` false the team always counts as open. Unset, or a stored schedule that no longer validates, reads as the default: off, `UTC`, no intervals and no holidays. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The office hours",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether office hours are on. False means the team always counts as open, whatever the intervals say.",
                      "example": true
                    },
                    "timezone": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "description": "IANA time zone that the intervals and holidays are read in, up to 64 characters. Reads as `UTC` while office hours were never set.",
                      "example": "America/New_York"
                    },
                    "intervals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "day": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 6,
                            "description": "Day of the week the interval starts on, from 0 (Sunday) to 6 (Saturday).",
                            "example": 1
                          },
                          "start": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                            "description": "Local opening time in 24-hour `HH:MM` form. The team is open from this minute on.",
                            "example": "09:00"
                          },
                          "end": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                            "description": "Local closing time in 24-hour `HH:MM` form. The team is closed from this minute on. Must differ from `start`; an end before the start runs past midnight into the next day.",
                            "example": "17:30"
                          }
                        },
                        "required": [
                          "day",
                          "start",
                          "end"
                        ]
                      },
                      "maxItems": 50,
                      "description": "Weekly open intervals, up to 50. The team is open while any interval covers the current local time. With office hours on and no intervals, the team always counts as closed."
                    },
                    "holidays": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
                            "description": "Date the team is closed all day, as `YYYY-MM-DD` in the office-hours time zone.",
                            "example": "2026-12-25"
                          },
                          "name": {
                            "type": "string",
                            "maxLength": 100,
                            "description": "Label of the holiday, up to 100 characters. Absent when not set.",
                            "example": "Christmas Day"
                          },
                          "recurringAnnual": {
                            "type": "boolean",
                            "default": false,
                            "description": "Whether the holiday repeats on the same month and day every year. Defaults to false.",
                            "example": true
                          }
                        },
                        "required": [
                          "date"
                        ]
                      },
                      "maxItems": 100,
                      "default": [],
                      "description": "Days the team is closed, up to 100. They override the intervals. Defaults to an empty list."
                    }
                  },
                  "required": [
                    "enabled",
                    "timezone",
                    "intervals"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsOfficeHours",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Set the workspace office hours",
        "description": "Replaces the workspace office hours and returns what was stored. The team availability that the widget and the portal show (`withinOfficeHours`, `nextOpenAt`) and the away reply follow these hours. Requires the `manage_settings` permission. Records a `settings.office_hours_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether office hours are on. False means the team always counts as open, whatever the intervals say.",
                    "example": true
                  },
                  "timezone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "IANA time zone that the intervals and holidays are read in, up to 64 characters. Reads as `UTC` while office hours were never set.",
                    "example": "America/New_York"
                  },
                  "intervals": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "day": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 6,
                          "description": "Day of the week the interval starts on, from 0 (Sunday) to 6 (Saturday).",
                          "example": 1
                        },
                        "start": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                          "description": "Local opening time in 24-hour `HH:MM` form. The team is open from this minute on.",
                          "example": "09:00"
                        },
                        "end": {
                          "type": "string",
                          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                          "description": "Local closing time in 24-hour `HH:MM` form. The team is closed from this minute on. Must differ from `start`; an end before the start runs past midnight into the next day.",
                          "example": "17:30"
                        }
                      },
                      "required": [
                        "day",
                        "start",
                        "end"
                      ]
                    },
                    "maxItems": 50,
                    "description": "Weekly open intervals, up to 50. The team is open while any interval covers the current local time. With office hours on and no intervals, the team always counts as closed."
                  },
                  "holidays": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
                          "description": "Date the team is closed all day, as `YYYY-MM-DD` in the office-hours time zone.",
                          "example": "2026-12-25"
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 100,
                          "description": "Label of the holiday, up to 100 characters. Absent when not set.",
                          "example": "Christmas Day"
                        },
                        "recurringAnnual": {
                          "type": "boolean",
                          "default": false,
                          "description": "Whether the holiday repeats on the same month and day every year. Defaults to false.",
                          "example": true
                        }
                      },
                      "required": [
                        "date"
                      ]
                    },
                    "maxItems": 100,
                    "default": [],
                    "description": "Days the team is closed, up to 100. They override the intervals. Defaults to an empty list."
                  }
                },
                "required": [
                  "enabled",
                  "timezone",
                  "intervals"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The office hours",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether office hours are on. False means the team always counts as open, whatever the intervals say.",
                      "example": true
                    },
                    "timezone": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "description": "IANA time zone that the intervals and holidays are read in, up to 64 characters. Reads as `UTC` while office hours were never set.",
                      "example": "America/New_York"
                    },
                    "intervals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "day": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 6,
                            "description": "Day of the week the interval starts on, from 0 (Sunday) to 6 (Saturday).",
                            "example": 1
                          },
                          "start": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                            "description": "Local opening time in 24-hour `HH:MM` form. The team is open from this minute on.",
                            "example": "09:00"
                          },
                          "end": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                            "description": "Local closing time in 24-hour `HH:MM` form. The team is closed from this minute on. Must differ from `start`; an end before the start runs past midnight into the next day.",
                            "example": "17:30"
                          }
                        },
                        "required": [
                          "day",
                          "start",
                          "end"
                        ]
                      },
                      "maxItems": 50,
                      "description": "Weekly open intervals, up to 50. The team is open while any interval covers the current local time. With office hours on and no intervals, the team always counts as closed."
                    },
                    "holidays": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
                            "description": "Date the team is closed all day, as `YYYY-MM-DD` in the office-hours time zone.",
                            "example": "2026-12-25"
                          },
                          "name": {
                            "type": "string",
                            "maxLength": 100,
                            "description": "Label of the holiday, up to 100 characters. Absent when not set.",
                            "example": "Christmas Day"
                          },
                          "recurringAnnual": {
                            "type": "boolean",
                            "default": false,
                            "description": "Whether the holiday repeats on the same month and day every year. Defaults to false.",
                            "example": true
                          }
                        },
                        "required": [
                          "date"
                        ]
                      },
                      "maxItems": 100,
                      "default": [],
                      "description": "Days the team is closed, up to 100. They override the intervals. Defaults to an empty list."
                    }
                  },
                  "required": [
                    "enabled",
                    "timezone",
                    "intervals"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/routing": {
      "get": {
        "operationId": "getQuillsConversationRouting",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the conversation routing settings",
        "description": "Returns the conversation routing setting. A stored value without `enabled: true` reads as off. The setting is stored only: no routing job currently acts on it. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The routing settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether automatic conversation routing is on. Reads as false until it is set.",
                      "example": false
                    },
                    "strategy": {
                      "type": "string",
                      "enum": [
                        "auto_assign_active"
                      ],
                      "description": "Routing strategy. `auto_assign_active` (assign new conversations to active teammates) is the only value.",
                      "example": "auto_assign_active"
                    }
                  },
                  "required": [
                    "enabled",
                    "strategy"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsConversationRouting",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Set the conversation routing settings",
        "description": "Turns conversation routing on or off and returns the stored setting. `strategy` must be `auto_assign_active`, the only strategy. The setting is stored only: no routing job currently acts on it. Requires the `manage_settings` permission. Records a `settings.conversation_routing_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether automatic conversation routing is on. Reads as false until it is set.",
                    "example": false
                  },
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "auto_assign_active"
                    ],
                    "description": "Routing strategy. `auto_assign_active` (assign new conversations to active teammates) is the only value.",
                    "example": "auto_assign_active"
                  }
                },
                "required": [
                  "enabled",
                  "strategy"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The routing settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether automatic conversation routing is on. Reads as false until it is set.",
                      "example": false
                    },
                    "strategy": {
                      "type": "string",
                      "enum": [
                        "auto_assign_active"
                      ],
                      "description": "Routing strategy. `auto_assign_active` (assign new conversations to active teammates) is the only value.",
                      "example": "auto_assign_active"
                    }
                  },
                  "required": [
                    "enabled",
                    "strategy"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-auto-ack": {
      "get": {
        "operationId": "getQuillsEmailAutoAck",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the email auto-acknowledgement setting",
        "description": "Returns the email auto-acknowledgement setting. Unset reads as off with the defaults. A stored value that no longer validates reads as the defaults, keeping only whether it was on. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The auto-acknowledgement setting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "default": false,
                      "description": "Whether email auto-acknowledgement is on. Defaults to false. While on, a customer's email in an open email conversation can get an automatic acknowledgement email.",
                      "example": true
                    },
                    "delaySeconds": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 600,
                      "default": 30,
                      "description": "Seconds to wait after the customer's email arrives before sending, from 0 to 600. Defaults to 30. Nothing is sent if a teammate replies in the meantime.",
                      "example": 30
                    },
                    "skipIfMedianUnderMinutes": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 60,
                      "default": 5,
                      "description": "Threshold in minutes, from 0 to 60. Defaults to 5. Nothing is sent while the workspace's median first-response time over the last 30 days is below it. 0 never skips; with fewer than 3 answered conversations in that period, nothing is skipped either.",
                      "example": 5
                    },
                    "includeWaitEstimate": {
                      "type": "boolean",
                      "default": true,
                      "description": "Whether the email states the estimated response time, a range based on first-response times over the last 30 days. Left out while there is too little data. Defaults to true.",
                      "example": true
                    },
                    "includeKbSuggestions": {
                      "type": "boolean",
                      "default": true,
                      "description": "Whether the email lists up to 3 published help center articles that match the email's subject and text. Defaults to true.",
                      "example": true
                    },
                    "maxPerConversation": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 5,
                      "default": 3,
                      "description": "Maximum number of acknowledgements one conversation gets in a 30-day window, from 1 to 5. Defaults to 3.",
                      "example": 3
                    },
                    "customMessage": {
                      "type": "string",
                      "maxLength": 1000,
                      "description": "Opening text of the email, up to 1,000 characters after trimming. Absent or blank: a standard thank-you line that names the workspace.",
                      "example": "Thanks for contacting Acme Support. We've got your message and will get back to you soon."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsEmailAutoAck",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Set the email auto-acknowledgement setting",
        "description": "Updates the email auto-acknowledgement setting and returns the stored result. `enabled` is required; each omitted field keeps its current value. While on, each customer email in an open email conversation queues an acknowledgement email that goes out after `delaySeconds`, unless by then a teammate has replied, the median first-response time is under `skipIfMedianUnderMinutes`, the conversation already got `maxPerConversation` acknowledgements in 30 days, or the customer got 10 in the last hour. Automated or forwarded mail, spam and closed conversations get none. Requires the `manage_settings` permission. Records a `settings.email_auto_ack_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether email auto-acknowledgement is on. Required.",
                    "example": true
                  },
                  "delaySeconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 600,
                    "description": "Seconds to wait after the customer's email arrives before sending, from 0 to 600. Omit to keep the current value.",
                    "example": 60
                  },
                  "skipIfMedianUnderMinutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 60,
                    "description": "Median first-response time, in minutes from 0 to 60, under which nothing is sent. 0 never skips. Omit to keep the current value.",
                    "example": 5
                  },
                  "includeWaitEstimate": {
                    "type": "boolean",
                    "description": "Whether the email states the estimated response time. Omit to keep the current value.",
                    "example": true
                  },
                  "includeKbSuggestions": {
                    "type": "boolean",
                    "description": "Whether the email lists matching help center articles. Omit to keep the current value.",
                    "example": false
                  },
                  "maxPerConversation": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 5,
                    "description": "Maximum number of acknowledgements one conversation gets in a 30-day window, from 1 to 5. Omit to keep the current value.",
                    "example": 2
                  },
                  "customMessage": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Opening text of the email, up to 1,000 characters after trimming. Omit to keep the current text; send an empty string to go back to the standard line.",
                    "example": "Thanks for contacting Acme Support. We've got your message and will get back to you soon."
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The auto-acknowledgement setting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "default": false,
                      "description": "Whether email auto-acknowledgement is on. Defaults to false. While on, a customer's email in an open email conversation can get an automatic acknowledgement email.",
                      "example": true
                    },
                    "delaySeconds": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 600,
                      "default": 30,
                      "description": "Seconds to wait after the customer's email arrives before sending, from 0 to 600. Defaults to 30. Nothing is sent if a teammate replies in the meantime.",
                      "example": 30
                    },
                    "skipIfMedianUnderMinutes": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 60,
                      "default": 5,
                      "description": "Threshold in minutes, from 0 to 60. Defaults to 5. Nothing is sent while the workspace's median first-response time over the last 30 days is below it. 0 never skips; with fewer than 3 answered conversations in that period, nothing is skipped either.",
                      "example": 5
                    },
                    "includeWaitEstimate": {
                      "type": "boolean",
                      "default": true,
                      "description": "Whether the email states the estimated response time, a range based on first-response times over the last 30 days. Left out while there is too little data. Defaults to true.",
                      "example": true
                    },
                    "includeKbSuggestions": {
                      "type": "boolean",
                      "default": true,
                      "description": "Whether the email lists up to 3 published help center articles that match the email's subject and text. Defaults to true.",
                      "example": true
                    },
                    "maxPerConversation": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 5,
                      "default": 3,
                      "description": "Maximum number of acknowledgements one conversation gets in a 30-day window, from 1 to 5. Defaults to 3.",
                      "example": 3
                    },
                    "customMessage": {
                      "type": "string",
                      "maxLength": 1000,
                      "description": "Opening text of the email, up to 1,000 characters after trimming. Absent or blank: a standard thank-you line that names the workspace.",
                      "example": "Thanks for contacting Acme Support. We've got your message and will get back to you soon."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/away-reply": {
      "get": {
        "operationId": "getQuillsAwayReply",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the away reply",
        "description": "Returns the away reply: the automatic answer to a customer who writes in a widget or portal conversation while no teammate is online or outside office hours. Unset, or a stored value that no longer validates, reads as the default: off, with a standard message. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The away reply",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the away reply is on. Off by default. While on, a customer message in a widget or portal conversation gets the reply when no teammate is online or it's outside office hours.",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "Text of the automatic answer, posted in the conversation as a system notice. Trimmed; 1 to 1,000 characters. The default reads \"Thanks for your message. The team is away right now and will reply as soon as they are back.\"",
                      "example": "Thanks for writing in. We're offline right now and will reply when we're back at 9:00 ET."
                    }
                  },
                  "required": [
                    "enabled",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsAwayReply",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Set the away reply",
        "description": "Replaces the away reply and returns it. While enabled, a customer message in a widget or portal conversation gets this answer as a system notice when no teammate is online or it is outside office hours, at most once every 12 hours per conversation. A new conversation closed as spam gets none. Requires the `manage_settings` permission. Records a `settings.away_reply_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether the away reply is on. Off by default. While on, a customer message in a widget or portal conversation gets the reply when no teammate is online or it's outside office hours.",
                    "example": true
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "Text of the automatic answer, posted in the conversation as a system notice. Trimmed; 1 to 1,000 characters. The default reads \"Thanks for your message. The team is away right now and will reply as soon as they are back.\"",
                    "example": "Thanks for writing in. We're offline right now and will reply when we're back at 9:00 ET."
                  }
                },
                "required": [
                  "enabled",
                  "message"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The away reply",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the away reply is on. Off by default. While on, a customer message in a widget or portal conversation gets the reply when no teammate is online or it's outside office hours.",
                      "example": true
                    },
                    "message": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1000,
                      "description": "Text of the automatic answer, posted in the conversation as a system notice. Trimmed; 1 to 1,000 characters. The default reads \"Thanks for your message. The team is away right now and will reply as soon as they are back.\"",
                      "example": "Thanks for writing in. We're offline right now and will reply when we're back at 9:00 ET."
                    }
                  },
                  "required": [
                    "enabled",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/spam-filter": {
      "get": {
        "operationId": "getQuillsSpamFilterConfig",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the spam filter settings",
        "description": "Returns the inbound spam filter settings. Stored entries that are not an address or a domain are left out. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The spam filter settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "trustedSenders": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Trusted senders, up to 500: lower-case email addresses (`jane@example.com`) or domains (`example.com`). A new conversation from a trusted sender skips the spam check.",
                      "example": [
                        "example.com",
                        "billing@example.org"
                      ]
                    },
                    "aiClassifier": {
                      "type": "boolean",
                      "description": "Whether new conversations go to the AI spam classifier. Reads as true until it is set. The setting is stored only: no AI classifier currently acts on it.",
                      "example": true
                    }
                  },
                  "required": [
                    "trustedSenders",
                    "aiClassifier"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsSpamFilterConfig",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Update the spam filter settings",
        "description": "Updates the inbound spam filter settings and returns the stored result. Send at least one field; an omitted field keeps its value. `trustedSenders` replaces the whole list. A new email, widget or portal conversation from a trusted sender skips the heuristic spam check that would otherwise close it as spam. Requires the `manage_settings` permission. Records a `settings.spam_filter_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trustedSenders": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 320
                    },
                    "maxItems": 500,
                    "description": "Full replacement list of trusted senders: email addresses or domains, up to 500 entries of up to 320 characters each. Entries are trimmed, lower-cased and de-duplicated; an entry that is neither an address nor a domain is dropped without an error. Omit to keep the current list.",
                    "example": [
                      "example.com",
                      "billing@example.org"
                    ]
                  },
                  "aiClassifier": {
                    "type": "boolean",
                    "description": "Whether new conversations go to the AI spam classifier. Omit to keep the current value.",
                    "example": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The spam filter settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "trustedSenders": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Trusted senders, up to 500: lower-case email addresses (`jane@example.com`) or domains (`example.com`). A new conversation from a trusted sender skips the spam check.",
                      "example": [
                        "example.com",
                        "billing@example.org"
                      ]
                    },
                    "aiClassifier": {
                      "type": "boolean",
                      "description": "Whether new conversations go to the AI spam classifier. Reads as true until it is set. The setting is stored only: no AI classifier currently acts on it.",
                      "example": true
                    }
                  },
                  "required": [
                    "trustedSenders",
                    "aiClassifier"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/undo-send": {
      "get": {
        "operationId": "getQuillsUndoSendSettings",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the workspace undo-send delay setting for customer replies",
        "description": "Returns the workspace's undo-send setting. When enabled, customer replies are held for 5–30 seconds before sending so teammates can undo mistakes. Any teammate can read it so the composer knows the active window. Unset or invalid stored values read as the default: off, 10 seconds. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The undo-send settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether undo send is on. Off by default. While on, a customer reply sent without its own delay or schedule is held for `delaySeconds` before it goes out, so it can still be undone.",
                      "example": true
                    },
                    "delaySeconds": {
                      "type": "integer",
                      "minimum": 5,
                      "maximum": 30,
                      "description": "Seconds a customer reply is held before it sends, from 5 to 30. Defaults to 10.",
                      "example": 10
                    }
                  },
                  "required": [
                    "enabled",
                    "delaySeconds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsUndoSendSettings",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Configure the workspace undo-send delay (5–30 seconds)",
        "description": "Replaces the undo-send setting and returns it. While on, a customer reply in a conversation or ticket that sets neither `delaySeconds` nor `scheduledAt` is held for this many seconds before it sends; a reply with `delaySeconds: 0` sends at once. Requires the `manage_settings` permission. Records a `settings.undo_send_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether undo send is on. Off by default. While on, a customer reply sent without its own delay or schedule is held for `delaySeconds` before it goes out, so it can still be undone.",
                    "example": true
                  },
                  "delaySeconds": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 30,
                    "description": "Seconds a customer reply is held before it sends, from 5 to 30. Defaults to 10.",
                    "example": 10
                  }
                },
                "required": [
                  "enabled",
                  "delaySeconds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated undo-send settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether undo send is on. Off by default. While on, a customer reply sent without its own delay or schedule is held for `delaySeconds` before it goes out, so it can still be undone.",
                      "example": true
                    },
                    "delaySeconds": {
                      "type": "integer",
                      "minimum": 5,
                      "maximum": 30,
                      "description": "Seconds a customer reply is held before it sends, from 5 to 30. Defaults to 10.",
                      "example": 10
                    }
                  },
                  "required": [
                    "enabled",
                    "delaySeconds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/reopen-policy": {
      "get": {
        "operationId": "getQuillsReopenPolicy",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the ticket/conversation reopen & quiet auto-close policy",
        "description": "Returns the reopen and quiet auto-close policy. Unset or invalid stored values read as the defaults. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The reopen policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "always",
                        "within_days",
                        "never_link_new"
                      ],
                      "default": "within_days",
                      "description": "What a customer's reply to a closed conversation does. `always`: reopens it; `within_days`: reopens it if it closed less than `windowDays` ago, otherwise starts a new follow-up conversation; `never_link_new`: always starts a new follow-up conversation. Defaults to `within_days`.",
                      "example": "within_days"
                    },
                    "windowDays": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 90,
                      "default": 14,
                      "description": "Days after closing during which a customer's reply reopens the conversation, in `within_days` mode. From 1 to 90; defaults to 14.",
                      "example": 14
                    },
                    "autoCloseAfterDays": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 30,
                      "default": 5,
                      "description": "Days between a teammate offering a solution and the conversation closing quietly, for an offer that doesn't set its own. From 1 to 30; defaults to 5.",
                      "example": 5
                    },
                    "reminderBeforeCloseHours": {
                      "type": "integer",
                      "minimum": 6,
                      "maximum": 72,
                      "default": 24,
                      "description": "Hours before the quiet close when the customer gets one reminder message. From 6 to 72; defaults to 24.",
                      "example": 24
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsReopenPolicy",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Configure the reopen and solution-offered quiet auto-close policy (#311)",
        "description": "Replaces the reopen and quiet auto-close policy and returns it; omitted fields take their defaults. The policy decides whether a customer's reply to a closed conversation, by email or in the widget or portal, reopens it or starts a follow-up conversation. It also times the quiet close of a conversation where a teammate offered a solution: one reminder `reminderBeforeCloseHours` before, then the conversation closes as resolved, unless a required attribute is missing. Requires the `manage_settings` permission. Records a `settings.reopen_policy_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "always",
                      "within_days",
                      "never_link_new"
                    ],
                    "default": "within_days",
                    "description": "What a customer's reply to a closed conversation does. `always`: reopens it; `within_days`: reopens it if it closed less than `windowDays` ago, otherwise starts a new follow-up conversation; `never_link_new`: always starts a new follow-up conversation. Defaults to `within_days`.",
                    "example": "within_days"
                  },
                  "windowDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 90,
                    "default": 14,
                    "description": "Days after closing during which a customer's reply reopens the conversation, in `within_days` mode. From 1 to 90; defaults to 14.",
                    "example": 14
                  },
                  "autoCloseAfterDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30,
                    "default": 5,
                    "description": "Days between a teammate offering a solution and the conversation closing quietly, for an offer that doesn't set its own. From 1 to 30; defaults to 5.",
                    "example": 5
                  },
                  "reminderBeforeCloseHours": {
                    "type": "integer",
                    "minimum": 6,
                    "maximum": 72,
                    "default": 24,
                    "description": "Hours before the quiet close when the customer gets one reminder message. From 6 to 72; defaults to 24.",
                    "example": 24
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated reopen policy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "always",
                        "within_days",
                        "never_link_new"
                      ],
                      "default": "within_days",
                      "description": "What a customer's reply to a closed conversation does. `always`: reopens it; `within_days`: reopens it if it closed less than `windowDays` ago, otherwise starts a new follow-up conversation; `never_link_new`: always starts a new follow-up conversation. Defaults to `within_days`.",
                      "example": "within_days"
                    },
                    "windowDays": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 90,
                      "default": 14,
                      "description": "Days after closing during which a customer's reply reopens the conversation, in `within_days` mode. From 1 to 90; defaults to 14.",
                      "example": 14
                    },
                    "autoCloseAfterDays": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 30,
                      "default": 5,
                      "description": "Days between a teammate offering a solution and the conversation closing quietly, for an offer that doesn't set its own. From 1 to 30; defaults to 5.",
                      "example": 5
                    },
                    "reminderBeforeCloseHours": {
                      "type": "integer",
                      "minimum": 6,
                      "maximum": 72,
                      "default": 24,
                      "description": "Hours before the quiet close when the customer gets one reminder message. From 6 to 72; defaults to 24.",
                      "example": 24
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/csat-settings": {
      "get": {
        "operationId": "getQuillsCsatSettings",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the workspace CSAT survey rules (sampling, cooldown, follow-up)",
        "description": "Returns the CSAT survey rules. Unset or invalid stored values read as the defaults. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The CSAT settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "default": true,
                      "description": "Whether customers get a rating request email when their email conversation closes. Defaults to true.",
                      "example": true
                    },
                    "samplingRate": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100,
                      "default": 100,
                      "description": "Percentage of eligible closed conversations whose customer is asked, from 0 to 100. The choice is fixed per conversation. Defaults to 100.",
                      "example": 50
                    },
                    "cooldownDays": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 90,
                      "default": 14,
                      "description": "Minimum days between two rating requests to the same customer, from 0 to 90. 0 turns the cooldown off. Defaults to 14.",
                      "example": 14
                    },
                    "delayMinutes": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1440,
                      "default": 15,
                      "description": "Minutes after the conversation closes before the rating request is sent, from 0 to 1,440. Defaults to 15.",
                      "example": 15
                    },
                    "excludeTrivialUnderMessages": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 10,
                      "default": 2,
                      "description": "Minimum number of sent, customer-visible messages, system notices not counted, that a conversation needs before its customer is asked. From 0 to 10; 0 asks regardless. Defaults to 2.",
                      "example": 2
                    },
                    "lowScoreThreshold": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 3,
                      "default": 2,
                      "description": "Highest rating on the 1 to 5 scale that counts as low, from 1 to 3. Defaults to 2.",
                      "example": 2
                    },
                    "autoCreateFollowUpOnLow": {
                      "type": "boolean",
                      "default": true,
                      "description": "Whether a customer's first low rating creates a high-priority back-office follow-up ticket, assigned to the conversation's teammate and team. Test customers never get one. Defaults to true.",
                      "example": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsCsatSettings",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Configure CSAT survey sampling, per-customer cooldown, delay, and low-score follow-up (#312)",
        "description": "Replaces the CSAT survey rules and returns them; omitted fields take their defaults. When an email conversation closes, unless the customer closed it, the customer gets one rating request email after `delayMinutes` if the conversation isn't spam or already rated, is sampled in, has enough messages, and the customer is past the cooldown. Requires the `manage_settings` permission. Records a `settings.csat_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether customers get a rating request email when their email conversation closes. Defaults to true.",
                    "example": true
                  },
                  "samplingRate": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100,
                    "default": 100,
                    "description": "Percentage of eligible closed conversations whose customer is asked, from 0 to 100. The choice is fixed per conversation. Defaults to 100.",
                    "example": 50
                  },
                  "cooldownDays": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 90,
                    "default": 14,
                    "description": "Minimum days between two rating requests to the same customer, from 0 to 90. 0 turns the cooldown off. Defaults to 14.",
                    "example": 14
                  },
                  "delayMinutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1440,
                    "default": 15,
                    "description": "Minutes after the conversation closes before the rating request is sent, from 0 to 1,440. Defaults to 15.",
                    "example": 15
                  },
                  "excludeTrivialUnderMessages": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10,
                    "default": 2,
                    "description": "Minimum number of sent, customer-visible messages, system notices not counted, that a conversation needs before its customer is asked. From 0 to 10; 0 asks regardless. Defaults to 2.",
                    "example": 2
                  },
                  "lowScoreThreshold": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3,
                    "default": 2,
                    "description": "Highest rating on the 1 to 5 scale that counts as low, from 1 to 3. Defaults to 2.",
                    "example": 2
                  },
                  "autoCreateFollowUpOnLow": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether a customer's first low rating creates a high-priority back-office follow-up ticket, assigned to the conversation's teammate and team. Test customers never get one. Defaults to true.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated CSAT settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "default": true,
                      "description": "Whether customers get a rating request email when their email conversation closes. Defaults to true.",
                      "example": true
                    },
                    "samplingRate": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100,
                      "default": 100,
                      "description": "Percentage of eligible closed conversations whose customer is asked, from 0 to 100. The choice is fixed per conversation. Defaults to 100.",
                      "example": 50
                    },
                    "cooldownDays": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 90,
                      "default": 14,
                      "description": "Minimum days between two rating requests to the same customer, from 0 to 90. 0 turns the cooldown off. Defaults to 14.",
                      "example": 14
                    },
                    "delayMinutes": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1440,
                      "default": 15,
                      "description": "Minutes after the conversation closes before the rating request is sent, from 0 to 1,440. Defaults to 15.",
                      "example": 15
                    },
                    "excludeTrivialUnderMessages": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 10,
                      "default": 2,
                      "description": "Minimum number of sent, customer-visible messages, system notices not counted, that a conversation needs before its customer is asked. From 0 to 10; 0 asks regardless. Defaults to 2.",
                      "example": 2
                    },
                    "lowScoreThreshold": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 3,
                      "default": 2,
                      "description": "Highest rating on the 1 to 5 scale that counts as low, from 1 to 3. Defaults to 2.",
                      "example": 2
                    },
                    "autoCreateFollowUpOnLow": {
                      "type": "boolean",
                      "default": true,
                      "description": "Whether a customer's first low rating creates a high-priority back-office follow-up ticket, assigned to the conversation's teammate and team. Test customers never get one. Defaults to true.",
                      "example": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-channel/status": {
      "get": {
        "operationId": "getQuillsEmailChannelStatus",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the status of the instance's email transport",
        "description": "Returns the instance's email transport status, read from its mail configuration. Names only, never a credential. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The email transport status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "provider": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "ses",
                        "smtp",
                        "resend",
                        "console",
                        null
                      ],
                      "description": "Outbound mail provider. `ses`: Amazon SES; `smtp`: an SMTP server; `resend`: Resend; `console`: none, mail is only logged. Null when more than one is configured; outbound mail is then not sent.",
                      "example": "smtp"
                    },
                    "fromAddress": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Default sender address configured for outbound mail. Null when not set.",
                      "example": "support@example.com"
                    },
                    "inboundConfigured": {
                      "type": "boolean",
                      "description": "Whether the inbound mail route accepts deliveries.",
                      "example": true
                    },
                    "inboundDomain": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Lower-case domain configured for inbound support mail. Null when not set.",
                      "example": "inbound.example.com"
                    }
                  },
                  "required": [
                    "provider",
                    "fromAddress",
                    "inboundConfigured",
                    "inboundDomain"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-channel": {
      "get": {
        "operationId": "getQuillsEmailChannelConfig",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the email channel configuration",
        "description": "Returns the email setup owned by the workspace's default team: its inbound route, its sending addresses (newest first) and its sending domains (newest first, at most 100). Removed addresses are left out; credentials and signing keys are never returned. Returns an empty configuration when the workspace has no default team. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The email channel configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "inboundRoute": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Channel account ID.",
                          "example": "channel_account_01m8rzbm5jfqfrqfgc8g1pdd2s"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "inbound",
                            "sending",
                            "connection"
                          ],
                          "description": "Role of the account. `inbound`: the workspace's inbound email route; `sending`: an address the workspace sends email from; `connection`: a link to an integration credential, never returned by these routes.",
                          "example": "sending"
                        },
                        "address": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Email address, lowercase. For a sending address, the address mail is sent from. Null when the account has none, as on an inbound route created by these routes.",
                          "example": "support@example.com"
                        },
                        "module": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "support",
                            "feedback",
                            "changelog",
                            null
                          ],
                          "description": "Product area the address sends email for: `support`, `feedback` or `changelog`. Null on the inbound route.",
                          "example": "support"
                        },
                        "inboundTrust": {
                          "type": "string",
                          "enum": [
                            "strict",
                            "lenient"
                          ],
                          "description": "Sender check for inbound email. `strict`: verified senders only, that pass the sender checks of their domain (the default); `lenient`: unsigned senders are accepted too. Set on the inbound route; sending addresses keep `strict`.",
                          "example": "strict"
                        },
                        "forwardingTarget": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Forwarding address stored on the inbound route, for a copy of each support email that arrives. Null when none is set, and on sending addresses.",
                          "example": "help-desk@example.com"
                        },
                        "smtp": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "host": {
                              "type": "string",
                              "description": "SMTP server host name.",
                              "example": "smtp.example.com"
                            },
                            "port": {
                              "type": "number",
                              "description": "SMTP server port.",
                              "example": 587
                            },
                            "secure": {
                              "type": "boolean",
                              "description": "Whether the connection uses TLS.",
                              "example": true
                            }
                          },
                          "required": [
                            "host",
                            "port",
                            "secure"
                          ],
                          "description": "SMTP server override stored for this sending address. Null when none is set. The SMTP user is stored but never returned."
                        },
                        "sendingDomainId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the sending domain the address belongs to. Null on the inbound route.",
                          "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                        },
                        "sendingDomain": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "domain": {
                              "type": "string",
                              "description": "Domain name.",
                              "example": "example.com"
                            },
                            "status": {
                              "type": "string",
                              "description": "Verification status of the domain: `pending`, `verified` or `failed`.",
                              "example": "pending"
                            }
                          },
                          "required": [
                            "domain",
                            "status"
                          ],
                          "description": "Name and status of the sending domain. Filled in when reading the configuration and when adding an address; null in the other routes' responses and when there is no sending domain."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the account was created, in ISO 8601 UTC.",
                          "example": "2026-12-16T09:26:53.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "role",
                        "address",
                        "module",
                        "inboundTrust",
                        "forwardingTarget",
                        "smtp",
                        "sendingDomainId",
                        "sendingDomain",
                        "createdAt"
                      ],
                      "description": "The inbound route, which turns email to the workspace's inbox into conversations. Null when it hasn't been set up."
                    },
                    "sendingAddresses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Channel account ID.",
                            "example": "channel_account_01m8rzbm5jfqfrqfgc8g1pdd2s"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "inbound",
                              "sending",
                              "connection"
                            ],
                            "description": "Role of the account. `inbound`: the workspace's inbound email route; `sending`: an address the workspace sends email from; `connection`: a link to an integration credential, never returned by these routes.",
                            "example": "sending"
                          },
                          "address": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Email address, lowercase. For a sending address, the address mail is sent from. Null when the account has none, as on an inbound route created by these routes.",
                            "example": "support@example.com"
                          },
                          "module": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "support",
                              "feedback",
                              "changelog",
                              null
                            ],
                            "description": "Product area the address sends email for: `support`, `feedback` or `changelog`. Null on the inbound route.",
                            "example": "support"
                          },
                          "inboundTrust": {
                            "type": "string",
                            "enum": [
                              "strict",
                              "lenient"
                            ],
                            "description": "Sender check for inbound email. `strict`: verified senders only, that pass the sender checks of their domain (the default); `lenient`: unsigned senders are accepted too. Set on the inbound route; sending addresses keep `strict`.",
                            "example": "strict"
                          },
                          "forwardingTarget": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Forwarding address stored on the inbound route, for a copy of each support email that arrives. Null when none is set, and on sending addresses.",
                            "example": "help-desk@example.com"
                          },
                          "smtp": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "host": {
                                "type": "string",
                                "description": "SMTP server host name.",
                                "example": "smtp.example.com"
                              },
                              "port": {
                                "type": "number",
                                "description": "SMTP server port.",
                                "example": 587
                              },
                              "secure": {
                                "type": "boolean",
                                "description": "Whether the connection uses TLS.",
                                "example": true
                              }
                            },
                            "required": [
                              "host",
                              "port",
                              "secure"
                            ],
                            "description": "SMTP server override stored for this sending address. Null when none is set. The SMTP user is stored but never returned."
                          },
                          "sendingDomainId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the sending domain the address belongs to. Null on the inbound route.",
                            "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                          },
                          "sendingDomain": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "domain": {
                                "type": "string",
                                "description": "Domain name.",
                                "example": "example.com"
                              },
                              "status": {
                                "type": "string",
                                "description": "Verification status of the domain: `pending`, `verified` or `failed`.",
                                "example": "pending"
                              }
                            },
                            "required": [
                              "domain",
                              "status"
                            ],
                            "description": "Name and status of the sending domain. Filled in when reading the configuration and when adding an address; null in the other routes' responses and when there is no sending domain."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the account was created, in ISO 8601 UTC.",
                            "example": "2026-12-16T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "role",
                          "address",
                          "module",
                          "inboundTrust",
                          "forwardingTarget",
                          "smtp",
                          "sendingDomainId",
                          "sendingDomain",
                          "createdAt"
                        ],
                        "description": "An email channel account: the inbound route or a sending address. Credentials are never returned."
                      },
                      "description": "Sending addresses, newest first."
                    },
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Sending domain ID.",
                            "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                          },
                          "domain": {
                            "type": "string",
                            "description": "Domain name, lowercase: the part of a sending address after the `@`.",
                            "example": "example.com"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "verified",
                              "failed"
                            ],
                            "description": "Verification status. `pending`: not verified yet (the status of a new domain); `verified`: the mail provider verified it; `failed`: verification failed.",
                            "example": "pending"
                          },
                          "dnsRecords": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "DNS record type: `TXT`, `CNAME` or `MX`.",
                                  "example": "TXT"
                                },
                                "host": {
                                  "type": "string",
                                  "description": "Record name, relative to the domain; `@` means the domain itself.",
                                  "example": "s1._domainkey"
                                },
                                "value": {
                                  "type": "string",
                                  "description": "Record value to publish.",
                                  "example": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AEXAMPLE"
                                },
                                "purpose": {
                                  "type": "string",
                                  "description": "What the record is for. `ownership`: proves the domain belongs to this workspace; `dkim`: signing (a key TXT record can also prove ownership); `mail-from`: the MAIL FROM subdomain.",
                                  "example": "dkim"
                                },
                                "priority": {
                                  "type": "number",
                                  "description": "MX preference; lower is preferred. Present on `MX` records only.",
                                  "example": 10
                                }
                              },
                              "required": [
                                "type",
                                "host",
                                "value",
                                "purpose"
                              ],
                              "description": "A DNS record to publish."
                            },
                            "description": "DNS records the domain's owner must publish before mail can be sent as the domain. Empty until records are set up for the domain; these routes don't create them."
                          },
                          "verifiedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the domain was verified, in ISO 8601 UTC. Null while it isn't verified.",
                            "example": null
                          },
                          "mailFromLabel": {
                            "type": "string",
                            "description": "Label of the MAIL FROM subdomain, the part before the domain (for example `bounce` for `bounce.example.com`).",
                            "example": "bounce"
                          },
                          "dkimMode": {
                            "type": "string",
                            "enum": [
                              "easy",
                              "byo",
                              "shared"
                            ],
                            "description": "How mail for the domain is signed. `easy`: with the mail provider's keys, published as three DKIM CNAME records, plus a TXT record that proves ownership; `byo`: with a key made for this domain, published as one TXT record that also proves ownership; `shared`: the provider identity already existed, so it keeps signing with its key and the domain's own TXT record only proves ownership.",
                            "example": "byo"
                          },
                          "signingKeyPending": {
                            "type": "boolean",
                            "description": "Whether the domain holds its own signing key, waiting to replace the key that its provider identity signs with once ownership is proven. The key itself is never returned.",
                            "example": false
                          },
                          "autoCheckUntil": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "End of the 72-hour automatic check window that the last check restart opened, in ISO 8601 UTC. Null when no window was opened.",
                            "example": "2026-12-19T09:26:53.000Z"
                          },
                          "lastCheckedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the domain's DNS records were last checked, in ISO 8601 UTC. Null when they never were.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "domain",
                          "status",
                          "dnsRecords",
                          "verifiedAt",
                          "mailFromLabel",
                          "dkimMode",
                          "signingKeyPending",
                          "autoCheckUntil",
                          "lastCheckedAt"
                        ],
                        "description": "A domain the workspace sends email from, with the DNS records to publish for it. Signing keys are never returned."
                      },
                      "description": "Sending domains, newest first, at most 100."
                    }
                  },
                  "required": [
                    "inboundRoute",
                    "sendingAddresses",
                    "domains"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-channel/inbound": {
      "put": {
        "operationId": "setQuillsInboundForwarding",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Set the inbound route's forwarding address",
        "description": "Sets the forwarding address of the default team's inbound route, for a copy of each support email that arrives, replacing any earlier one. Creates the inbound route, with `strict` sender trust, when it doesn't exist. No email is sent to the address. Requires the `manage_settings` permission. Records a `channel_account.inbound_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "forwardingTarget": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "description": "Email address to forward copies to, up to 320 characters. Trimmed and lowercased.",
                    "example": "help-desk@example.com"
                  }
                },
                "required": [
                  "forwardingTarget"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The inbound route",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Channel account ID.",
                      "example": "channel_account_01m8rzbm5jfqfrqfgc8g1pdd2s"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "inbound",
                        "sending",
                        "connection"
                      ],
                      "description": "Role of the account. `inbound`: the workspace's inbound email route; `sending`: an address the workspace sends email from; `connection`: a link to an integration credential, never returned by these routes.",
                      "example": "sending"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Email address, lowercase. For a sending address, the address mail is sent from. Null when the account has none, as on an inbound route created by these routes.",
                      "example": "support@example.com"
                    },
                    "module": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "support",
                        "feedback",
                        "changelog",
                        null
                      ],
                      "description": "Product area the address sends email for: `support`, `feedback` or `changelog`. Null on the inbound route.",
                      "example": "support"
                    },
                    "inboundTrust": {
                      "type": "string",
                      "enum": [
                        "strict",
                        "lenient"
                      ],
                      "description": "Sender check for inbound email. `strict`: verified senders only, that pass the sender checks of their domain (the default); `lenient`: unsigned senders are accepted too. Set on the inbound route; sending addresses keep `strict`.",
                      "example": "strict"
                    },
                    "forwardingTarget": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Forwarding address stored on the inbound route, for a copy of each support email that arrives. Null when none is set, and on sending addresses.",
                      "example": "help-desk@example.com"
                    },
                    "smtp": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "host": {
                          "type": "string",
                          "description": "SMTP server host name.",
                          "example": "smtp.example.com"
                        },
                        "port": {
                          "type": "number",
                          "description": "SMTP server port.",
                          "example": 587
                        },
                        "secure": {
                          "type": "boolean",
                          "description": "Whether the connection uses TLS.",
                          "example": true
                        }
                      },
                      "required": [
                        "host",
                        "port",
                        "secure"
                      ],
                      "description": "SMTP server override stored for this sending address. Null when none is set. The SMTP user is stored but never returned."
                    },
                    "sendingDomainId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the sending domain the address belongs to. Null on the inbound route.",
                      "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                    },
                    "sendingDomain": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "domain": {
                          "type": "string",
                          "description": "Domain name.",
                          "example": "example.com"
                        },
                        "status": {
                          "type": "string",
                          "description": "Verification status of the domain: `pending`, `verified` or `failed`.",
                          "example": "pending"
                        }
                      },
                      "required": [
                        "domain",
                        "status"
                      ],
                      "description": "Name and status of the sending domain. Filled in when reading the configuration and when adding an address; null in the other routes' responses and when there is no sending domain."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the account was created, in ISO 8601 UTC.",
                      "example": "2026-12-16T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "role",
                    "address",
                    "module",
                    "inboundTrust",
                    "forwardingTarget",
                    "smtp",
                    "sendingDomainId",
                    "sendingDomain",
                    "createdAt"
                  ],
                  "description": "An email channel account: the inbound route or a sending address. Credentials are never returned."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace has no default team, or another request is creating the inbound route; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-channel/inbound/forwarding": {
      "delete": {
        "operationId": "clearQuillsInboundForwarding",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Remove the inbound route's forwarding address",
        "description": "Removes the forwarding address of the default team's inbound route, so copies stop; the workspace's own inbox address stays. Returns null and changes nothing when there is no inbound route. Requires the `manage_settings` permission. Records a `channel_account.inbound_updated` event when the inbound route exists.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The inbound route",
            "content": {
              "application/json": {
                "schema": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Channel account ID.",
                      "example": "channel_account_01m8rzbm5jfqfrqfgc8g1pdd2s"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "inbound",
                        "sending",
                        "connection"
                      ],
                      "description": "Role of the account. `inbound`: the workspace's inbound email route; `sending`: an address the workspace sends email from; `connection`: a link to an integration credential, never returned by these routes.",
                      "example": "sending"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Email address, lowercase. For a sending address, the address mail is sent from. Null when the account has none, as on an inbound route created by these routes.",
                      "example": "support@example.com"
                    },
                    "module": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "support",
                        "feedback",
                        "changelog",
                        null
                      ],
                      "description": "Product area the address sends email for: `support`, `feedback` or `changelog`. Null on the inbound route.",
                      "example": "support"
                    },
                    "inboundTrust": {
                      "type": "string",
                      "enum": [
                        "strict",
                        "lenient"
                      ],
                      "description": "Sender check for inbound email. `strict`: verified senders only, that pass the sender checks of their domain (the default); `lenient`: unsigned senders are accepted too. Set on the inbound route; sending addresses keep `strict`.",
                      "example": "strict"
                    },
                    "forwardingTarget": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Forwarding address stored on the inbound route, for a copy of each support email that arrives. Null when none is set, and on sending addresses.",
                      "example": "help-desk@example.com"
                    },
                    "smtp": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "host": {
                          "type": "string",
                          "description": "SMTP server host name.",
                          "example": "smtp.example.com"
                        },
                        "port": {
                          "type": "number",
                          "description": "SMTP server port.",
                          "example": 587
                        },
                        "secure": {
                          "type": "boolean",
                          "description": "Whether the connection uses TLS.",
                          "example": true
                        }
                      },
                      "required": [
                        "host",
                        "port",
                        "secure"
                      ],
                      "description": "SMTP server override stored for this sending address. Null when none is set. The SMTP user is stored but never returned."
                    },
                    "sendingDomainId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the sending domain the address belongs to. Null on the inbound route.",
                      "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                    },
                    "sendingDomain": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "domain": {
                          "type": "string",
                          "description": "Domain name.",
                          "example": "example.com"
                        },
                        "status": {
                          "type": "string",
                          "description": "Verification status of the domain: `pending`, `verified` or `failed`.",
                          "example": "pending"
                        }
                      },
                      "required": [
                        "domain",
                        "status"
                      ],
                      "description": "Name and status of the sending domain. Filled in when reading the configuration and when adding an address; null in the other routes' responses and when there is no sending domain."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the account was created, in ISO 8601 UTC.",
                      "example": "2026-12-16T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "role",
                    "address",
                    "module",
                    "inboundTrust",
                    "forwardingTarget",
                    "smtp",
                    "sendingDomainId",
                    "sendingDomain",
                    "createdAt"
                  ],
                  "description": "An email channel account: the inbound route or a sending address. Credentials are never returned."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace has no default team",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-channel/inbound/trust": {
      "put": {
        "operationId": "setQuillsInboundTrust",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Set the inbound route's sender trust",
        "description": "Sets whether email to the default team's inbound route must pass the sender checks of its domain. Creates the inbound route when it doesn't exist. Requires the `manage_settings` permission. Records a `channel_account.inbound_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "inboundTrust": {
                    "type": "string",
                    "enum": [
                      "strict",
                      "lenient"
                    ],
                    "description": "Sender check for inbound email. `strict`: verified senders only, that pass the sender checks of their domain (the default); `lenient`: unsigned senders are accepted too.",
                    "example": "strict"
                  }
                },
                "required": [
                  "inboundTrust"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The inbound route",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Channel account ID.",
                      "example": "channel_account_01m8rzbm5jfqfrqfgc8g1pdd2s"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "inbound",
                        "sending",
                        "connection"
                      ],
                      "description": "Role of the account. `inbound`: the workspace's inbound email route; `sending`: an address the workspace sends email from; `connection`: a link to an integration credential, never returned by these routes.",
                      "example": "sending"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Email address, lowercase. For a sending address, the address mail is sent from. Null when the account has none, as on an inbound route created by these routes.",
                      "example": "support@example.com"
                    },
                    "module": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "support",
                        "feedback",
                        "changelog",
                        null
                      ],
                      "description": "Product area the address sends email for: `support`, `feedback` or `changelog`. Null on the inbound route.",
                      "example": "support"
                    },
                    "inboundTrust": {
                      "type": "string",
                      "enum": [
                        "strict",
                        "lenient"
                      ],
                      "description": "Sender check for inbound email. `strict`: verified senders only, that pass the sender checks of their domain (the default); `lenient`: unsigned senders are accepted too. Set on the inbound route; sending addresses keep `strict`.",
                      "example": "strict"
                    },
                    "forwardingTarget": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Forwarding address stored on the inbound route, for a copy of each support email that arrives. Null when none is set, and on sending addresses.",
                      "example": "help-desk@example.com"
                    },
                    "smtp": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "host": {
                          "type": "string",
                          "description": "SMTP server host name.",
                          "example": "smtp.example.com"
                        },
                        "port": {
                          "type": "number",
                          "description": "SMTP server port.",
                          "example": 587
                        },
                        "secure": {
                          "type": "boolean",
                          "description": "Whether the connection uses TLS.",
                          "example": true
                        }
                      },
                      "required": [
                        "host",
                        "port",
                        "secure"
                      ],
                      "description": "SMTP server override stored for this sending address. Null when none is set. The SMTP user is stored but never returned."
                    },
                    "sendingDomainId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the sending domain the address belongs to. Null on the inbound route.",
                      "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                    },
                    "sendingDomain": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "domain": {
                          "type": "string",
                          "description": "Domain name.",
                          "example": "example.com"
                        },
                        "status": {
                          "type": "string",
                          "description": "Verification status of the domain: `pending`, `verified` or `failed`.",
                          "example": "pending"
                        }
                      },
                      "required": [
                        "domain",
                        "status"
                      ],
                      "description": "Name and status of the sending domain. Filled in when reading the configuration and when adding an address; null in the other routes' responses and when there is no sending domain."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the account was created, in ISO 8601 UTC.",
                      "example": "2026-12-16T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "role",
                    "address",
                    "module",
                    "inboundTrust",
                    "forwardingTarget",
                    "smtp",
                    "sendingDomainId",
                    "sendingDomain",
                    "createdAt"
                  ],
                  "description": "An email channel account: the inbound route or a sending address. Credentials are never returned."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace has no default team, or another request is creating the inbound route; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-channel/sending-addresses": {
      "post": {
        "operationId": "createQuillsSendingAddress",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Add or move a sending address",
        "description": "Adds an address that the default team sends email from for one product area. Adding an existing sending address again moves it to the new area and keeps its ID. The address's domain is recorded as a `pending` sending domain when the team doesn't have it yet; no provider identity is created and no DNS lookup runs in the request. Requires the `manage_settings` permission. Records a `channel_account.sending_address_saved` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "description": "Email address to send from, up to 320 characters. Trimmed and lowercased. The part after the `@` becomes a sending domain.",
                    "example": "support@example.com"
                  },
                  "module": {
                    "type": "string",
                    "enum": [
                      "support",
                      "feedback",
                      "changelog"
                    ],
                    "description": "Product area the address sends email for: `support`, `feedback` or `changelog`.",
                    "example": "support"
                  }
                },
                "required": [
                  "address",
                  "module"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The sending address",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Channel account ID.",
                      "example": "channel_account_01m8rzbm5jfqfrqfgc8g1pdd2s"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "inbound",
                        "sending",
                        "connection"
                      ],
                      "description": "Role of the account. `inbound`: the workspace's inbound email route; `sending`: an address the workspace sends email from; `connection`: a link to an integration credential, never returned by these routes.",
                      "example": "sending"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Email address, lowercase. For a sending address, the address mail is sent from. Null when the account has none, as on an inbound route created by these routes.",
                      "example": "support@example.com"
                    },
                    "module": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "support",
                        "feedback",
                        "changelog",
                        null
                      ],
                      "description": "Product area the address sends email for: `support`, `feedback` or `changelog`. Null on the inbound route.",
                      "example": "support"
                    },
                    "inboundTrust": {
                      "type": "string",
                      "enum": [
                        "strict",
                        "lenient"
                      ],
                      "description": "Sender check for inbound email. `strict`: verified senders only, that pass the sender checks of their domain (the default); `lenient`: unsigned senders are accepted too. Set on the inbound route; sending addresses keep `strict`.",
                      "example": "strict"
                    },
                    "forwardingTarget": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Forwarding address stored on the inbound route, for a copy of each support email that arrives. Null when none is set, and on sending addresses.",
                      "example": "help-desk@example.com"
                    },
                    "smtp": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "host": {
                          "type": "string",
                          "description": "SMTP server host name.",
                          "example": "smtp.example.com"
                        },
                        "port": {
                          "type": "number",
                          "description": "SMTP server port.",
                          "example": 587
                        },
                        "secure": {
                          "type": "boolean",
                          "description": "Whether the connection uses TLS.",
                          "example": true
                        }
                      },
                      "required": [
                        "host",
                        "port",
                        "secure"
                      ],
                      "description": "SMTP server override stored for this sending address. Null when none is set. The SMTP user is stored but never returned."
                    },
                    "sendingDomainId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the sending domain the address belongs to. Null on the inbound route.",
                      "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                    },
                    "sendingDomain": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "domain": {
                          "type": "string",
                          "description": "Domain name.",
                          "example": "example.com"
                        },
                        "status": {
                          "type": "string",
                          "description": "Verification status of the domain: `pending`, `verified` or `failed`.",
                          "example": "pending"
                        }
                      },
                      "required": [
                        "domain",
                        "status"
                      ],
                      "description": "Name and status of the sending domain. Filled in when reading the configuration and when adding an address; null in the other routes' responses and when there is no sending domain."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the account was created, in ISO 8601 UTC.",
                      "example": "2026-12-16T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "role",
                    "address",
                    "module",
                    "inboundTrust",
                    "forwardingTarget",
                    "smtp",
                    "sendingDomainId",
                    "sendingDomain",
                    "createdAt"
                  ],
                  "description": "An email channel account: the inbound route or a sending address. Credentials are never returned."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace has no default team, the address belongs to the inbound route, or another request is adding the same address or domain; retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-channel/sending-addresses/{channelAccountId}/smtp": {
      "put": {
        "operationId": "setQuillsSendingAddressSmtp",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Set or clear a sending address's SMTP override",
        "description": "Sets the SMTP server override of a sending address, replacing any earlier one, or clears it with `smtp: null`. The SMTP user is stored but never returned; this route takes no password, and the connection isn't tested. Requires the `manage_settings` permission. Records a `channel_account.smtp_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Channel account ID of the sending address. Accepts the TypeID or its UUID.",
              "example": "channel_account_01m8rzbm5jfqfrqfgc8g1pdd2s"
            },
            "required": true,
            "description": "Channel account ID of the sending address. Accepts the TypeID or its UUID.",
            "name": "channelAccountId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "smtp": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "host": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "SMTP server host name, 1 to 255 characters.",
                        "example": "smtp.example.com"
                      },
                      "port": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 65535,
                        "description": "SMTP server port, from 1 to 65535.",
                        "example": 587
                      },
                      "secure": {
                        "type": "boolean",
                        "description": "Whether the connection uses TLS.",
                        "example": true
                      },
                      "user": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "SMTP user name, 1 to 255 characters. Stored but never returned.",
                        "example": "mailer@example.com"
                      }
                    },
                    "required": [
                      "host",
                      "port",
                      "secure",
                      "user"
                    ],
                    "description": "SMTP server to store for this sending address. Null removes the override."
                  }
                },
                "required": [
                  "smtp"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The sending address",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Channel account ID.",
                      "example": "channel_account_01m8rzbm5jfqfrqfgc8g1pdd2s"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "inbound",
                        "sending",
                        "connection"
                      ],
                      "description": "Role of the account. `inbound`: the workspace's inbound email route; `sending`: an address the workspace sends email from; `connection`: a link to an integration credential, never returned by these routes.",
                      "example": "sending"
                    },
                    "address": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Email address, lowercase. For a sending address, the address mail is sent from. Null when the account has none, as on an inbound route created by these routes.",
                      "example": "support@example.com"
                    },
                    "module": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "support",
                        "feedback",
                        "changelog",
                        null
                      ],
                      "description": "Product area the address sends email for: `support`, `feedback` or `changelog`. Null on the inbound route.",
                      "example": "support"
                    },
                    "inboundTrust": {
                      "type": "string",
                      "enum": [
                        "strict",
                        "lenient"
                      ],
                      "description": "Sender check for inbound email. `strict`: verified senders only, that pass the sender checks of their domain (the default); `lenient`: unsigned senders are accepted too. Set on the inbound route; sending addresses keep `strict`.",
                      "example": "strict"
                    },
                    "forwardingTarget": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Forwarding address stored on the inbound route, for a copy of each support email that arrives. Null when none is set, and on sending addresses.",
                      "example": "help-desk@example.com"
                    },
                    "smtp": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "host": {
                          "type": "string",
                          "description": "SMTP server host name.",
                          "example": "smtp.example.com"
                        },
                        "port": {
                          "type": "number",
                          "description": "SMTP server port.",
                          "example": 587
                        },
                        "secure": {
                          "type": "boolean",
                          "description": "Whether the connection uses TLS.",
                          "example": true
                        }
                      },
                      "required": [
                        "host",
                        "port",
                        "secure"
                      ],
                      "description": "SMTP server override stored for this sending address. Null when none is set. The SMTP user is stored but never returned."
                    },
                    "sendingDomainId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the sending domain the address belongs to. Null on the inbound route.",
                      "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                    },
                    "sendingDomain": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "domain": {
                          "type": "string",
                          "description": "Domain name.",
                          "example": "example.com"
                        },
                        "status": {
                          "type": "string",
                          "description": "Verification status of the domain: `pending`, `verified` or `failed`.",
                          "example": "pending"
                        }
                      },
                      "required": [
                        "domain",
                        "status"
                      ],
                      "description": "Name and status of the sending domain. Filled in when reading the configuration and when adding an address; null in the other routes' responses and when there is no sending domain."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the account was created, in ISO 8601 UTC.",
                      "example": "2026-12-16T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "role",
                    "address",
                    "module",
                    "inboundTrust",
                    "forwardingTarget",
                    "smtp",
                    "sendingDomainId",
                    "sendingDomain",
                    "createdAt"
                  ],
                  "description": "An email channel account: the inbound route or a sending address. Credentials are never returned."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Sending address not found or removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-channel/sending-addresses/{channelAccountId}": {
      "delete": {
        "operationId": "deleteQuillsChannelAccount",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Remove a sending address",
        "description": "Removes a sending address, so the workspace stops sending from it and it's no longer listed. Its sending domain stays; `lastOnDomain` names the domain when no other sending address uses it, so a client can offer to remove the domain too. Requires the `manage_settings` permission. Records a `channel_account.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Channel account ID of the sending address. Accepts the TypeID or its UUID.",
              "example": "channel_account_01m8rzbm5jfqfrqfgc8g1pdd2s"
            },
            "required": true,
            "description": "Channel account ID of the sending address. Accepts the TypeID or its UUID.",
            "name": "channelAccountId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The removed address",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the removed sending address.",
                      "example": "channel_account_01m8rzbm5jfqfrqfgc8g1pdd2s"
                    },
                    "lastOnDomain": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Sending domain ID.",
                          "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                        },
                        "domain": {
                          "type": "string",
                          "description": "Domain name.",
                          "example": "example.com"
                        }
                      },
                      "required": [
                        "id",
                        "domain"
                      ],
                      "description": "The address's sending domain when no other sending address links to it or ends with `@` and the domain. Null when another address still uses it, or the address had no sending domain."
                    }
                  },
                  "required": [
                    "id",
                    "lastOnDomain"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Sending address not found or already removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-channel/domains/{sendingDomainId}": {
      "delete": {
        "operationId": "deleteQuillsSendingDomain",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Remove a sending domain",
        "description": "Permanently deletes a sending domain and its DNS record list. Refused with 409 while a sending address that isn't removed uses it; removed addresses that still point at it are unlinked first. Requires the `manage_settings` permission. Records a `sending_domain.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Sending domain ID. Accepts the TypeID or its UUID.",
              "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
            },
            "required": true,
            "description": "Sending domain ID. Accepts the TypeID or its UUID.",
            "name": "sendingDomainId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The removed domain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted sending domain.",
                      "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Sending domain not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A sending address still uses this domain",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-channel/domains/{sendingDomainId}/checks": {
      "post": {
        "operationId": "restartQuillsSendingDomainChecks",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Ask for a sending domain's checks to run again",
        "description": "Opens a new 72-hour automatic check window for the domain, from now, replacing any earlier one, and records the request. No DNS lookup runs in the request and the domain's status doesn't change. Requires the `manage_settings` permission. Records a `sending_domain.checks_restarted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Sending domain ID. Accepts the TypeID or its UUID.",
              "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
            },
            "required": true,
            "description": "Sending domain ID. Accepts the TypeID or its UUID.",
            "name": "sendingDomainId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The sending domain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Sending domain ID.",
                      "example": "sending_domain_01m8rzbm5kfqfrqfgx3pzdaprm"
                    },
                    "domain": {
                      "type": "string",
                      "description": "Domain name, lowercase: the part of a sending address after the `@`.",
                      "example": "example.com"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "verified",
                        "failed"
                      ],
                      "description": "Verification status. `pending`: not verified yet (the status of a new domain); `verified`: the mail provider verified it; `failed`: verification failed.",
                      "example": "pending"
                    },
                    "dnsRecords": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "DNS record type: `TXT`, `CNAME` or `MX`.",
                            "example": "TXT"
                          },
                          "host": {
                            "type": "string",
                            "description": "Record name, relative to the domain; `@` means the domain itself.",
                            "example": "s1._domainkey"
                          },
                          "value": {
                            "type": "string",
                            "description": "Record value to publish.",
                            "example": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AEXAMPLE"
                          },
                          "purpose": {
                            "type": "string",
                            "description": "What the record is for. `ownership`: proves the domain belongs to this workspace; `dkim`: signing (a key TXT record can also prove ownership); `mail-from`: the MAIL FROM subdomain.",
                            "example": "dkim"
                          },
                          "priority": {
                            "type": "number",
                            "description": "MX preference; lower is preferred. Present on `MX` records only.",
                            "example": 10
                          }
                        },
                        "required": [
                          "type",
                          "host",
                          "value",
                          "purpose"
                        ],
                        "description": "A DNS record to publish."
                      },
                      "description": "DNS records the domain's owner must publish before mail can be sent as the domain. Empty until records are set up for the domain; these routes don't create them."
                    },
                    "verifiedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the domain was verified, in ISO 8601 UTC. Null while it isn't verified.",
                      "example": null
                    },
                    "mailFromLabel": {
                      "type": "string",
                      "description": "Label of the MAIL FROM subdomain, the part before the domain (for example `bounce` for `bounce.example.com`).",
                      "example": "bounce"
                    },
                    "dkimMode": {
                      "type": "string",
                      "enum": [
                        "easy",
                        "byo",
                        "shared"
                      ],
                      "description": "How mail for the domain is signed. `easy`: with the mail provider's keys, published as three DKIM CNAME records, plus a TXT record that proves ownership; `byo`: with a key made for this domain, published as one TXT record that also proves ownership; `shared`: the provider identity already existed, so it keeps signing with its key and the domain's own TXT record only proves ownership.",
                      "example": "byo"
                    },
                    "signingKeyPending": {
                      "type": "boolean",
                      "description": "Whether the domain holds its own signing key, waiting to replace the key that its provider identity signs with once ownership is proven. The key itself is never returned.",
                      "example": false
                    },
                    "autoCheckUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "End of the 72-hour automatic check window that the last check restart opened, in ISO 8601 UTC. Null when no window was opened.",
                      "example": "2026-12-19T09:26:53.000Z"
                    },
                    "lastCheckedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the domain's DNS records were last checked, in ISO 8601 UTC. Null when they never were.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "domain",
                    "status",
                    "dnsRecords",
                    "verifiedAt",
                    "mailFromLabel",
                    "dkimMode",
                    "signingKeyPending",
                    "autoCheckUntil",
                    "lastCheckedAt"
                  ],
                  "description": "A domain the workspace sends email from, with the DNS records to publish for it. Signing keys are never returned."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Sending domain not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/email-log": {
      "get": {
        "operationId": "listQuillsRecentEmailLog",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "List the latest 50 email log entries",
        "description": "Lists the workspace's 50 most recent email log entries, newest first, across all product areas. There is no paging. Delivery errors and provider message IDs aren't returned. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The latest email log entries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Email log entry ID.",
                            "example": "emaillog_01m8rzbm5mfqfrqfkerjz0yf0w"
                          },
                          "direction": {
                            "type": "string",
                            "description": "Direction of the email, such as `outbound`.",
                            "example": "outbound"
                          },
                          "emailType": {
                            "type": "string",
                            "description": "Kind of email, named after its template, such as `ConversationReplyEmail` or `WeeklyDigestEmail`.",
                            "example": "ConversationReplyEmail"
                          },
                          "provider": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Mail provider that handled the email. Null when not recorded.",
                            "example": null
                          },
                          "address": {
                            "type": "string",
                            "description": "Email address of the other party; for outbound email, the recipient.",
                            "example": "dana.lee@example.com"
                          },
                          "subject": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Subject line. Null when not recorded.",
                            "example": "Re: Can't sign in to my account"
                          },
                          "status": {
                            "type": "string",
                            "description": "Delivery outcome, such as `sent`, `skipped` (nothing was sent), `failed` or `uncertain`.",
                            "example": "sent"
                          },
                          "conversationId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the conversation the email belongs to. Null when none.",
                            "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                          },
                          "ticketId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the ticket the email belongs to. Null when none.",
                            "example": null
                          },
                          "postId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the feedback post the email belongs to. Null when none.",
                            "example": null
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the entry was logged, in ISO 8601 UTC.",
                            "example": "2026-12-16T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "direction",
                          "emailType",
                          "provider",
                          "address",
                          "subject",
                          "status",
                          "conversationId",
                          "ticketId",
                          "postId",
                          "createdAt"
                        ],
                        "description": "An email log entry."
                      },
                      "description": "The 50 most recent email log entries, newest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/reporting": {
      "get": {
        "operationId": "getQuillsSupportReporting",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get SLA reporting for a date range",
        "description": "Returns SLA reporting for the SLA events in `[from, to)`, a range of at most 400 days: attainment per clock overall and per policy, breaches by UTC day of week and hour, and how late missed clocks settled. Test customers' conversations and tickets are left out. The overall `sla` totals also add the archived daily totals kept after old conversations and SLA events are purged, for every UTC day the range touches; the other parts count stored events only. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "Start of the date range, inclusive. ISO 8601 date-time with a UTC offset.",
              "example": "2026-02-01T00:00:00Z"
            },
            "required": true,
            "description": "Start of the date range, inclusive. ISO 8601 date-time with a UTC offset.",
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "End of the date range, exclusive. ISO 8601 date-time with a UTC offset. Must be after `from` and at most 400 days later (400 otherwise).",
              "example": "2026-03-01T00:00:00Z"
            },
            "required": true,
            "description": "End of the date range, exclusive. ISO 8601 date-time with a UTC offset. Must be after `from` and at most 400 days later (400 otherwise).",
            "name": "to",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "SLA attainment, per policy, by hour and time after a miss",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sla": {
                      "type": "object",
                      "properties": {
                        "firstResponse": {
                          "type": "object",
                          "properties": {
                            "met": {
                              "type": "number",
                              "description": "Number of clocks that settled within their target.",
                              "example": 182
                            },
                            "breached": {
                              "type": "number",
                              "description": "Number of clocks that missed their target.",
                              "example": 14
                            },
                            "rate": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Share of clocks that met their target, `met / (met + breached)`, from 0 to 1. Null when there are none.",
                              "example": 0.9286
                            }
                          },
                          "required": [
                            "met",
                            "breached",
                            "rate"
                          ],
                          "description": "First response clock: the team's first reply on a conversation."
                        },
                        "nextResponse": {
                          "type": "object",
                          "properties": {
                            "met": {
                              "type": "number",
                              "description": "Number of clocks that settled within their target.",
                              "example": 182
                            },
                            "breached": {
                              "type": "number",
                              "description": "Number of clocks that missed their target.",
                              "example": 14
                            },
                            "rate": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Share of clocks that met their target, `met / (met + breached)`, from 0 to 1. Null when there are none.",
                              "example": 0.9286
                            }
                          },
                          "required": [
                            "met",
                            "breached",
                            "rate"
                          ],
                          "description": "Next response clock: the team's next reply after the customer writes again."
                        },
                        "resolution": {
                          "type": "object",
                          "properties": {
                            "met": {
                              "type": "number",
                              "description": "Number of clocks that settled within their target.",
                              "example": 182
                            },
                            "breached": {
                              "type": "number",
                              "description": "Number of clocks that missed their target.",
                              "example": 14
                            },
                            "rate": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Share of clocks that met their target, `met / (met + breached)`, from 0 to 1. Null when there are none.",
                              "example": 0.9286
                            }
                          },
                          "required": [
                            "met",
                            "breached",
                            "rate"
                          ],
                          "description": "Time to close clock: closing a conversation."
                        },
                        "timeToResolve": {
                          "type": "object",
                          "properties": {
                            "met": {
                              "type": "number",
                              "description": "Number of clocks that settled within their target.",
                              "example": 182
                            },
                            "breached": {
                              "type": "number",
                              "description": "Number of clocks that missed their target.",
                              "example": 14
                            },
                            "rate": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Share of clocks that met their target, `met / (met + breached)`, from 0 to 1. Null when there are none.",
                              "example": 0.9286
                            }
                          },
                          "required": [
                            "met",
                            "breached",
                            "rate"
                          ],
                          "description": "Time to resolve clock: a ticket reaching a status in the `closed` category."
                        }
                      },
                      "required": [
                        "firstResponse",
                        "nextResponse",
                        "resolution",
                        "timeToResolve"
                      ],
                      "description": "Attainment per clock across every policy, archived daily totals included."
                    },
                    "slaByPolicy": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "firstResponse": {
                            "type": "object",
                            "properties": {
                              "met": {
                                "type": "number",
                                "description": "Number of clocks that settled within their target.",
                                "example": 182
                              },
                              "breached": {
                                "type": "number",
                                "description": "Number of clocks that missed their target.",
                                "example": 14
                              },
                              "rate": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "Share of clocks that met their target, `met / (met + breached)`, from 0 to 1. Null when there are none.",
                                "example": 0.9286
                              }
                            },
                            "required": [
                              "met",
                              "breached",
                              "rate"
                            ],
                            "description": "First response clock: the team's first reply on a conversation."
                          },
                          "nextResponse": {
                            "type": "object",
                            "properties": {
                              "met": {
                                "type": "number",
                                "description": "Number of clocks that settled within their target.",
                                "example": 182
                              },
                              "breached": {
                                "type": "number",
                                "description": "Number of clocks that missed their target.",
                                "example": 14
                              },
                              "rate": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "Share of clocks that met their target, `met / (met + breached)`, from 0 to 1. Null when there are none.",
                                "example": 0.9286
                              }
                            },
                            "required": [
                              "met",
                              "breached",
                              "rate"
                            ],
                            "description": "Next response clock: the team's next reply after the customer writes again."
                          },
                          "resolution": {
                            "type": "object",
                            "properties": {
                              "met": {
                                "type": "number",
                                "description": "Number of clocks that settled within their target.",
                                "example": 182
                              },
                              "breached": {
                                "type": "number",
                                "description": "Number of clocks that missed their target.",
                                "example": 14
                              },
                              "rate": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "Share of clocks that met their target, `met / (met + breached)`, from 0 to 1. Null when there are none.",
                                "example": 0.9286
                              }
                            },
                            "required": [
                              "met",
                              "breached",
                              "rate"
                            ],
                            "description": "Time to close clock: closing a conversation."
                          },
                          "timeToResolve": {
                            "type": "object",
                            "properties": {
                              "met": {
                                "type": "number",
                                "description": "Number of clocks that settled within their target.",
                                "example": 182
                              },
                              "breached": {
                                "type": "number",
                                "description": "Number of clocks that missed their target.",
                                "example": 14
                              },
                              "rate": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "Share of clocks that met their target, `met / (met + breached)`, from 0 to 1. Null when there are none.",
                                "example": 0.9286
                              }
                            },
                            "required": [
                              "met",
                              "breached",
                              "rate"
                            ],
                            "description": "Time to resolve clock: a ticket reaching a status in the `closed` category."
                          },
                          "policyId": {
                            "type": "string",
                            "description": "SLA policy ID (TypeID).",
                            "example": "sla_policy_01m8rzdgxqecrb412e62t6hg24"
                          },
                          "policyName": {
                            "type": "string",
                            "description": "SLA policy name.",
                            "example": "Priority support"
                          }
                        },
                        "required": [
                          "firstResponse",
                          "nextResponse",
                          "resolution",
                          "timeToResolve",
                          "policyId",
                          "policyName"
                        ]
                      },
                      "description": "Attainment per clock for each policy with events in the range, ordered by policy name."
                    },
                    "slaHeatmap": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dow": {
                            "type": "number",
                            "description": "ISO day of week in UTC, from 1 (Monday) to 7 (Sunday).",
                            "example": 1
                          },
                          "hour": {
                            "type": "number",
                            "description": "Hour of day in UTC, from 0 to 23.",
                            "example": 14
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of breaches in this hour, all clocks together.",
                            "example": 3
                          },
                          "byClock": {
                            "type": "object",
                            "properties": {
                              "firstResponse": {
                                "type": "number",
                                "description": "First response clock: the team's first reply on a conversation."
                              },
                              "nextResponse": {
                                "type": "number",
                                "description": "Next response clock: the team's next reply after the customer writes again."
                              },
                              "resolution": {
                                "type": "number",
                                "description": "Time to close clock: closing a conversation."
                              },
                              "timeToResolve": {
                                "type": "number",
                                "description": "Time to resolve clock: a ticket reaching a status in the `closed` category."
                              }
                            },
                            "required": [
                              "firstResponse",
                              "nextResponse",
                              "resolution",
                              "timeToResolve"
                            ],
                            "description": "Number of breaches in this hour per clock."
                          }
                        },
                        "required": [
                          "dow",
                          "hour",
                          "count",
                          "byClock"
                        ]
                      },
                      "description": "Breaches by UTC day of week and hour, ordered by day then hour. Hours with no breach are left out."
                    },
                    "slaTimeAfterMiss": {
                      "type": "object",
                      "properties": {
                        "firstResponse": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "number",
                              "description": "Number of clocks that settled after missing their target.",
                              "example": 9
                            },
                            "avgOverdueSecs": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Average time past the target when they settled, in seconds. Null when there are none.",
                              "example": 5400
                            }
                          },
                          "required": [
                            "count",
                            "avgOverdueSecs"
                          ],
                          "description": "First response clock: the team's first reply on a conversation."
                        },
                        "nextResponse": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "number",
                              "description": "Number of clocks that settled after missing their target.",
                              "example": 9
                            },
                            "avgOverdueSecs": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Average time past the target when they settled, in seconds. Null when there are none.",
                              "example": 5400
                            }
                          },
                          "required": [
                            "count",
                            "avgOverdueSecs"
                          ],
                          "description": "Next response clock: the team's next reply after the customer writes again."
                        },
                        "resolution": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "number",
                              "description": "Number of clocks that settled after missing their target.",
                              "example": 9
                            },
                            "avgOverdueSecs": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Average time past the target when they settled, in seconds. Null when there are none.",
                              "example": 5400
                            }
                          },
                          "required": [
                            "count",
                            "avgOverdueSecs"
                          ],
                          "description": "Time to close clock: closing a conversation."
                        },
                        "timeToResolve": {
                          "type": "object",
                          "properties": {
                            "count": {
                              "type": "number",
                              "description": "Number of clocks that settled after missing their target.",
                              "example": 9
                            },
                            "avgOverdueSecs": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Average time past the target when they settled, in seconds. Null when there are none.",
                              "example": 5400
                            }
                          },
                          "required": [
                            "count",
                            "avgOverdueSecs"
                          ],
                          "description": "Time to resolve clock: a ticket reaching a status in the `closed` category."
                        }
                      },
                      "required": [
                        "firstResponse",
                        "nextResponse",
                        "resolution",
                        "timeToResolve"
                      ],
                      "description": "How late clocks that missed their target settled, per clock."
                    }
                  },
                  "required": [
                    "sla",
                    "slaByPolicy",
                    "slaHeatmap",
                    "slaTimeAfterMiss"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/reporting/attribute-breakdown": {
      "get": {
        "operationId": "attributeQuillsBreakdown",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Count conversations per value of one attribute",
        "description": "Counts the conversations created in `[from, to)`, a range of at most 400 days, per stored value of one custom attribute, excluding test customers' conversations. The key needn't have a definition, so imported keys work too. A list value (multi-select) counts the conversation once for each member. Null and empty values count as unset. `values` holds the 100 most frequent values, most frequent first and then by value; `truncated` is true when more exist. Select values are option IDs, not labels. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "Start of the date range, inclusive. ISO 8601 date-time with a UTC offset.",
              "example": "2026-02-01T00:00:00Z"
            },
            "required": true,
            "description": "Start of the date range, inclusive. ISO 8601 date-time with a UTC offset.",
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "End of the date range, exclusive. ISO 8601 date-time with a UTC offset. Must be after `from` and at most 400 days later (400 otherwise).",
              "example": "2026-03-01T00:00:00Z"
            },
            "required": true,
            "description": "End of the date range, exclusive. ISO 8601 date-time with a UTC offset. Must be after `from` and at most 400 days later (400 otherwise).",
            "name": "to",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9_.-]+$",
              "description": "Custom attribute key to break down, 1 to 64 lowercase letters, digits, `_`, `.` or `-`.",
              "example": "plan_tier"
            },
            "required": true,
            "description": "Custom attribute key to break down, 1 to 64 lowercase letters, digits, `_`, `.` or `-`.",
            "name": "key",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Conversation counts per attribute value",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unset": {
                      "type": "number",
                      "description": "Number of conversations in the range with no value for the key (missing, null, empty string or empty list).",
                      "example": 41
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "value": {
                            "type": "string",
                            "description": "Stored value as text: a string, a number, `true`/`false`, or an option ID for select attributes.",
                            "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of conversations with this value.",
                            "example": 87
                          }
                        },
                        "required": [
                          "value",
                          "count"
                        ]
                      },
                      "description": "Up to 100 most frequent values, most frequent first, then by value."
                    },
                    "truncated": {
                      "type": "boolean",
                      "description": "Whether more values exist beyond the 100 returned.",
                      "example": false
                    }
                  },
                  "required": [
                    "unset",
                    "values",
                    "truncated"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/bulk": {
      "post": {
        "operationId": "bulkQuillsUpdateConversations",
        "tags": [
          "Conversations"
        ],
        "summary": "Apply one action to many conversations",
        "description": "Applies one action to up to 100 conversations in one transaction. All or nothing: a missing conversation, a missing assignee, team or tag, a close blocked by an empty attribute marked required to close, or `restore_spam` on a conversation that wasn't ended as spam fails the request with 404 or 409 and changes nothing. Each conversation gets the same changes, transcript notices and snooze wake-ups as the matching single-conversation operation. Conversations already in the target state stay unchanged and are left out of `changedIds`. Requires the `update` permission. Records one `conversation.bulk_updated` event with the action and the number of changed conversations when at least one changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `conversation` prefix. Requests also accept the bare UUID.",
                      "example": "conversation_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "IDs of the conversations to act on, as TypeIDs or UUIDs. 1 to 100, each at most once.",
                    "example": [
                      "conversation_01m8rxv9wze05sk3mc2x5ss7d8",
                      "conversation_01m8rxv9wze05sk3mqg8q40byn"
                    ]
                  },
                  "action": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "assign"
                            ],
                            "description": "`assign`: assign every conversation to one teammate, or unassign them."
                          },
                          "assigneePrincipalId": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "me"
                                ]
                              },
                              {
                                "type": "string",
                                "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                                "example": "principal_01h455vb4pex5vsknk084sn02q"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Teammate to assign: `me` for the caller, a teammate's principal ID (TypeID or UUID), or null to unassign. The teammate must belong to a current workspace member, otherwise the request fails with 404.",
                            "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                          }
                        },
                        "required": [
                          "type",
                          "assigneePrincipalId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "assign_team"
                            ],
                            "description": "`assign_team`: assign every conversation to one team, or clear the team."
                          },
                          "teamId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Team to assign, as a TypeID or its UUID. The team must exist and not be deleted. Null clears the team.",
                            "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                          }
                        },
                        "required": [
                          "type",
                          "teamId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "priority"
                            ],
                            "description": "`priority`: set the same priority on every conversation."
                          },
                          "priority": {
                            "type": "string",
                            "enum": [
                              "none",
                              "low",
                              "medium",
                              "high",
                              "urgent"
                            ],
                            "description": "New priority. `none` clears it; `low`, `medium`, `high` and `urgent` go from lowest to highest.",
                            "example": "urgent"
                          }
                        },
                        "required": [
                          "type",
                          "priority"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "snooze"
                            ],
                            "description": "`snooze`: snooze every conversation."
                          },
                          "until": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "maxLength": 64,
                            "format": "date-time",
                            "description": "Wake time, ISO 8601 with a UTC offset. Null snoozes until the customer replies.",
                            "example": "2026-03-16T08:00:00Z"
                          }
                        },
                        "required": [
                          "type",
                          "until"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "tag"
                            ],
                            "description": "`tag`: add one tag to every conversation."
                          },
                          "tagId": {
                            "type": "string",
                            "description": "Tag to add, as a TypeID or its UUID. It must be a live (not archived) tag. Conversations that already carry it count as unchanged.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          }
                        },
                        "required": [
                          "type",
                          "tagId"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "close"
                            ],
                            "description": "`close`: close every conversation without an end reason. Each open or snoozed one needs every attribute marked required to close filled."
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "reopen"
                            ],
                            "description": "`reopen`: set every conversation to `open`, waking snoozed ones and clearing the end reason, end note and spam marker of closed ones. Each closed one gets a `Conversation reopened` notice that the customer also sees."
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "restore_spam"
                            ],
                            "description": "`restore_spam`: reopen conversations ended as spam. Every conversation must have been ended as spam."
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "mark_spam"
                            ],
                            "description": "`mark_spam`: end every conversation as spam (`spamReason` `manual`), without the required-attribute check."
                          },
                          "blockVisitors": {
                            "type": "boolean",
                            "description": "When true, also blocks each conversation's visitor for 30 days, unless the visitor is a teammate. An existing block on the visitor is renewed for 30 days. Defaults to false.",
                            "example": true
                          }
                        },
                        "required": [
                          "type"
                        ]
                      }
                    ],
                    "description": "The action to apply to every conversation, chosen by `type`."
                  }
                },
                "required": [
                  "conversationIds",
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The applied action and the conversations it changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "type": "string",
                      "description": "The action that was applied: `action.type` from the request.",
                      "example": "close"
                    },
                    "firstId": {
                      "type": "string",
                      "description": "First conversation ID of the request, as sent. The recorded event names it.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "count": {
                      "type": "number",
                      "description": "Number of conversations in the request.",
                      "example": 2
                    },
                    "changedIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "IDs of the conversations the action changed, in ascending ID order. Conversations already in the target state are left out.",
                      "example": [
                        "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                      ]
                    }
                  },
                  "required": [
                    "action",
                    "firstId",
                    "count",
                    "changedIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A conversation, the assignee (`assign`), the team (`assign_team`) or the live tag (`tag`) doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A `close` is blocked by an empty attribute marked required to close, or `restore_spam` includes a conversation that wasn't ended as spam",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/bulk-delete": {
      "post": {
        "operationId": "bulkQuillsDeleteConversations",
        "tags": [
          "Conversations"
        ],
        "summary": "Delete spam-ended conversations for good",
        "description": "Permanently deletes up to 100 conversations that were ended as spam (closed with the end reason `spam`), in one transaction. If any of them wasn't, nothing is deleted (409). Their messages, tags, participants and summaries are deleted with them, and their stored attachments are queued for cleanup. This can't be undone. Requires the `delete` permission. Records one `conversation.deleted` event with the number of deleted conversations.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `conversation` prefix. Requests also accept the bare UUID.",
                      "example": "conversation_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "IDs of the conversations to act on, as TypeIDs or UUIDs. 1 to 100, each at most once.",
                    "example": [
                      "conversation_01m8rxv9wze05sk3mc2x5ss7d8",
                      "conversation_01m8rxv9wze05sk3mqg8q40byn"
                    ]
                  }
                },
                "required": [
                  "conversationIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The deleted conversations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "firstId": {
                      "type": "string",
                      "description": "First conversation ID of the request, as sent. The recorded event names it.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "deletedIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "IDs of the deleted conversations, in ascending ID order.",
                      "example": [
                        "conversation_01m8rxv9wze05sk3mc2x5ss7d8",
                        "conversation_01m8rxv9wze05sk3mqg8q40byn"
                      ]
                    }
                  },
                  "required": [
                    "firstId",
                    "deletedIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A conversation isn't closed with the end reason `spam`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/merge/preview": {
      "post": {
        "operationId": "previewQuillsConversationMerge",
        "tags": [
          "Conversations"
        ],
        "summary": "Preview merging one or more conversations into a target conversation",
        "description": "Reports what merging the source conversations into the target would do, and changes nothing: how many messages and attachments would move, and whether the merge crosses requesters or companies and so needs confirmation. Repeated source IDs count once. It doesn't check whether a conversation is already merged. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sourceConversationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `conversation` prefix. Requests also accept the bare UUID.",
                      "example": "conversation_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "IDs of the conversations to merge into the target, 1 to 20. Each accepts the TypeID or its UUID; a repeated ID counts once.",
                    "example": [
                      "conversation_01m8rzbm5kfqfrqfj1rjzd94ch"
                    ]
                  },
                  "targetConversationId": {
                    "type": "string",
                    "description": "ID of the conversation to merge into. Accepts the TypeID or its UUID.",
                    "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                  }
                },
                "required": [
                  "sourceConversationIds",
                  "targetConversationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Impact preview of the conversation merge",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "targetConversationId": {
                      "type": "string",
                      "description": "ID of the target conversation.",
                      "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                    },
                    "sourceCount": {
                      "type": "number",
                      "description": "Number of distinct source conversations.",
                      "example": 1
                    },
                    "messagesToMove": {
                      "type": "number",
                      "description": "Number of messages that would move into the target, internal notes and system messages included.",
                      "example": 7
                    },
                    "attachmentsToMove": {
                      "type": "number",
                      "description": "Number of files attached to those messages.",
                      "example": 2
                    },
                    "crossRequester": {
                      "type": "boolean",
                      "description": "Whether any source conversation has a different requester than the target.",
                      "example": false
                    },
                    "crossCompany": {
                      "type": "boolean",
                      "description": "Whether any source's requester belongs to a different company than the target's requester, both known.",
                      "example": false
                    },
                    "requiresConfirmation": {
                      "type": "boolean",
                      "description": "Whether the merge needs `confirmCrossRequester` or `confirmCrossCompany`: true when `crossRequester` or `crossCompany` is.",
                      "example": false
                    }
                  },
                  "required": [
                    "targetConversationId",
                    "sourceCount",
                    "messagesToMove",
                    "attachmentsToMove",
                    "crossRequester",
                    "crossCompany",
                    "requiresConfirmation"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A source conversation is the target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The target or a source conversation was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/merge": {
      "post": {
        "operationId": "mergeQuillsConversations",
        "tags": [
          "Conversations"
        ],
        "summary": "Merge one or more conversations into a target conversation (reversible)",
        "description": "Merges each source conversation into the target, in request order and in one transaction: when one fails, nothing is merged. For each source, all its messages (internal notes included) move to the target with their attachments; the tags and participants the target lacks are copied; a system message about the merge is added to both conversations, as an internal note unless `notifyRequester` is true; the source is closed with the end reason `merged`; and the target's last-message preview is refreshed. A merge between different requesters, or between requesters of different companies, needs the matching confirmation flag. Each merge can be undone. Requires the `update` permission. Records one `conversation.merged` event for the request.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sourceConversationIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `conversation` prefix. Requests also accept the bare UUID.",
                      "example": "conversation_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "IDs of the conversations to merge into the target, 1 to 20. Each accepts the TypeID or its UUID; a repeated ID counts once.",
                    "example": [
                      "conversation_01m8rzbm5kfqfrqfj1rjzd94ch"
                    ]
                  },
                  "targetConversationId": {
                    "type": "string",
                    "description": "ID of the conversation to merge into. Accepts the TypeID or its UUID. Its status doesn't change.",
                    "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                  },
                  "confirmCrossRequester": {
                    "type": "boolean",
                    "default": false,
                    "description": "Set to `true` to allow a merge between different requesters. Defaults to `false`; such a merge then answers 409.",
                    "example": false
                  },
                  "confirmCrossCompany": {
                    "type": "boolean",
                    "default": false,
                    "description": "Set to `true` to allow a merge between different companies. Defaults to `false`; such a merge then answers 409.",
                    "example": false
                  },
                  "notifyRequester": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the merge notices are posted as customer-visible system messages instead of internal notes. Defaults to `false`.",
                    "example": false
                  }
                },
                "required": [
                  "sourceConversationIds",
                  "targetConversationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created reversible conversation merge records",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "merges": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Merge record ID, a UUID. Use it to undo the merge.",
                            "example": "3da2c4ff-fd19-41fe-887b-a4abfdcd52fe"
                          },
                          "entityKind": {
                            "type": "string",
                            "enum": [
                              "conversation",
                              "ticket"
                            ],
                            "description": "What was merged. `conversation`: a conversation into another; `ticket`: a ticket into another.",
                            "example": "conversation"
                          },
                          "sourceId": {
                            "type": "string",
                            "description": "ID of the conversation or ticket that was merged away (the source).",
                            "example": "conversation_01m8rzbm5kfqfrqfj1rjzd94ch"
                          },
                          "targetId": {
                            "type": "string",
                            "description": "ID of the conversation or ticket that the source was merged into (the target).",
                            "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                          },
                          "crossRequester": {
                            "type": "boolean",
                            "description": "Whether the source and target had different requesters.",
                            "example": false
                          },
                          "crossCompany": {
                            "type": "boolean",
                            "description": "Whether the source and target belonged to different companies, both known.",
                            "example": false
                          },
                          "notifyRequester": {
                            "type": "boolean",
                            "description": "Whether the merge notices in the conversations were posted as customer-visible system messages rather than internal notes. A ticket's own merge note is always internal.",
                            "example": false
                          },
                          "mergedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who merged. Null when that principal was deleted.",
                            "example": "principal_01m8rzbm5kfqfrqfhab8sk7x9b"
                          },
                          "undoneAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the merge was undone, in ISO 8601 UTC. Null while it's in place.",
                            "example": null
                          },
                          "undoneByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who undid the merge. Null while it's in place or when that principal was deleted.",
                            "example": null
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time of the merge, in ISO 8601 UTC.",
                            "example": "2026-12-16T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "entityKind",
                          "sourceId",
                          "targetId",
                          "crossRequester",
                          "crossCompany",
                          "notifyRequester",
                          "mergedByPrincipalId",
                          "undoneAt",
                          "undoneByPrincipalId",
                          "createdAt"
                        ],
                        "description": "A reversible merge of one conversation or ticket into another, with what's needed to undo it kept on the server."
                      },
                      "description": "One merge record per distinct source conversation, in request order."
                    }
                  },
                  "required": [
                    "merges"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A source conversation is the target",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The target or a source conversation was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A merge crosses requesters or companies without the confirmation flag, or the target or a source conversation is already merged into another",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/merges/{mergeId}/undo": {
      "post": {
        "operationId": "undoQuillsConversationMerge",
        "tags": [
          "Conversations"
        ],
        "summary": "Undo a conversation merge and restore all messages, attachments, and state",
        "description": "Undoes a conversation merge: the messages it moved go back to the source with their attachments, its two merge notices are deleted, the tags and participants it added to the target are removed, the source's status, end reason, end note and resolved and archived times are restored, and both conversations' last-message previews are refreshed. Messages added to the target after the merge stay there. When the target has since been merged into another conversation, undo that merge first. Requires the `update` permission. Records a `conversation.merge_undone` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Merge record ID, a UUID, as returned by the merge.",
              "example": "3da2c4ff-fd19-41fe-887b-a4abfdcd52fe"
            },
            "required": true,
            "description": "Merge record ID, a UUID, as returned by the merge.",
            "name": "mergeId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The undone merge record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Merge record ID, a UUID. Use it to undo the merge.",
                      "example": "3da2c4ff-fd19-41fe-887b-a4abfdcd52fe"
                    },
                    "entityKind": {
                      "type": "string",
                      "enum": [
                        "conversation",
                        "ticket"
                      ],
                      "description": "What was merged. `conversation`: a conversation into another; `ticket`: a ticket into another.",
                      "example": "conversation"
                    },
                    "sourceId": {
                      "type": "string",
                      "description": "ID of the conversation or ticket that was merged away (the source).",
                      "example": "conversation_01m8rzbm5kfqfrqfj1rjzd94ch"
                    },
                    "targetId": {
                      "type": "string",
                      "description": "ID of the conversation or ticket that the source was merged into (the target).",
                      "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                    },
                    "crossRequester": {
                      "type": "boolean",
                      "description": "Whether the source and target had different requesters.",
                      "example": false
                    },
                    "crossCompany": {
                      "type": "boolean",
                      "description": "Whether the source and target belonged to different companies, both known.",
                      "example": false
                    },
                    "notifyRequester": {
                      "type": "boolean",
                      "description": "Whether the merge notices in the conversations were posted as customer-visible system messages rather than internal notes. A ticket's own merge note is always internal.",
                      "example": false
                    },
                    "mergedByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who merged. Null when that principal was deleted.",
                      "example": "principal_01m8rzbm5kfqfrqfhab8sk7x9b"
                    },
                    "undoneAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the merge was undone, in ISO 8601 UTC. Null while it's in place.",
                      "example": null
                    },
                    "undoneByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who undid the merge. Null while it's in place or when that principal was deleted.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the merge, in ISO 8601 UTC.",
                      "example": "2026-12-16T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "entityKind",
                    "sourceId",
                    "targetId",
                    "crossRequester",
                    "crossCompany",
                    "notifyRequester",
                    "mergedByPrincipalId",
                    "undoneAt",
                    "undoneByPrincipalId",
                    "createdAt"
                  ],
                  "description": "A reversible merge of one conversation or ticket into another, with what's needed to undo it kept on the server."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No conversation merge record with that ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The merge was already undone, the target conversation has since been merged into another (undo that merge first), or the source is now merged into a different conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations": {
      "get": {
        "operationId": "listQuillsConversations",
        "tags": [
          "Conversations"
        ],
        "summary": "List support conversations",
        "description": "Lists the workspace's conversations one page at a time, in the order of `sort`. Test conversations are always left out. Spam-ended conversations appear only with `view=spam` or `view=archived`, and archived ones only with `view=archived`. `view=mentions` and `view=created_by_me` always refer to the caller. Pass `nextCursor` as `cursor` to get the next page. Writes nothing. Requires the `read` permission. A caller without the `update` permission who belongs to one or more teams sees only conversations assigned to those teams.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "snoozed",
                "closed"
              ],
              "description": "Only conversations with this status. `open`: active; `snoozed`: set aside until a wake time or the customer's reply; `closed`: ended. Omit for every status.",
              "example": "open"
            },
            "required": false,
            "description": "Only conversations with this status. `open`: active; `snoozed`: set aside until a wake time or the customer's reply; `closed`: ended. Omit for every status.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "low",
                "medium",
                "high",
                "urgent"
              ],
              "description": "Only items with this priority. For conversations, `none` means no priority set. Omit for every priority.",
              "example": "urgent"
            },
            "required": false,
            "description": "Only items with this priority. For conversations, `none` means no priority set. Omit for every priority.",
            "name": "priority",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "mine",
                    "unassigned"
                  ]
                },
                {
                  "type": "string",
                  "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                  "example": "principal_01h455vb4pex5vsknk084sn02q"
                }
              ],
              "description": "Only items with this assigned teammate: `mine` for the caller, `unassigned` for items with no assigned teammate, or a teammate's principal ID (TypeID or UUID). Omit for any assignee.",
              "example": "mine"
            },
            "required": false,
            "description": "Only items with this assigned teammate: `mine` for the caller, `unassigned` for items with no assigned teammate, or a teammate's principal ID (TypeID or UUID). Omit for any assignee.",
            "name": "assignee",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only items assigned to this team. Accepts the TypeID or its UUID.",
              "example": "team_01m8rxv9wze05sk3nqtd18s18g"
            },
            "required": false,
            "description": "Only items assigned to this team. Accepts the TypeID or its UUID.",
            "name": "teamId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only conversations with this visitor (customer). Accepts the principal TypeID or its UUID.",
              "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
            },
            "required": false,
            "description": "Only conversations with this visitor (customer). Accepts the principal TypeID or its UUID.",
            "name": "visitorPrincipalId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only conversations that carry this tag. Accepts the TypeID or its UUID.",
              "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
            },
            "required": false,
            "description": "Only conversations that carry this tag. Accepts the TypeID or its UUID.",
            "name": "tagId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "messenger",
                "email",
                "github"
              ],
              "description": "Only conversations currently on this channel: `messenger` (in-app chat), `email` or `github`.",
              "example": "email"
            },
            "required": false,
            "description": "Only conversations currently on this channel: `messenger` (in-app chat), `email` or `github`.",
            "name": "channel",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32,
              "description": "Only conversations that arrived from this source, such as `widget`, `portal`, `email`, `github` or `ticket_form`. Exact match, up to 32 characters.",
              "example": "widget"
            },
            "required": false,
            "description": "Only conversations that arrived from this source, such as `widget`, `portal`, `email`, `github` or `ticket_form`. Exact match, up to 32 characters.",
            "name": "source",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "`true` lists only conversations where the customer is waiting for a reply (`waitingSince` is set). Defaults to `false`.",
              "example": "true"
            },
            "required": false,
            "description": "`true` lists only conversations where the customer is waiting for a reply (`waitingSince` is set). Defaults to `false`.",
            "name": "waitingOnly",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "Only conversations whose `updatedAt` is at or after this time, for an integration that syncs changes. ISO 8601 with a UTC offset. Conversations with no recorded change (`updatedAt` null) are left out.",
              "example": "2026-03-14T00:00:00Z"
            },
            "required": false,
            "description": "Only conversations whose `updatedAt` is at or after this time, for an integration that syncs changes. ISO 8601 with a UTC offset. Conversations with no recorded change (`updatedAt` null) are left out.",
            "name": "updatedSince",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "`true` lists only conversations with a customer message (not deleted) after the team's read mark. Defaults to `false`.",
              "example": "true"
            },
            "required": false,
            "description": "`true` lists only conversations with a customer message (not deleted) after the team's read mark. Defaults to `false`.",
            "name": "unreadOnly",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "mentions",
                "spam",
                "created_by_me",
                "archived"
              ],
              "default": "all",
              "description": "Saved slice of the inbox. `all`: every conversation that isn't archived or ended as spam. `mentions`: conversations where an internal note (not deleted) mentions the caller. `spam`: closed conversations ended as spam. `created_by_me`: conversations whose first sent, undeleted message is a teammate message from the caller. `archived`: archived conversations only, spam included. Every view except `spam` and `archived` leaves out spam-ended conversations, and every view except `archived` leaves out archived ones. Defaults to `all`.",
              "example": "all"
            },
            "required": false,
            "description": "Saved slice of the inbox. `all`: every conversation that isn't archived or ended as spam. `mentions`: conversations where an internal note (not deleted) mentions the caller. `spam`: closed conversations ended as spam. `created_by_me`: conversations whose first sent, undeleted message is a teammate message from the caller. `archived`: archived conversations only, spam included. Every view except `spam` and `archived` leaves out spam-ended conversations, and every view except `archived` leaves out archived ones. Defaults to `all`.",
            "name": "view",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Case-insensitive text to look for. A conversation matches when its subject, the visitor's name or the text of one of its sent, undeleted messages (internal notes included) contains it. Up to 200 characters.",
              "example": "password reset"
            },
            "required": false,
            "description": "Case-insensitive text to look for. A conversation matches when its subject, the visitor's name or the text of one of its sent, undeleted messages (internal notes included) contains it. Up to 200 characters.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "oldest",
                "created",
                "waiting",
                "priority"
              ],
              "default": "recent",
              "description": "Sort order. `recent`: latest `lastMessageAt` first. `oldest`: earliest `lastMessageAt` first. `created`: newest `createdAt` first. `waiting`: longest-waiting customer first (earliest `waitingSince`), conversations nobody is waiting on last. `priority`: `urgent` to `none`, then latest `lastMessageAt`. Ties break by ID. Defaults to `recent`.",
              "example": "recent"
            },
            "required": false,
            "description": "Sort order. `recent`: latest `lastMessageAt` first. `oldest`: earliest `lastMessageAt` first. `created`: newest `createdAt` first. `waiting`: longest-waiting customer first (earliest `waitingSince`), conversations nobody is waiting on last. `priority`: `urgent` to `none`, then latest `lastMessageAt`. Ties break by ID. Defaults to `recent`.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "`nextCursor` from the previous page: the ID of its last conversation. Returns the conversations after it in the same sort, filters and view. A cursor that isn't a conversation the caller can see fails with 404.",
              "example": "conversation_01m8rxv9wze05sk3mqg8q40byn"
            },
            "required": false,
            "description": "`nextCursor` from the previous page: the ID of its last conversation. Returns the conversations after it in the same sort, filters and view. A cursor that isn't a conversation the caller can see fails with 404.",
            "name": "cursor",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25,
              "description": "Maximum number of items to return, 1 to 100. Defaults to 25.",
              "example": 25
            },
            "required": false,
            "description": "Maximum number of items to return, 1 to 100. Defaults to 25.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of conversations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation ID.",
                            "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "open",
                              "snoozed",
                              "closed"
                            ],
                            "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                            "example": "open"
                          },
                          "priority": {
                            "type": "string",
                            "enum": [
                              "none",
                              "low",
                              "medium",
                              "high",
                              "urgent"
                            ],
                            "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                            "example": "high"
                          },
                          "channel": {
                            "type": "string",
                            "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                            "example": "messenger"
                          },
                          "source": {
                            "type": "string",
                            "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                            "example": "widget"
                          },
                          "subject": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                            "example": "Can't sign in after resetting my password"
                          },
                          "lastMessagePreview": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                            "example": "I tried the reset link twice, but it still says my session expired."
                          },
                          "lastMessageAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the conversation was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T08:02:11.000Z"
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "visitorPrincipalId": {
                            "type": "string",
                            "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                            "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                          },
                          "visitorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                            "example": "Dana Whitfield"
                          },
                          "visitorAvatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the visitor's profile picture. Null when there's none.",
                            "example": "https://example.com/avatars/dana.png"
                          },
                          "visitorEmail": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                            "example": "dana@example.com"
                          },
                          "isTest": {
                            "type": "boolean",
                            "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                            "example": false
                          },
                          "assignedAgentPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                            "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                          },
                          "assignedTeamId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                            "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                          },
                          "unreadCount": {
                            "type": "number",
                            "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                            "example": 2
                          },
                          "waitingSince": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                            "example": "2026-03-14T09:20:40.000Z"
                          },
                          "snoozedUntil": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                            "example": "2026-03-16T08:00:00.000Z"
                          },
                          "resolvedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                            "example": "2026-03-14T10:05:00.000Z"
                          },
                          "archivedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                            "example": null
                          },
                          "endReason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                            "example": "resolved"
                          },
                          "endNote": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                            "example": "Customer confirmed the new password works."
                          },
                          "spamReason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                            "example": null
                          },
                          "csatRating": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                            "example": 5
                          },
                          "forwardParseFailed": {
                            "type": "boolean",
                            "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                            "example": false
                          },
                          "agentLastReadAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                            "example": "2026-03-14T09:25:00.000Z"
                          },
                          "visitorLastReadAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                            "example": "2026-03-14T09:24:12.000Z"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Conversation tag ID.",
                                  "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "Tag name.",
                                  "example": "Billing"
                                },
                                "color": {
                                  "type": "string",
                                  "description": "Tag color as a hex code.",
                                  "example": "#6b7280"
                                }
                              },
                              "required": [
                                "id",
                                "name",
                                "color"
                              ]
                            },
                            "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "priority",
                          "channel",
                          "source",
                          "subject",
                          "lastMessagePreview",
                          "lastMessageAt",
                          "createdAt",
                          "updatedAt",
                          "visitorPrincipalId",
                          "visitorName",
                          "visitorAvatarUrl",
                          "visitorEmail",
                          "isTest",
                          "assignedAgentPrincipalId",
                          "assignedTeamId",
                          "unreadCount",
                          "waitingSince",
                          "snoozedUntil",
                          "resolvedAt",
                          "archivedAt",
                          "endReason",
                          "endNote",
                          "spamReason",
                          "csatRating",
                          "forwardParseFailed",
                          "agentLastReadAt",
                          "visitorLastReadAt",
                          "tags"
                        ]
                      },
                      "description": "Conversations on this page, in the requested sort."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page: pass it as `cursor`. Null on the last page.",
                      "example": "conversation_01m8rxv9wze05sk3mqg8q40byn"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "True when more conversations follow this page.",
                      "example": true
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The `cursor` conversation doesn't exist in this workspace or isn't visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "startQuillsAgentConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "Start a conversation with a customer",
        "description": "Opens an open email conversation with an identified customer, assigned to the caller, whose first message is the caller's plain-text reply. The subject is the start of the message, cut to 140 characters. The request sends nothing itself: after commit, its `message.created` event makes the delivery worker mail the message to the customer, and the customer's mail reply threads back into the conversation. A lead (an anonymous visitor), a blocked customer and a customer with no real email address are refused with 409. A teammate, a test customer or a principal of another workspace answers 404. Requires the `update` permission. Records a `conversation.agent_started` event and a `message.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetPrincipalId": {
                    "type": "string",
                    "description": "Principal ID of the customer to write to. Must be an identified, unblocked customer of this workspace with a real email address. Accepts the TypeID or its UUID.",
                    "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Message text, as plain text. Leading and trailing whitespace is trimmed. 1 to 10,000 characters.",
                    "example": "I've reset the password on the account. Please try signing in again."
                  }
                },
                "required": [
                  "targetPrincipalId",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new conversation and its first message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                          "example": "open"
                        },
                        "priority": {
                          "type": "string",
                          "enum": [
                            "none",
                            "low",
                            "medium",
                            "high",
                            "urgent"
                          ],
                          "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                          "example": "high"
                        },
                        "channel": {
                          "type": "string",
                          "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                          "example": "messenger"
                        },
                        "source": {
                          "type": "string",
                          "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                          "example": "widget"
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                          "example": "Can't sign in after resetting my password"
                        },
                        "lastMessagePreview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                          "example": "I tried the reset link twice, but it still says my session expired."
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T08:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "visitorPrincipalId": {
                          "type": "string",
                          "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                          "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                        },
                        "visitorName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                          "example": "Dana Whitfield"
                        },
                        "visitorAvatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "URL of the visitor's profile picture. Null when there's none.",
                          "example": "https://example.com/avatars/dana.png"
                        },
                        "visitorEmail": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                          "example": "dana@example.com"
                        },
                        "isTest": {
                          "type": "boolean",
                          "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                          "example": false
                        },
                        "assignedAgentPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                          "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                        },
                        "assignedTeamId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                          "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                        },
                        "unreadCount": {
                          "type": "number",
                          "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                          "example": 2
                        },
                        "waitingSince": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                          "example": "2026-03-14T09:20:40.000Z"
                        },
                        "snoozedUntil": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                          "example": "2026-03-16T08:00:00.000Z"
                        },
                        "resolvedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                          "example": "2026-03-14T10:05:00.000Z"
                        },
                        "archivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                          "example": null
                        },
                        "endReason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                          "example": "resolved"
                        },
                        "endNote": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                          "example": "Customer confirmed the new password works."
                        },
                        "spamReason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                          "example": null
                        },
                        "csatRating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                          "example": 5
                        },
                        "forwardParseFailed": {
                          "type": "boolean",
                          "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                          "example": false
                        },
                        "agentLastReadAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                          "example": "2026-03-14T09:25:00.000Z"
                        },
                        "visitorLastReadAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                          "example": "2026-03-14T09:24:12.000Z"
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Conversation tag ID.",
                                "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                              },
                              "name": {
                                "type": "string",
                                "description": "Tag name.",
                                "example": "Billing"
                              },
                              "color": {
                                "type": "string",
                                "description": "Tag color as a hex code.",
                                "example": "#6b7280"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ]
                          },
                          "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "priority",
                        "channel",
                        "source",
                        "subject",
                        "lastMessagePreview",
                        "lastMessageAt",
                        "createdAt",
                        "updatedAt",
                        "visitorPrincipalId",
                        "visitorName",
                        "visitorAvatarUrl",
                        "visitorEmail",
                        "isTest",
                        "assignedAgentPrincipalId",
                        "assignedTeamId",
                        "unreadCount",
                        "waitingSince",
                        "snoozedUntil",
                        "resolvedAt",
                        "archivedAt",
                        "endReason",
                        "endNote",
                        "spamReason",
                        "csatRating",
                        "forwardParseFailed",
                        "agentLastReadAt",
                        "visitorLastReadAt",
                        "tags"
                      ],
                      "description": "The new conversation, as the inbox list shows it."
                    },
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer. `agent`: the team side, a teammate or the AI assistant. `system`: an automatic notice with no human author, such as an assignment or a status change.",
                          "example": "agent"
                        },
                        "isInternal": {
                          "type": "boolean",
                          "description": "Whether the message is team-only: an internal note or a team-only system notice. The customer never sees it.",
                          "example": false
                        },
                        "authorPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the author, a customer or a teammate. Null for system notices.",
                          "example": "principal_01m8rxy505fewvz41crbgqs67r"
                        },
                        "authorName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name: the account name, else the profile's display name. Null for system notices and for authors with no name.",
                          "example": "Dana Whitfield"
                        },
                        "content": {
                          "type": "string",
                          "description": "Plain-text body. Empty for a message that only embeds a card, such as a shared feedback post. After a text redaction it holds the replacement text, `[Redacted]` by default.",
                          "example": "Thanks for the details. I've reset your invite, so please try the link again."
                        },
                        "systemKind": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Kind of system notice: `chat_ended` (resolved), `chat_reopened`, `assigned`, `assistant_handoff`, `ticket_status_changed`, `ticket_linked`, `ticket_created`, `assistant_action_expired`, `external_linked`, `external_unlinked`, `external_status_changed`, `priority_changed`, `snoozed`, `csat_submitted` or `away_reply`. Null for messages that aren't system notices, and for notices stored without a kind, such as a team assignment.",
                          "example": "assigned"
                        },
                        "systemActorPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the teammate who resolved or reopened the conversation, on `chat_ended` and `chat_reopened` notices. Null on other messages, on notices caused by automation or the customer, and on older notices.",
                          "example": "principal_01m8rxy505fewvz41pk221r0d3"
                        },
                        "emailAuth": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "spf": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "SPF result: `pass`, `fail` or `none` (no result).",
                              "example": "pass"
                            },
                            "dkim": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "DKIM result: `pass`, `fail` or `none` (no result).",
                              "example": "pass"
                            },
                            "dmarc": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "DMARC result: `pass`, `fail` or `none` (no result).",
                              "example": "none"
                            }
                          },
                          "required": [
                            "spf",
                            "dkim",
                            "dmarc"
                          ],
                          "description": "SPF, DKIM and DMARC results that the receiving mail server reported for an inbound email. Null for messages that didn't arrive by email."
                        },
                        "widgetMetadata": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Host-page context that the widget sent with a visitor's message, such as `pageUrl` and the browser, as key-value pairs. Only string values are returned. Null when none was sent.",
                          "example": {
                            "pageUrl": "https://app.example.com/settings/billing",
                            "browser": "Firefox 133"
                          }
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Type of the embedded record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the embedded record, as stored in the message.",
                                "example": "post_01m8rxy505fewvz428qxstz0z3"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Cards embedded at the top level of the message's rich content, in order, such as a shared feedback post. Empty for plain messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the stored file. Null for attachments written before the file pipeline and for inline images taken from rich content.",
                                "example": "file_01m8rxy505fewvz41w7gqgp4p1"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Empty for text-only messages and once a redaction removed them."
                        },
                        "reactions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "emoji": {
                                "type": "string",
                                "description": "Reaction emoji. One of 👍, ❤️, 🎉, 😄, 🤔 and 👀.",
                                "example": "👍"
                              },
                              "count": {
                                "type": "number",
                                "description": "Number of teammates who reacted with this emoji.",
                                "example": 2
                              },
                              "reacted": {
                                "type": "boolean",
                                "description": "Whether the caller is one of them.",
                                "example": true
                              }
                            },
                            "required": [
                              "emoji",
                              "count",
                              "reacted"
                            ]
                          },
                          "description": "Teammate reactions, one entry per emoji in use, sorted by emoji. Team-only. Empty when nobody reacted."
                        },
                        "flaggedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the caller saved the message for later, in ISO 8601 UTC. Personal to the caller. Null when the caller hasn't saved it.",
                          "example": "2026-03-14T09:30:12.000Z"
                        },
                        "sendStatus": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "scheduled",
                            "recalled"
                          ],
                          "description": "Delivery state. `sent`: in the thread, and visible to the customer unless it's internal. `scheduled`: a reply held for undo-send or a scheduled send; the customer doesn't see it until it's released. `recalled`: a held reply that was recalled before it went out.",
                          "example": "sent"
                        },
                        "scheduledSendAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a held reply is or was due to go out, in ISO 8601 UTC. Kept after the reply is released or recalled. Null for messages that were never held.",
                          "example": "2026-03-14T09:27:23.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was posted, in ISO 8601 UTC. For a held reply that was released, the release time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the body was last edited, in ISO 8601 UTC. Null if it was never edited.",
                          "example": "2026-03-14T09:41:05.000Z"
                        },
                        "redactedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate redacted the message's text or attachments, in ISO 8601 UTC. Null if it was never redacted.",
                          "example": "2026-03-15T11:02:44.000Z"
                        },
                        "redactedByPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the teammate who redacted the message. Null if it was never redacted.",
                          "example": "principal_01m8rxy505fewvz41pk221r0d3"
                        },
                        "redactedByName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Display name of the teammate who redacted the message. Null if it was never redacted or the teammate has no name.",
                          "example": "Priya Natarajan"
                        },
                        "redactionReason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Reason the teammate gave for the redaction. Null if the message was never redacted.",
                          "example": "Customer shared a card number"
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "senderType",
                        "isInternal",
                        "authorPrincipalId",
                        "authorName",
                        "content",
                        "systemKind",
                        "systemActorPrincipalId",
                        "emailAuth",
                        "widgetMetadata",
                        "embeds",
                        "attachments",
                        "reactions",
                        "flaggedAt",
                        "sendStatus",
                        "scheduledSendAt",
                        "createdAt",
                        "editedAt",
                        "redactedAt",
                        "redactedByPrincipalId",
                        "redactedByName",
                        "redactionReason"
                      ],
                      "description": "A conversation message as teammates see it, including team-only data: internal notes, reactions and the caller's saved-for-later mark."
                    }
                  },
                  "required": [
                    "conversation",
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Person not found: not a customer of this workspace, or a teammate or test customer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The customer can't receive the message: a lead (not identified), blocked, or without a real email address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}": {
      "get": {
        "operationId": "getQuillsConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "Get a support conversation",
        "description": "Returns one conversation with its tags, custom attribute values, stored AI summary, satisfaction comment and translation state. Test conversations can be read here. Writes nothing. Requires the `read` permission. A caller without the `update` permission who belongs to one or more teams sees only conversations assigned to those teams; any other conversation returns 404.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace or isn't visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/transcript": {
      "get": {
        "operationId": "exportQuillsConversationTranscript",
        "tags": [
          "Conversations"
        ],
        "summary": "Export a conversation transcript",
        "description": "Exports the conversation as a Markdown document: a header with the conversation ID, subject, status, channel and creation time, then every sent, undeleted message oldest first with its author, role (visitor or agent) and time in UTC to the minute. Internal notes are included and marked `internal note`; system notices show as `System`. At most 5000 messages; `truncated` is true when more exist. Writes nothing. Requires the `read` permission. A caller without the `update` permission who belongs to one or more teams sees only conversations assigned to those teams; any other conversation returns 404.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The transcript as a Markdown document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "filename": {
                      "type": "string",
                      "description": "Suggested file name: `conversation-<conversation ID>.md`.",
                      "example": "conversation-conversation_01m8rxv9wze05sk3mc2x5ss7d8.md"
                    },
                    "mimeType": {
                      "type": "string",
                      "enum": [
                        "text/markdown"
                      ],
                      "description": "Media type of `content`. Always `text/markdown`.",
                      "example": "text/markdown"
                    },
                    "content": {
                      "type": "string",
                      "description": "The transcript as Markdown.",
                      "example": "# Conversation conversation_01m8rxv9wze05sk3mc2x5ss7d8\n\n- Subject: Can't sign in\n- Status: open\n- Channel: messenger\n- Created: 2026-03-14 08:02 UTC\n\n**Dana Whitfield (visitor)** · 2026-03-14 08:02 UTC\n\nI can't sign in after resetting my password.\n"
                    },
                    "truncated": {
                      "type": "boolean",
                      "description": "True when the conversation has more than 5000 messages and only the first 5000 are included.",
                      "example": false
                    }
                  },
                  "required": [
                    "filename",
                    "mimeType",
                    "content",
                    "truncated"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace or isn't visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/files": {
      "get": {
        "operationId": "listQuillsConversationFiles",
        "tags": [
          "Conversations"
        ],
        "summary": "List the files attached in a conversation",
        "description": "Lists the attachments of the conversation's sent, undeleted messages, internal notes included, newest message first. At most 200 attachments, with no paging. Writes nothing. Requires the `read` permission. A caller without the `update` permission who belongs to one or more teams sees only conversations assigned to those teams; any other conversation returns 404.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation's attachments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "messageId": {
                            "type": "string",
                            "description": "ID of the message the file is attached to.",
                            "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
                          },
                          "fileId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the stored file. Null when the attachment has no stored file record.",
                            "example": "file_01m8rxv9x0e05sk3pey9apwc45"
                          },
                          "name": {
                            "type": "string",
                            "description": "File name.",
                            "example": "error-screenshot.png"
                          },
                          "contentType": {
                            "type": "string",
                            "description": "MIME type of the file.",
                            "example": "image/png"
                          },
                          "size": {
                            "type": "number",
                            "description": "File size in bytes.",
                            "example": 48213
                          },
                          "isInternal": {
                            "type": "boolean",
                            "description": "True when the file is on an internal note, which the customer never sees.",
                            "example": false
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the message carrying the file was created, in ISO 8601 UTC.",
                            "example": "2026-03-14T08:05:31.000Z"
                          }
                        },
                        "required": [
                          "messageId",
                          "fileId",
                          "name",
                          "contentType",
                          "size",
                          "isInternal",
                          "createdAt"
                        ]
                      },
                      "description": "Attachments, newest message first. At most 200."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace or isn't visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/check-draft": {
      "post": {
        "operationId": "checkQuillsConversationDraft",
        "tags": [
          "Conversations"
        ],
        "summary": "Check a draft for details the customer already gave",
        "description": "Checks a teammate's reply draft for questions about details the customer already shared, so the teammate doesn't ask again. Scans the customer's latest 50 messages (not deleted) for an email address, an order, invoice or account reference, a URL, an error code and a browser or operating system, keeping the earliest match of each kind. A warning is returned when the draft asks for one of those details and a match exists. Pattern matching on English phrasing only; no AI is involved. Writes nothing. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "draft": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Reply draft to check, as plain text. Trimmed; 1 to 10,000 characters.",
                    "example": "Thanks for reaching out! What's your email so I can look up the account?"
                  }
                },
                "required": [
                  "draft"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Repeat-question warnings and the details the customer already gave",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "email",
                              "order_or_invoice_id",
                              "url",
                              "error_code",
                              "browser_or_os"
                            ],
                            "description": "Kind of detail the draft asks for again. `email`: an email address. `order_or_invoice_id`: an order, invoice, subscription or account reference. `url`: a web address. `error_code`: an error code or HTTP error status. `browser_or_os`: a browser or operating system name.",
                            "example": "email"
                          },
                          "message": {
                            "type": "string",
                            "description": "Readable warning that names the detail and its value.",
                            "example": "Customer already provided their email address (dana@example.com)"
                          },
                          "alreadyProvidedInMessageId": {
                            "type": "string",
                            "description": "ID of the customer message the detail was found in.",
                            "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
                          },
                          "snippet": {
                            "type": "string",
                            "description": "First 140 characters of that message.",
                            "example": "Hi, I'm dana@example.com and I can't sign in since this morning."
                          }
                        },
                        "required": [
                          "kind",
                          "message",
                          "alreadyProvidedInMessageId",
                          "snippet"
                        ]
                      },
                      "description": "One warning per kind of detail that the draft asks for and the customer already gave. Empty when there's none."
                    },
                    "providedFacts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "email",
                              "order_or_invoice_id",
                              "url",
                              "error_code",
                              "browser_or_os"
                            ],
                            "description": "Kind of detail. `email`: an email address. `order_or_invoice_id`: an order, invoice, subscription or account reference. `url`: a web address. `error_code`: an error code or HTTP error status. `browser_or_os`: a browser or operating system name.",
                            "example": "email"
                          },
                          "value": {
                            "type": "string",
                            "description": "The detail as it appears in the message.",
                            "example": "dana@example.com"
                          },
                          "messageId": {
                            "type": "string",
                            "description": "ID of the customer message the detail was found in.",
                            "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
                          },
                          "snippet": {
                            "type": "string",
                            "description": "First 140 characters of that message.",
                            "example": "Hi, I'm dana@example.com and I can't sign in since this morning."
                          }
                        },
                        "required": [
                          "kind",
                          "value",
                          "messageId",
                          "snippet"
                        ]
                      },
                      "description": "Details found in the customer's messages, at most one per kind, whether or not the draft asks for them."
                    }
                  },
                  "required": [
                    "warnings",
                    "providedFacts"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/messages": {
      "get": {
        "operationId": "listQuillsConversationMessages",
        "tags": [
          "Conversations"
        ],
        "summary": "List a conversation's messages, newest first",
        "description": "Lists one page of a conversation's messages, newest first (by `createdAt`, then ID). Deleted and recalled messages are left out; replies still held for undo-send or a scheduled send are included with `sendStatus: scheduled`. Internal notes and team-only notices appear only with `includeInternal=true`. To page back, pass the previous page's `nextCursor` as `before`. Requires the `read` permission. A caller without the `update` permission who belongs to teams sees only conversations assigned to one of those teams; any other conversation answers 404.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "Whether to include internal notes and team-only system notices. `true` or `false`. Defaults to `false`.",
              "example": "true"
            },
            "required": false,
            "description": "Whether to include internal notes and team-only system notices. `true` or `false`. Defaults to `false`.",
            "name": "includeInternal",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Cursor: ID of a message of this conversation. Only messages older than it are returned. Pass the previous page's `nextCursor`; it still works if that message was deleted since. A message of another conversation answers 404. Accepts the TypeID or its UUID. Omit for the newest page.",
              "example": "conversation_msg_01m8rxy505fewvz412bd547egh"
            },
            "required": false,
            "description": "Cursor: ID of a message of this conversation. Only messages older than it are returned. Pass the previous page's `nextCursor`; it still works if that message was deleted since. A message of another conversation answers 404. Accepts the TypeID or its UUID. Omit for the newest page.",
            "name": "before",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30,
              "description": "Maximum number of messages to return, 1 to 100. Defaults to 30.",
              "example": 30
            },
            "required": false,
            "description": "Maximum number of messages to return, 1 to 100. Defaults to 30.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of messages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Message ID.",
                            "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                          },
                          "conversationId": {
                            "type": "string",
                            "description": "ID of the conversation the message belongs to.",
                            "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                          },
                          "senderType": {
                            "type": "string",
                            "enum": [
                              "visitor",
                              "agent",
                              "system"
                            ],
                            "description": "Who wrote the message. `visitor`: the customer. `agent`: the team side, a teammate or the AI assistant. `system`: an automatic notice with no human author, such as an assignment or a status change.",
                            "example": "agent"
                          },
                          "isInternal": {
                            "type": "boolean",
                            "description": "Whether the message is team-only: an internal note or a team-only system notice. The customer never sees it.",
                            "example": false
                          },
                          "authorPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the author, a customer or a teammate. Null for system notices.",
                            "example": "principal_01m8rxy505fewvz41crbgqs67r"
                          },
                          "authorName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Author's display name: the account name, else the profile's display name. Null for system notices and for authors with no name.",
                            "example": "Dana Whitfield"
                          },
                          "content": {
                            "type": "string",
                            "description": "Plain-text body. Empty for a message that only embeds a card, such as a shared feedback post. After a text redaction it holds the replacement text, `[Redacted]` by default.",
                            "example": "Thanks for the details. I've reset your invite, so please try the link again."
                          },
                          "systemKind": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Kind of system notice: `chat_ended` (resolved), `chat_reopened`, `assigned`, `assistant_handoff`, `ticket_status_changed`, `ticket_linked`, `ticket_created`, `assistant_action_expired`, `external_linked`, `external_unlinked`, `external_status_changed`, `priority_changed`, `snoozed`, `csat_submitted` or `away_reply`. Null for messages that aren't system notices, and for notices stored without a kind, such as a team assignment.",
                            "example": "assigned"
                          },
                          "systemActorPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who resolved or reopened the conversation, on `chat_ended` and `chat_reopened` notices. Null on other messages, on notices caused by automation or the customer, and on older notices.",
                            "example": "principal_01m8rxy505fewvz41pk221r0d3"
                          },
                          "emailAuth": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "spf": {
                                "type": "string",
                                "enum": [
                                  "pass",
                                  "fail",
                                  "none"
                                ],
                                "description": "SPF result: `pass`, `fail` or `none` (no result).",
                                "example": "pass"
                              },
                              "dkim": {
                                "type": "string",
                                "enum": [
                                  "pass",
                                  "fail",
                                  "none"
                                ],
                                "description": "DKIM result: `pass`, `fail` or `none` (no result).",
                                "example": "pass"
                              },
                              "dmarc": {
                                "type": "string",
                                "enum": [
                                  "pass",
                                  "fail",
                                  "none"
                                ],
                                "description": "DMARC result: `pass`, `fail` or `none` (no result).",
                                "example": "none"
                              }
                            },
                            "required": [
                              "spf",
                              "dkim",
                              "dmarc"
                            ],
                            "description": "SPF, DKIM and DMARC results that the receiving mail server reported for an inbound email. Null for messages that didn't arrive by email."
                          },
                          "widgetMetadata": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "Host-page context that the widget sent with a visitor's message, such as `pageUrl` and the browser, as key-value pairs. Only string values are returned. Null when none was sent.",
                            "example": {
                              "pageUrl": "https://app.example.com/settings/billing",
                              "browser": "Firefox 133"
                            }
                          },
                          "embeds": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "description": "Type of the embedded record, such as `post`.",
                                  "example": "post"
                                },
                                "id": {
                                  "type": "string",
                                  "description": "ID of the embedded record, as stored in the message.",
                                  "example": "post_01m8rxy505fewvz428qxstz0z3"
                                }
                              },
                              "required": [
                                "kind",
                                "id"
                              ]
                            },
                            "description": "Cards embedded at the top level of the message's rich content, in order, such as a shared feedback post. Empty for plain messages."
                          },
                          "attachments": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "fileId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "ID of the stored file. Null for attachments written before the file pipeline and for inline images taken from rich content.",
                                  "example": "file_01m8rxy505fewvz41w7gqgp4p1"
                                },
                                "name": {
                                  "type": "string",
                                  "description": "File name.",
                                  "example": "invoice-2026-03.pdf"
                                },
                                "contentType": {
                                  "type": "string",
                                  "description": "MIME type of the file.",
                                  "example": "application/pdf"
                                },
                                "size": {
                                  "type": "number",
                                  "description": "File size in bytes.",
                                  "example": 48213
                                }
                              },
                              "required": [
                                "fileId",
                                "name",
                                "contentType",
                                "size"
                              ]
                            },
                            "description": "Files attached to the message, in the order they were attached. Empty for text-only messages and once a redaction removed them."
                          },
                          "reactions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "emoji": {
                                  "type": "string",
                                  "description": "Reaction emoji. One of 👍, ❤️, 🎉, 😄, 🤔 and 👀.",
                                  "example": "👍"
                                },
                                "count": {
                                  "type": "number",
                                  "description": "Number of teammates who reacted with this emoji.",
                                  "example": 2
                                },
                                "reacted": {
                                  "type": "boolean",
                                  "description": "Whether the caller is one of them.",
                                  "example": true
                                }
                              },
                              "required": [
                                "emoji",
                                "count",
                                "reacted"
                              ]
                            },
                            "description": "Teammate reactions, one entry per emoji in use, sorted by emoji. Team-only. Empty when nobody reacted."
                          },
                          "flaggedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the caller saved the message for later, in ISO 8601 UTC. Personal to the caller. Null when the caller hasn't saved it.",
                            "example": "2026-03-14T09:30:12.000Z"
                          },
                          "sendStatus": {
                            "type": "string",
                            "enum": [
                              "sent",
                              "scheduled",
                              "recalled"
                            ],
                            "description": "Delivery state. `sent`: in the thread, and visible to the customer unless it's internal. `scheduled`: a reply held for undo-send or a scheduled send; the customer doesn't see it until it's released. `recalled`: a held reply that was recalled before it went out.",
                            "example": "sent"
                          },
                          "scheduledSendAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time a held reply is or was due to go out, in ISO 8601 UTC. Kept after the reply is released or recalled. Null for messages that were never held.",
                            "example": "2026-03-14T09:27:23.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the message was posted, in ISO 8601 UTC. For a held reply that was released, the release time.",
                            "example": "2026-03-14T09:26:53.000Z"
                          },
                          "editedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the body was last edited, in ISO 8601 UTC. Null if it was never edited.",
                            "example": "2026-03-14T09:41:05.000Z"
                          },
                          "redactedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time a teammate redacted the message's text or attachments, in ISO 8601 UTC. Null if it was never redacted.",
                            "example": "2026-03-15T11:02:44.000Z"
                          },
                          "redactedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who redacted the message. Null if it was never redacted.",
                            "example": "principal_01m8rxy505fewvz41pk221r0d3"
                          },
                          "redactedByName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name of the teammate who redacted the message. Null if it was never redacted or the teammate has no name.",
                            "example": "Priya Natarajan"
                          },
                          "redactionReason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Reason the teammate gave for the redaction. Null if the message was never redacted.",
                            "example": "Customer shared a card number"
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "senderType",
                          "isInternal",
                          "authorPrincipalId",
                          "authorName",
                          "content",
                          "systemKind",
                          "systemActorPrincipalId",
                          "emailAuth",
                          "widgetMetadata",
                          "embeds",
                          "attachments",
                          "reactions",
                          "flaggedAt",
                          "sendStatus",
                          "scheduledSendAt",
                          "createdAt",
                          "editedAt",
                          "redactedAt",
                          "redactedByPrincipalId",
                          "redactedByName",
                          "redactionReason"
                        ],
                        "description": "A conversation message as teammates see it, including team-only data: internal notes, reactions and the caller's saved-for-later mark."
                      },
                      "description": "Messages on this page, newest first."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the oldest message on this page, to pass as `before` for the next page. Null on the last page.",
                      "example": "conversation_msg_01m8rxy505fewvz412bd547egh"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether older messages exist beyond this page.",
                      "example": true
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not visible to the caller's teams, or `before` is not a message of this conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/reply": {
      "post": {
        "operationId": "replyQuillsConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "Reply to the customer",
        "description": "Posts a plain-text reply from the caller to the conversation's customer, with up to 10 of the caller's uploads (registered with `POST /files`) attached. Requires the `update` permission.\n\nThe reply goes out at once unless it's held. Pass `scheduledAt` to schedule it (in the future, at most 30 days ahead; otherwise 400), or `delaySeconds` from 5 to 30 for an undo-send window. With neither, the workspace's undo-send setting decides; `delaySeconds: 0` always sends at once. A held reply comes back with `sendStatus: scheduled` and stays hidden from the customer until a background job releases it at its time; until then it can be recalled (`POST /conversation-messages/{messageId}/recall`) or sent early (`POST /conversation-messages/{messageId}/send-now`).\n\nWhen the reply goes out, it reopens a closed conversation (a snoozed one stays snoozed), assigns an unassigned one to the caller, marks the conversation read for the team, sets the first response time if unset, clears a pending auto-close and updates the inbox preview. Records a `message.created` event, or `message.send_scheduled` for a held reply. On an email conversation, delivery mails the reply to the customer after commit.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Message text, as plain text. Leading and trailing whitespace is trimmed. 1 to 10,000 characters.",
                    "example": "I've reset the password on the account. Please try signing in again."
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "default": [],
                    "description": "IDs of files to attach, up to 10 and each once. Each must be one of the caller's own uploads that isn't attached to a message yet; a file of another person, a removed file or an attached one fails the request with 404 and nothing is attached. Accepts TypeIDs or UUIDs. Attachments keep the order sent. Defaults to none.",
                    "example": [
                      "file_01m8rxy505fewvz41w7gqgp4p1"
                    ]
                  },
                  "scheduledAt": {
                    "type": "string",
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "Time to send the reply, as an ISO 8601 date-time in UTC (ending in `Z`). Must be in the future and at most 30 days ahead. Takes precedence over `delaySeconds`. Omit to send now or after the undo-send window.",
                    "example": "2026-03-16T08:00:00Z"
                  },
                  "delaySeconds": {
                    "type": "integer",
                    "description": "Undo-send window in seconds: `0` sends at once, 5 to 30 holds the reply that long so it can be recalled. Ignored when `scheduledAt` is set. Omit to use the workspace's undo-send setting.",
                    "example": 10
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reply and the updated conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer. `agent`: the team side, a teammate or the AI assistant. `system`: an automatic notice with no human author, such as an assignment or a status change.",
                          "example": "agent"
                        },
                        "isInternal": {
                          "type": "boolean",
                          "description": "Whether the message is team-only: an internal note or a team-only system notice. The customer never sees it.",
                          "example": false
                        },
                        "authorPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the author, a customer or a teammate. Null for system notices.",
                          "example": "principal_01m8rxy505fewvz41crbgqs67r"
                        },
                        "authorName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name: the account name, else the profile's display name. Null for system notices and for authors with no name.",
                          "example": "Dana Whitfield"
                        },
                        "content": {
                          "type": "string",
                          "description": "Plain-text body. Empty for a message that only embeds a card, such as a shared feedback post. After a text redaction it holds the replacement text, `[Redacted]` by default.",
                          "example": "Thanks for the details. I've reset your invite, so please try the link again."
                        },
                        "systemKind": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Kind of system notice: `chat_ended` (resolved), `chat_reopened`, `assigned`, `assistant_handoff`, `ticket_status_changed`, `ticket_linked`, `ticket_created`, `assistant_action_expired`, `external_linked`, `external_unlinked`, `external_status_changed`, `priority_changed`, `snoozed`, `csat_submitted` or `away_reply`. Null for messages that aren't system notices, and for notices stored without a kind, such as a team assignment.",
                          "example": "assigned"
                        },
                        "systemActorPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the teammate who resolved or reopened the conversation, on `chat_ended` and `chat_reopened` notices. Null on other messages, on notices caused by automation or the customer, and on older notices.",
                          "example": "principal_01m8rxy505fewvz41pk221r0d3"
                        },
                        "emailAuth": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "spf": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "SPF result: `pass`, `fail` or `none` (no result).",
                              "example": "pass"
                            },
                            "dkim": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "DKIM result: `pass`, `fail` or `none` (no result).",
                              "example": "pass"
                            },
                            "dmarc": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "DMARC result: `pass`, `fail` or `none` (no result).",
                              "example": "none"
                            }
                          },
                          "required": [
                            "spf",
                            "dkim",
                            "dmarc"
                          ],
                          "description": "SPF, DKIM and DMARC results that the receiving mail server reported for an inbound email. Null for messages that didn't arrive by email."
                        },
                        "widgetMetadata": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Host-page context that the widget sent with a visitor's message, such as `pageUrl` and the browser, as key-value pairs. Only string values are returned. Null when none was sent.",
                          "example": {
                            "pageUrl": "https://app.example.com/settings/billing",
                            "browser": "Firefox 133"
                          }
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Type of the embedded record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the embedded record, as stored in the message.",
                                "example": "post_01m8rxy505fewvz428qxstz0z3"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Cards embedded at the top level of the message's rich content, in order, such as a shared feedback post. Empty for plain messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the stored file. Null for attachments written before the file pipeline and for inline images taken from rich content.",
                                "example": "file_01m8rxy505fewvz41w7gqgp4p1"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Empty for text-only messages and once a redaction removed them."
                        },
                        "reactions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "emoji": {
                                "type": "string",
                                "description": "Reaction emoji. One of 👍, ❤️, 🎉, 😄, 🤔 and 👀.",
                                "example": "👍"
                              },
                              "count": {
                                "type": "number",
                                "description": "Number of teammates who reacted with this emoji.",
                                "example": 2
                              },
                              "reacted": {
                                "type": "boolean",
                                "description": "Whether the caller is one of them.",
                                "example": true
                              }
                            },
                            "required": [
                              "emoji",
                              "count",
                              "reacted"
                            ]
                          },
                          "description": "Teammate reactions, one entry per emoji in use, sorted by emoji. Team-only. Empty when nobody reacted."
                        },
                        "flaggedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the caller saved the message for later, in ISO 8601 UTC. Personal to the caller. Null when the caller hasn't saved it.",
                          "example": "2026-03-14T09:30:12.000Z"
                        },
                        "sendStatus": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "scheduled",
                            "recalled"
                          ],
                          "description": "Delivery state. `sent`: in the thread, and visible to the customer unless it's internal. `scheduled`: a reply held for undo-send or a scheduled send; the customer doesn't see it until it's released. `recalled`: a held reply that was recalled before it went out.",
                          "example": "sent"
                        },
                        "scheduledSendAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a held reply is or was due to go out, in ISO 8601 UTC. Kept after the reply is released or recalled. Null for messages that were never held.",
                          "example": "2026-03-14T09:27:23.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was posted, in ISO 8601 UTC. For a held reply that was released, the release time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the body was last edited, in ISO 8601 UTC. Null if it was never edited.",
                          "example": "2026-03-14T09:41:05.000Z"
                        },
                        "redactedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate redacted the message's text or attachments, in ISO 8601 UTC. Null if it was never redacted.",
                          "example": "2026-03-15T11:02:44.000Z"
                        },
                        "redactedByPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the teammate who redacted the message. Null if it was never redacted.",
                          "example": "principal_01m8rxy505fewvz41pk221r0d3"
                        },
                        "redactedByName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Display name of the teammate who redacted the message. Null if it was never redacted or the teammate has no name.",
                          "example": "Priya Natarajan"
                        },
                        "redactionReason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Reason the teammate gave for the redaction. Null if the message was never redacted.",
                          "example": "Customer shared a card number"
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "senderType",
                        "isInternal",
                        "authorPrincipalId",
                        "authorName",
                        "content",
                        "systemKind",
                        "systemActorPrincipalId",
                        "emailAuth",
                        "widgetMetadata",
                        "embeds",
                        "attachments",
                        "reactions",
                        "flaggedAt",
                        "sendStatus",
                        "scheduledSendAt",
                        "createdAt",
                        "editedAt",
                        "redactedAt",
                        "redactedByPrincipalId",
                        "redactedByName",
                        "redactionReason"
                      ],
                      "description": "A conversation message as teammates see it, including team-only data: internal notes, reactions and the caller's saved-for-later mark."
                    },
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Conversation ID.",
                          "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "open",
                            "snoozed",
                            "closed"
                          ],
                          "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                          "example": "open"
                        },
                        "priority": {
                          "type": "string",
                          "enum": [
                            "none",
                            "low",
                            "medium",
                            "high",
                            "urgent"
                          ],
                          "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                          "example": "high"
                        },
                        "channel": {
                          "type": "string",
                          "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                          "example": "messenger"
                        },
                        "source": {
                          "type": "string",
                          "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                          "example": "widget"
                        },
                        "subject": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                          "example": "Can't sign in after resetting my password"
                        },
                        "lastMessagePreview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                          "example": "I tried the reset link twice, but it still says my session expired."
                        },
                        "lastMessageAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the conversation was created, in ISO 8601 UTC.",
                          "example": "2026-03-14T08:02:11.000Z"
                        },
                        "updatedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "visitorPrincipalId": {
                          "type": "string",
                          "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                          "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                        },
                        "visitorName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                          "example": "Dana Whitfield"
                        },
                        "visitorAvatarUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "URL of the visitor's profile picture. Null when there's none.",
                          "example": "https://example.com/avatars/dana.png"
                        },
                        "visitorEmail": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                          "example": "dana@example.com"
                        },
                        "isTest": {
                          "type": "boolean",
                          "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                          "example": false
                        },
                        "assignedAgentPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                          "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                        },
                        "assignedTeamId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                          "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                        },
                        "unreadCount": {
                          "type": "number",
                          "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                          "example": 2
                        },
                        "waitingSince": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                          "example": "2026-03-14T09:20:40.000Z"
                        },
                        "snoozedUntil": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                          "example": "2026-03-16T08:00:00.000Z"
                        },
                        "resolvedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                          "example": "2026-03-14T10:05:00.000Z"
                        },
                        "archivedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                          "example": null
                        },
                        "endReason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                          "example": "resolved"
                        },
                        "endNote": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                          "example": "Customer confirmed the new password works."
                        },
                        "spamReason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                          "example": null
                        },
                        "csatRating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                          "example": 5
                        },
                        "forwardParseFailed": {
                          "type": "boolean",
                          "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                          "example": false
                        },
                        "agentLastReadAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                          "example": "2026-03-14T09:25:00.000Z"
                        },
                        "visitorLastReadAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                          "example": "2026-03-14T09:24:12.000Z"
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Conversation tag ID.",
                                "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                              },
                              "name": {
                                "type": "string",
                                "description": "Tag name.",
                                "example": "Billing"
                              },
                              "color": {
                                "type": "string",
                                "description": "Tag color as a hex code.",
                                "example": "#6b7280"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ]
                          },
                          "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                        }
                      },
                      "required": [
                        "id",
                        "status",
                        "priority",
                        "channel",
                        "source",
                        "subject",
                        "lastMessagePreview",
                        "lastMessageAt",
                        "createdAt",
                        "updatedAt",
                        "visitorPrincipalId",
                        "visitorName",
                        "visitorAvatarUrl",
                        "visitorEmail",
                        "isTest",
                        "assignedAgentPrincipalId",
                        "assignedTeamId",
                        "unreadCount",
                        "waitingSince",
                        "snoozedUntil",
                        "resolvedAt",
                        "archivedAt",
                        "endReason",
                        "endNote",
                        "spamReason",
                        "csatRating",
                        "forwardParseFailed",
                        "agentLastReadAt",
                        "visitorLastReadAt",
                        "tags"
                      ],
                      "description": "The conversation after the reply, as the inbox list shows it."
                    }
                  },
                  "required": [
                    "message",
                    "conversation"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found, or an attachment is not one of the caller's unattached uploads",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/note": {
      "post": {
        "operationId": "addQuillsConversationNote",
        "tags": [
          "Conversations"
        ],
        "summary": "Add an internal note",
        "description": "Adds a team-only note from the caller to the conversation. It's never sent to the customer and doesn't change the inbox preview, the read state, the status or the assignment; only the conversation's `updatedAt` moves. Up to 10 of the caller's uploads (registered with `POST /files`) can be attached, and up to 20 teammates mentioned. Requires the `comment_internal` or `update` permission. A caller without `update` who belongs to teams can add notes only to conversations assigned to one of those teams. Records a `message.note_created` event; each mentioned teammate is then notified of the mention, in the app and by email, as their notification preferences allow.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Message text, as plain text. Leading and trailing whitespace is trimmed. 1 to 10,000 characters.",
                    "example": "I've reset the password on the account. Please try signing in again."
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 10,
                    "default": [],
                    "description": "IDs of files to attach, up to 10 and each once. Each must be one of the caller's own uploads that isn't attached to a message yet; a file of another person, a removed file or an attached one fails the request with 404 and nothing is attached. Accepts TypeIDs or UUIDs. Attachments keep the order sent. Defaults to none.",
                    "example": [
                      "file_01m8rxy505fewvz41w7gqgp4p1"
                    ]
                  },
                  "mentionPrincipalIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                      "example": "principal_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 20,
                    "default": [],
                    "description": "Principal IDs of the teammates to mention, up to 20 and each once. Each must be the teammate principal of a current workspace member, or the request fails with 404. Accepts TypeIDs or UUIDs. Defaults to none.",
                    "example": [
                      "principal_01m8rxy505fewvz41pk221r0d3"
                    ]
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The note",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer. `agent`: the team side, a teammate or the AI assistant. `system`: an automatic notice with no human author, such as an assignment or a status change.",
                          "example": "agent"
                        },
                        "isInternal": {
                          "type": "boolean",
                          "description": "Whether the message is team-only: an internal note or a team-only system notice. The customer never sees it.",
                          "example": false
                        },
                        "authorPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the author, a customer or a teammate. Null for system notices.",
                          "example": "principal_01m8rxy505fewvz41crbgqs67r"
                        },
                        "authorName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name: the account name, else the profile's display name. Null for system notices and for authors with no name.",
                          "example": "Dana Whitfield"
                        },
                        "content": {
                          "type": "string",
                          "description": "Plain-text body. Empty for a message that only embeds a card, such as a shared feedback post. After a text redaction it holds the replacement text, `[Redacted]` by default.",
                          "example": "Thanks for the details. I've reset your invite, so please try the link again."
                        },
                        "systemKind": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Kind of system notice: `chat_ended` (resolved), `chat_reopened`, `assigned`, `assistant_handoff`, `ticket_status_changed`, `ticket_linked`, `ticket_created`, `assistant_action_expired`, `external_linked`, `external_unlinked`, `external_status_changed`, `priority_changed`, `snoozed`, `csat_submitted` or `away_reply`. Null for messages that aren't system notices, and for notices stored without a kind, such as a team assignment.",
                          "example": "assigned"
                        },
                        "systemActorPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the teammate who resolved or reopened the conversation, on `chat_ended` and `chat_reopened` notices. Null on other messages, on notices caused by automation or the customer, and on older notices.",
                          "example": "principal_01m8rxy505fewvz41pk221r0d3"
                        },
                        "emailAuth": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "spf": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "SPF result: `pass`, `fail` or `none` (no result).",
                              "example": "pass"
                            },
                            "dkim": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "DKIM result: `pass`, `fail` or `none` (no result).",
                              "example": "pass"
                            },
                            "dmarc": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "DMARC result: `pass`, `fail` or `none` (no result).",
                              "example": "none"
                            }
                          },
                          "required": [
                            "spf",
                            "dkim",
                            "dmarc"
                          ],
                          "description": "SPF, DKIM and DMARC results that the receiving mail server reported for an inbound email. Null for messages that didn't arrive by email."
                        },
                        "widgetMetadata": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Host-page context that the widget sent with a visitor's message, such as `pageUrl` and the browser, as key-value pairs. Only string values are returned. Null when none was sent.",
                          "example": {
                            "pageUrl": "https://app.example.com/settings/billing",
                            "browser": "Firefox 133"
                          }
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Type of the embedded record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the embedded record, as stored in the message.",
                                "example": "post_01m8rxy505fewvz428qxstz0z3"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Cards embedded at the top level of the message's rich content, in order, such as a shared feedback post. Empty for plain messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the stored file. Null for attachments written before the file pipeline and for inline images taken from rich content.",
                                "example": "file_01m8rxy505fewvz41w7gqgp4p1"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Empty for text-only messages and once a redaction removed them."
                        },
                        "reactions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "emoji": {
                                "type": "string",
                                "description": "Reaction emoji. One of 👍, ❤️, 🎉, 😄, 🤔 and 👀.",
                                "example": "👍"
                              },
                              "count": {
                                "type": "number",
                                "description": "Number of teammates who reacted with this emoji.",
                                "example": 2
                              },
                              "reacted": {
                                "type": "boolean",
                                "description": "Whether the caller is one of them.",
                                "example": true
                              }
                            },
                            "required": [
                              "emoji",
                              "count",
                              "reacted"
                            ]
                          },
                          "description": "Teammate reactions, one entry per emoji in use, sorted by emoji. Team-only. Empty when nobody reacted."
                        },
                        "flaggedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the caller saved the message for later, in ISO 8601 UTC. Personal to the caller. Null when the caller hasn't saved it.",
                          "example": "2026-03-14T09:30:12.000Z"
                        },
                        "sendStatus": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "scheduled",
                            "recalled"
                          ],
                          "description": "Delivery state. `sent`: in the thread, and visible to the customer unless it's internal. `scheduled`: a reply held for undo-send or a scheduled send; the customer doesn't see it until it's released. `recalled`: a held reply that was recalled before it went out.",
                          "example": "sent"
                        },
                        "scheduledSendAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a held reply is or was due to go out, in ISO 8601 UTC. Kept after the reply is released or recalled. Null for messages that were never held.",
                          "example": "2026-03-14T09:27:23.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was posted, in ISO 8601 UTC. For a held reply that was released, the release time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the body was last edited, in ISO 8601 UTC. Null if it was never edited.",
                          "example": "2026-03-14T09:41:05.000Z"
                        },
                        "redactedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate redacted the message's text or attachments, in ISO 8601 UTC. Null if it was never redacted.",
                          "example": "2026-03-15T11:02:44.000Z"
                        },
                        "redactedByPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the teammate who redacted the message. Null if it was never redacted.",
                          "example": "principal_01m8rxy505fewvz41pk221r0d3"
                        },
                        "redactedByName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Display name of the teammate who redacted the message. Null if it was never redacted or the teammate has no name.",
                          "example": "Priya Natarajan"
                        },
                        "redactionReason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Reason the teammate gave for the redaction. Null if the message was never redacted.",
                          "example": "Customer shared a card number"
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "senderType",
                        "isInternal",
                        "authorPrincipalId",
                        "authorName",
                        "content",
                        "systemKind",
                        "systemActorPrincipalId",
                        "emailAuth",
                        "widgetMetadata",
                        "embeds",
                        "attachments",
                        "reactions",
                        "flaggedAt",
                        "sendStatus",
                        "scheduledSendAt",
                        "createdAt",
                        "editedAt",
                        "redactedAt",
                        "redactedByPrincipalId",
                        "redactedByName",
                        "redactionReason"
                      ],
                      "description": "A conversation message as teammates see it, including team-only data: internal notes, reactions and the caller's saved-for-later mark."
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not visible to the caller's teams, a mentioned principal is not a current teammate, or an attachment is not one of the caller's unattached uploads",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-messages/flagged": {
      "get": {
        "operationId": "listQuillsFlaggedMessages",
        "tags": [
          "Conversations"
        ],
        "summary": "List your saved-for-later messages",
        "description": "Lists the conversation messages that the caller saved for later, most recently saved first. Only sent, undeleted messages count: held, recalled and deleted messages are left out. There's no cursor; `limit` caps the list. A caller without the `update` permission who belongs to teams sees only messages of conversations assigned to one of those teams. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "Maximum number of messages to return, 1 to 100. Defaults to 100.",
              "example": 100
            },
            "required": false,
            "description": "Maximum number of messages to return, 1 to 100. Defaults to 100.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Flagged messages",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "messageId": {
                            "type": "string",
                            "description": "ID of the saved message.",
                            "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                          },
                          "conversationId": {
                            "type": "string",
                            "description": "ID of the message's conversation.",
                            "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                          },
                          "preview": {
                            "type": "string",
                            "description": "Message text, cut to 140 characters with a trailing `…` when longer.",
                            "example": "Can you check why my last invoice was charged twice?"
                          },
                          "isInternal": {
                            "type": "boolean",
                            "description": "Whether the message is an internal note or a team-only notice.",
                            "example": false
                          },
                          "authorPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the message's author. Null when it has no author.",
                            "example": "principal_01m8rxy505fewvz41crbgqs67r"
                          },
                          "flaggedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the caller saved the message, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:30:12.000Z"
                          }
                        },
                        "required": [
                          "messageId",
                          "conversationId",
                          "preview",
                          "isInternal",
                          "authorPrincipalId",
                          "flaggedAt"
                        ]
                      },
                      "description": "Saved messages, most recently saved first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-messages/{messageId}": {
      "patch": {
        "operationId": "updateQuillsConversationMessage",
        "tags": [
          "Conversations"
        ],
        "summary": "Edit your own message",
        "description": "Replaces the text of a reply or internal note that the caller wrote, and sets `editedAt`. Only the author can edit, and only team-side (`agent`) messages; anyone else gets 403, so nobody rewrites another person's words. The new text is plain: any rich content, such as an embed card, is dropped. Editing the latest customer-visible message updates the inbox preview. A copy already mailed to the customer is not changed, and a message posted to an external channel (a GitHub comment, or a channel delivery still pending) can't be edited. Requires the `update` permission. Records `message.updated`, or `message.note_updated` for a note.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation message ID. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": true,
            "description": "Conversation message ID. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "Message text, as plain text. Leading and trailing whitespace is trimmed. 1 to 10,000 characters.",
                    "example": "I've reset the password on the account. Please try signing in again."
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Edited message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Message ID.",
                      "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                    },
                    "conversationId": {
                      "type": "string",
                      "description": "ID of the conversation the message belongs to.",
                      "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                    },
                    "senderType": {
                      "type": "string",
                      "enum": [
                        "visitor",
                        "agent",
                        "system"
                      ],
                      "description": "Who wrote the message. `visitor`: the customer. `agent`: the team side, a teammate or the AI assistant. `system`: an automatic notice with no human author, such as an assignment or a status change.",
                      "example": "agent"
                    },
                    "isInternal": {
                      "type": "boolean",
                      "description": "Whether the message is team-only: an internal note or a team-only system notice. The customer never sees it.",
                      "example": false
                    },
                    "authorPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the author, a customer or a teammate. Null for system notices.",
                      "example": "principal_01m8rxy505fewvz41crbgqs67r"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Author's display name: the account name, else the profile's display name. Null for system notices and for authors with no name.",
                      "example": "Dana Whitfield"
                    },
                    "content": {
                      "type": "string",
                      "description": "Plain-text body. Empty for a message that only embeds a card, such as a shared feedback post. After a text redaction it holds the replacement text, `[Redacted]` by default.",
                      "example": "Thanks for the details. I've reset your invite, so please try the link again."
                    },
                    "systemKind": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Kind of system notice: `chat_ended` (resolved), `chat_reopened`, `assigned`, `assistant_handoff`, `ticket_status_changed`, `ticket_linked`, `ticket_created`, `assistant_action_expired`, `external_linked`, `external_unlinked`, `external_status_changed`, `priority_changed`, `snoozed`, `csat_submitted` or `away_reply`. Null for messages that aren't system notices, and for notices stored without a kind, such as a team assignment.",
                      "example": "assigned"
                    },
                    "systemActorPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who resolved or reopened the conversation, on `chat_ended` and `chat_reopened` notices. Null on other messages, on notices caused by automation or the customer, and on older notices.",
                      "example": "principal_01m8rxy505fewvz41pk221r0d3"
                    },
                    "emailAuth": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "spf": {
                          "type": "string",
                          "enum": [
                            "pass",
                            "fail",
                            "none"
                          ],
                          "description": "SPF result: `pass`, `fail` or `none` (no result).",
                          "example": "pass"
                        },
                        "dkim": {
                          "type": "string",
                          "enum": [
                            "pass",
                            "fail",
                            "none"
                          ],
                          "description": "DKIM result: `pass`, `fail` or `none` (no result).",
                          "example": "pass"
                        },
                        "dmarc": {
                          "type": "string",
                          "enum": [
                            "pass",
                            "fail",
                            "none"
                          ],
                          "description": "DMARC result: `pass`, `fail` or `none` (no result).",
                          "example": "none"
                        }
                      },
                      "required": [
                        "spf",
                        "dkim",
                        "dmarc"
                      ],
                      "description": "SPF, DKIM and DMARC results that the receiving mail server reported for an inbound email. Null for messages that didn't arrive by email."
                    },
                    "widgetMetadata": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "Host-page context that the widget sent with a visitor's message, such as `pageUrl` and the browser, as key-value pairs. Only string values are returned. Null when none was sent.",
                      "example": {
                        "pageUrl": "https://app.example.com/settings/billing",
                        "browser": "Firefox 133"
                      }
                    },
                    "embeds": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "description": "Type of the embedded record, such as `post`.",
                            "example": "post"
                          },
                          "id": {
                            "type": "string",
                            "description": "ID of the embedded record, as stored in the message.",
                            "example": "post_01m8rxy505fewvz428qxstz0z3"
                          }
                        },
                        "required": [
                          "kind",
                          "id"
                        ]
                      },
                      "description": "Cards embedded at the top level of the message's rich content, in order, such as a shared feedback post. Empty for plain messages."
                    },
                    "attachments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fileId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the stored file. Null for attachments written before the file pipeline and for inline images taken from rich content.",
                            "example": "file_01m8rxy505fewvz41w7gqgp4p1"
                          },
                          "name": {
                            "type": "string",
                            "description": "File name.",
                            "example": "invoice-2026-03.pdf"
                          },
                          "contentType": {
                            "type": "string",
                            "description": "MIME type of the file.",
                            "example": "application/pdf"
                          },
                          "size": {
                            "type": "number",
                            "description": "File size in bytes.",
                            "example": 48213
                          }
                        },
                        "required": [
                          "fileId",
                          "name",
                          "contentType",
                          "size"
                        ]
                      },
                      "description": "Files attached to the message, in the order they were attached. Empty for text-only messages and once a redaction removed them."
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji. One of 👍, ❤️, 🎉, 😄, 🤔 and 👀.",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of teammates who reacted with this emoji.",
                            "example": 2
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller is one of them.",
                            "example": true
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Teammate reactions, one entry per emoji in use, sorted by emoji. Team-only. Empty when nobody reacted."
                    },
                    "flaggedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the caller saved the message for later, in ISO 8601 UTC. Personal to the caller. Null when the caller hasn't saved it.",
                      "example": "2026-03-14T09:30:12.000Z"
                    },
                    "sendStatus": {
                      "type": "string",
                      "enum": [
                        "sent",
                        "scheduled",
                        "recalled"
                      ],
                      "description": "Delivery state. `sent`: in the thread, and visible to the customer unless it's internal. `scheduled`: a reply held for undo-send or a scheduled send; the customer doesn't see it until it's released. `recalled`: a held reply that was recalled before it went out.",
                      "example": "sent"
                    },
                    "scheduledSendAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a held reply is or was due to go out, in ISO 8601 UTC. Kept after the reply is released or recalled. Null for messages that were never held.",
                      "example": "2026-03-14T09:27:23.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the message was posted, in ISO 8601 UTC. For a held reply that was released, the release time.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "editedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the body was last edited, in ISO 8601 UTC. Null if it was never edited.",
                      "example": "2026-03-14T09:41:05.000Z"
                    },
                    "redactedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate redacted the message's text or attachments, in ISO 8601 UTC. Null if it was never redacted.",
                      "example": "2026-03-15T11:02:44.000Z"
                    },
                    "redactedByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who redacted the message. Null if it was never redacted.",
                      "example": "principal_01m8rxy505fewvz41pk221r0d3"
                    },
                    "redactedByName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the teammate who redacted the message. Null if it was never redacted or the teammate has no name.",
                      "example": "Priya Natarajan"
                    },
                    "redactionReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Reason the teammate gave for the redaction. Null if the message was never redacted.",
                      "example": "Customer shared a card number"
                    }
                  },
                  "required": [
                    "id",
                    "conversationId",
                    "senderType",
                    "isInternal",
                    "authorPrincipalId",
                    "authorName",
                    "content",
                    "systemKind",
                    "systemActorPrincipalId",
                    "emailAuth",
                    "widgetMetadata",
                    "embeds",
                    "attachments",
                    "reactions",
                    "flaggedAt",
                    "sendStatus",
                    "scheduledSendAt",
                    "createdAt",
                    "editedAt",
                    "redactedAt",
                    "redactedByPrincipalId",
                    "redactedByName",
                    "redactionReason"
                  ],
                  "description": "A conversation message as teammates see it, including team-only data: internal notes, reactions and the caller's saved-for-later mark."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Message not found: missing, deleted, recalled or not part of a conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The message was posted to an external channel (a GitHub comment) or its channel delivery is pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsConversationMessage",
        "tags": [
          "Conversations"
        ],
        "summary": "Delete a message",
        "description": "Soft-deletes a customer or teammate message, including an internal note or a held reply. Requires the `delete` permission, also for the caller's own messages. System notices can't be deleted, nor can a message posted to an external channel (a GitHub comment, or a channel delivery still pending). Deleting the latest customer-visible message moves the inbox preview to the latest one left. Records `message.deleted`, or `message.note_deleted` for a note. Deleting the same message again answers 404.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation message ID. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": true,
            "description": "Conversation message ID. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted message.",
                      "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                    },
                    "conversationId": {
                      "type": "string",
                      "description": "ID of the conversation the message belonged to.",
                      "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                    },
                    "isInternal": {
                      "type": "boolean",
                      "description": "Whether the deleted message was an internal note or a team-only notice.",
                      "example": false
                    },
                    "deletedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the message was deleted, in ISO 8601 UTC.",
                      "example": "2026-03-14T10:02:17.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "conversationId",
                    "isInternal",
                    "deletedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Message not found: missing, already deleted, recalled or not part of a conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The message is a system notice, or it was posted to an external channel (a GitHub comment) or its channel delivery is pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-messages/{messageId}/recall": {
      "post": {
        "operationId": "recallQuillsScheduledMessage",
        "tags": [
          "Conversations"
        ],
        "summary": "Recall a held reply before it's sent",
        "description": "Cancels a reply that is still held for undo-send or a scheduled send, on a conversation or a ticket. The message becomes `recalled` and leaves the thread, its pending send job is cancelled, and its files are detached so they can be attached again. The response returns the text and file IDs so the composer can restore the draft. Only the sender or a caller with the `manage_settings` permission may recall a reply (403 otherwise); the route itself requires the `update` permission. Idempotent: recalling a recalled reply answers `changed: false` and records nothing. A reply that already went out answers 409. Records a `message.send_recalled` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation message ID. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": true,
            "description": "Conversation message ID. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The recalled draft payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recalled": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`.",
                      "example": true
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request recalled the reply. False when it was already recalled.",
                      "example": true
                    },
                    "messageId": {
                      "type": "string",
                      "description": "ID of the recalled message.",
                      "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                    },
                    "conversationId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the conversation the reply belongs to. Null for a reply on a ticket thread.",
                      "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                    },
                    "ticketId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the ticket whose thread the reply belongs to. Null for a conversation reply.",
                      "example": null
                    },
                    "content": {
                      "type": "string",
                      "description": "Text of the recalled reply, to restore in the composer.",
                      "example": "Thanks for the details. I've reset your invite, so please try the link again."
                    },
                    "attachmentIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "IDs of the files the reply carried, now detached and free to attach again. Empty when it had none, and on a repeat recall.",
                      "example": [
                        "file_01m8rxy505fewvz41w7gqgp4p1"
                      ]
                    }
                  },
                  "required": [
                    "recalled",
                    "changed",
                    "messageId",
                    "conversationId",
                    "ticketId",
                    "content",
                    "attachmentIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Message not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The reply was already sent (or was never held), so it can't be recalled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-messages/{messageId}/send-now": {
      "post": {
        "operationId": "sendQuillsScheduledMessageNow",
        "tags": [
          "Conversations"
        ],
        "summary": "Send a held reply now",
        "description": "Releases a reply held for undo-send or a scheduled send right away: it becomes `sent`, its `createdAt` moves to now and its pending send job is cancelled. On a conversation the release reopens a closed conversation, assigns an unassigned one to the sender, marks it read for the team and updates the inbox preview. On a ticket it subscribes the sender, and a reply-all on a tracker ticket copies the reply to the linked tickets. Only the sender or a caller with the `manage_settings` permission may do this (403 otherwise); the route itself requires the `update` permission. A reply that already went out or was recalled answers `released: false` and nothing changes. When released, records `ticket.replied` for a reply sent through a ticket, else `message.created`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation message ID. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": true,
            "description": "Conversation message ID. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Release outcome",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "released": {
                      "type": "boolean",
                      "description": "Whether this request released the reply. False when it was no longer held: already sent or recalled.",
                      "example": true
                    },
                    "messageId": {
                      "type": "string",
                      "description": "ID of the message.",
                      "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                    },
                    "conversationId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the conversation the reply belongs to. Null for a reply on a ticket thread.",
                      "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                    },
                    "ticketId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the ticket the reply belongs to or was sent through. Null when there is none.",
                      "example": null
                    }
                  },
                  "required": [
                    "released",
                    "messageId",
                    "conversationId",
                    "ticketId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Message not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-messages/{messageId}/reactions": {
      "put": {
        "operationId": "setQuillsMessageReaction",
        "tags": [
          "Conversations"
        ],
        "summary": "React to a message",
        "description": "Adds the caller's reaction with the given emoji to a message. Idempotent: reacting again with the same emoji changes nothing. Reactions are team-only; customers never see them. System notices can't take reactions. Requires the `update` permission. Records a `message.reacted` event when the reaction is new.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation message ID. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": true,
            "description": "Conversation message ID. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "👍",
                "❤️",
                "🎉",
                "😄",
                "🤔",
                "👀"
              ],
              "description": "Reaction emoji: one of 👍, ❤️, 🎉, 😄, 🤔 and 👀. URL-encode it in the query string.",
              "example": "👍"
            },
            "required": true,
            "description": "Reaction emoji: one of 👍, ❤️, 🎉, 😄, 🤔 and 👀. URL-encode it in the query string.",
            "name": "emoji",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The message's reactions after the change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messageId": {
                      "type": "string",
                      "description": "ID of the message.",
                      "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                    },
                    "conversationId": {
                      "type": "string",
                      "description": "ID of the message's conversation.",
                      "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request added or removed a reaction. False when the caller's reaction was already in the requested state.",
                      "example": true
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji. One of 👍, ❤️, 🎉, 😄, 🤔 and 👀.",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of teammates who reacted with this emoji.",
                            "example": 2
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller is one of them.",
                            "example": true
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Teammate reactions, one entry per emoji in use, sorted by emoji. Team-only. Empty when nobody reacted."
                    }
                  },
                  "required": [
                    "messageId",
                    "conversationId",
                    "changed",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Message not found: missing, deleted, recalled or not part of a conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The message is a system notice, which can't take reactions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsMessageReaction",
        "tags": [
          "Conversations"
        ],
        "summary": "Remove your reaction from a message",
        "description": "Removes the caller's reaction with the given emoji from a message. Idempotent: removing a reaction that isn't there changes nothing. Other teammates' reactions stay. Requires the `update` permission. Records a `message.unreacted` event when a reaction was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation message ID. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": true,
            "description": "Conversation message ID. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "👍",
                "❤️",
                "🎉",
                "😄",
                "🤔",
                "👀"
              ],
              "description": "Reaction emoji: one of 👍, ❤️, 🎉, 😄, 🤔 and 👀. URL-encode it in the query string.",
              "example": "👍"
            },
            "required": true,
            "description": "Reaction emoji: one of 👍, ❤️, 🎉, 😄, 🤔 and 👀. URL-encode it in the query string.",
            "name": "emoji",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The message's reactions after the change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messageId": {
                      "type": "string",
                      "description": "ID of the message.",
                      "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                    },
                    "conversationId": {
                      "type": "string",
                      "description": "ID of the message's conversation.",
                      "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request added or removed a reaction. False when the caller's reaction was already in the requested state.",
                      "example": true
                    },
                    "reactions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "emoji": {
                            "type": "string",
                            "description": "Reaction emoji. One of 👍, ❤️, 🎉, 😄, 🤔 and 👀.",
                            "example": "👍"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of teammates who reacted with this emoji.",
                            "example": 2
                          },
                          "reacted": {
                            "type": "boolean",
                            "description": "Whether the caller is one of them.",
                            "example": true
                          }
                        },
                        "required": [
                          "emoji",
                          "count",
                          "reacted"
                        ]
                      },
                      "description": "Teammate reactions, one entry per emoji in use, sorted by emoji. Team-only. Empty when nobody reacted."
                    }
                  },
                  "required": [
                    "messageId",
                    "conversationId",
                    "changed",
                    "reactions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Message not found: missing, deleted, recalled or not part of a conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The message is a system notice, which can't take reactions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-messages/{messageId}/flag": {
      "put": {
        "operationId": "setQuillsMessageFlag",
        "tags": [
          "Conversations"
        ],
        "summary": "Save a message for later",
        "description": "Saves a message to the caller's personal saved-for-later list (`GET /conversation-messages/flagged`). Only the caller sees the mark. Idempotent: saving a saved message keeps its original time. System notices can't be saved. Requires the `update` permission. Records no event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation message ID. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": true,
            "description": "Conversation message ID. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's saved-for-later state of the message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messageId": {
                      "type": "string",
                      "description": "ID of the message.",
                      "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                    },
                    "flaggedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the caller saved the message, in ISO 8601 UTC. Null when it isn't saved, as after a removal.",
                      "example": "2026-03-14T09:30:12.000Z"
                    }
                  },
                  "required": [
                    "messageId",
                    "flaggedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Message not found: missing, deleted, recalled or not part of a conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The message is a system notice, which can't be saved for later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeQuillsMessageFlag",
        "tags": [
          "Conversations"
        ],
        "summary": "Remove a message from saved for later",
        "description": "Removes a message from the caller's personal saved-for-later list. Idempotent: removing a message that isn't saved changes nothing. Requires the `update` permission. Records no event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation message ID. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
            },
            "required": true,
            "description": "Conversation message ID. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The caller's saved-for-later state of the message",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messageId": {
                      "type": "string",
                      "description": "ID of the message.",
                      "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                    },
                    "flaggedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the caller saved the message, in ISO 8601 UTC. Null when it isn't saved, as after a removal.",
                      "example": "2026-03-14T09:30:12.000Z"
                    }
                  },
                  "required": [
                    "messageId",
                    "flaggedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Message not found: missing, deleted, recalled or not part of a conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The message is a system notice, which can't be saved for later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/read": {
      "post": {
        "operationId": "markQuillsConversationRead",
        "tags": [
          "Conversations"
        ],
        "summary": "Mark a conversation read for the team",
        "description": "Moves the team's read mark to now, so the conversation no longer counts as unread for the team. The mark is shared by all teammates, not kept per person. The customer's read mark is not touched. Always answers `changed: true`. Requires the `update` permission. Records a `conversation.read` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Read state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversationId": {
                      "type": "string",
                      "description": "ID of the conversation.",
                      "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "The team's read mark, in ISO 8601 UTC: messages after it count as unread for the team. Shared by all teammates. Null when the team never read the conversation.",
                      "example": "2026-03-14T09:26:52.999Z"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request moved the read mark.",
                      "example": true
                    }
                  },
                  "required": [
                    "conversationId",
                    "agentLastReadAt",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/unread": {
      "post": {
        "operationId": "markQuillsConversationUnreadFromMessage",
        "tags": [
          "Conversations"
        ],
        "summary": "Mark a conversation unread from a message",
        "description": "Moves the team's read mark to just before the given message, so that message and every later one count as unread for the team. The mark only moves back, never forward: when it's already earlier, or the team never read the conversation, nothing changes and `changed` is false. Requires the `update` permission. Records a `conversation.read` event when the mark moved.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "messageId": {
                    "type": "string",
                    "description": "ID of the first message to mark unread. Must be a live message of this conversation. Accepts the TypeID or its UUID.",
                    "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                  }
                },
                "required": [
                  "messageId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Read state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversationId": {
                      "type": "string",
                      "description": "ID of the conversation.",
                      "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "The team's read mark, in ISO 8601 UTC: messages after it count as unread for the team. Shared by all teammates. Null when the team never read the conversation.",
                      "example": "2026-03-14T09:26:52.999Z"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request moved the read mark.",
                      "example": true
                    }
                  },
                  "required": [
                    "conversationId",
                    "agentLastReadAt",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found, or the message is not a live message of this conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/status": {
      "post": {
        "operationId": "setQuillsConversationStatus",
        "tags": [
          "Conversations"
        ],
        "summary": "Set a conversation's status",
        "description": "Sets the status to `open`, `snoozed` or `closed`. `snoozed` here means until the customer replies; use `POST /conversations/{conversationId}/snooze` for a wake time. Closing an open or snoozed conversation needs every attribute marked required to close filled (409 names the missing ones), sets `resolvedAt` and posts a `Conversation ended` notice that the customer also sees. Reopening a closed conversation clears its end reason, end note, spam marker and any offered-solution auto-close timer, and posts a `Conversation reopened` notice that the customer also sees. Setting the current status changes nothing (`changed: false`), except that `snoozed` on a conversation snoozed until a time switches it to until the customer replies. Requires the `update` permission. Records a `conversation.status_changed` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "snoozed",
                      "closed"
                    ],
                    "description": "New status. `open`: reopen or wake the conversation. `snoozed`: set it aside until the customer replies. `closed`: close it without an end reason (use `POST /conversations/{conversationId}/end` to give one).",
                    "example": "closed"
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Closing is blocked because an attribute marked required to close is empty; the message names the missing attributes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/snooze": {
      "post": {
        "operationId": "snoozeQuillsConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "Snooze a conversation",
        "description": "Snoozes the conversation until `until`, or until the customer replies when `until` is null. A customer message always wakes it; a timed snooze also reopens at `until`. Clears `resolvedAt` and any offered-solution auto-close timer; a closed conversation also loses its end reason, end note and spam marker. Posts a team-only transcript notice. Snoozing again with the same wake time changes nothing. Requires the `update` permission. Records a `conversation.status_changed` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "until": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "Wake time, ISO 8601 with a UTC offset. Null snoozes until the customer replies.",
                    "example": "2026-03-16T08:00:00Z"
                  }
                },
                "required": [
                  "until"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/end": {
      "post": {
        "operationId": "endQuillsConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "End a conversation with a reason",
        "description": "Closes the conversation and stores why it ended. Closing an open or snoozed conversation for any reason other than `spam` needs every attribute marked required to close filled (409 names the missing ones). The reason `spam` files it as spam (`spamReason` `manual`), which takes it out of every view except `spam` and `archived`; any other reason clears an earlier spam marker. Sets `resolvedAt`. Posts a `Conversation ended` notice that the customer also sees when the conversation wasn't already closed. Ending an already closed conversation updates its reason and note; repeating the same reason and note changes nothing. Requires the `update` permission. Records a `conversation.status_changed` event with the reason when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "enum": [
                      "resolved",
                      "tracked_as_feedback",
                      "duplicate",
                      "no_response",
                      "spam",
                      "other"
                    ],
                    "description": "Why the conversation ended. `resolved`: the question was answered. `tracked_as_feedback`: followed up as product feedback. `duplicate`: covered by another conversation. `no_response`: the customer stopped replying. `spam`: unwanted or abusive. `other`: anything else.",
                    "example": "resolved"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Optional free-text note on why it ended, up to 2,000 characters. Omitted or empty stores no note and clears an earlier one.",
                    "example": "Customer confirmed the new password works."
                  }
                },
                "required": [
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Closing is blocked because an attribute marked required to close is empty; the message names the missing attributes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/restore-spam": {
      "post": {
        "operationId": "restoreQuillsConversationFromSpam",
        "tags": [
          "Conversations"
        ],
        "summary": "Restore a spam-ended conversation",
        "description": "Reopens a conversation that was ended as spam: the status becomes `open` and the end reason, end note, spam marker and `resolvedAt` are cleared, so it's back in the inbox lists and counts unless it's archived. Posts a team-only transcript notice. Always counts as a change. Requires the `update` permission. Records a `conversation.status_changed` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The conversation wasn't ended as spam",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/archive": {
      "post": {
        "operationId": "archiveQuillsConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "Archive a conversation",
        "description": "Takes the conversation out of every inbox list and count except the archived view (`view=archived`) and sets `archivedAt`. The status doesn't change. A new customer message unarchives it. Archiving an archived conversation changes nothing. Requires the `update` permission. Records a `conversation.updated` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/unarchive": {
      "post": {
        "operationId": "unarchiveQuillsConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "Unarchive a conversation",
        "description": "Puts an archived conversation back in the inbox lists and counts and clears `archivedAt`. The status doesn't change. Unarchiving a conversation that isn't archived changes nothing. Requires the `update` permission. Records a `conversation.updated` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/priority": {
      "post": {
        "operationId": "setQuillsConversationPriority",
        "tags": [
          "Conversations"
        ],
        "summary": "Set a conversation's priority",
        "description": "Sets the triage priority. A new priority posts a team-only transcript notice naming the caller. When a teammate other than the assignee does this on a snoozed conversation, it also wakes it (status `open`, `snoozedUntil` cleared), even if the priority is unchanged. Otherwise setting the current priority changes nothing. Requires the `update` permission. Records a `conversation.priority_changed` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "priority": {
                    "type": "string",
                    "enum": [
                      "none",
                      "low",
                      "medium",
                      "high",
                      "urgent"
                    ],
                    "description": "New priority. `none` clears it; `low`, `medium`, `high` and `urgent` go from lowest to highest.",
                    "example": "high"
                  }
                },
                "required": [
                  "priority"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/assign": {
      "post": {
        "operationId": "assignQuillsConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "Assign a conversation to a teammate",
        "description": "Assigns the conversation to `me` (the caller), to the teammate principal of a current workspace member, or to nobody (null). Never changes the team. Assigning someone posts a `Conversation assigned to <name>` notice that the customer also sees; unassigning posts none. When the caller isn't the current assignee, a snoozed conversation also wakes (status `open`). Assigning the current assignee changes nothing. Requires the `update` permission. Records a `conversation.assigned` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assigneePrincipalId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "me"
                        ]
                      },
                      {
                        "type": "string",
                        "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                        "example": "principal_01h455vb4pex5vsknk084sn02q"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Teammate to assign: `me` for the caller, a teammate's principal ID (TypeID or UUID), or null to unassign. The teammate must belong to a current workspace member, otherwise the request fails with 404.",
                    "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                  }
                },
                "required": [
                  "assigneePrincipalId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace, or the assignee isn't the teammate principal of a current workspace member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/team": {
      "put": {
        "operationId": "assignQuillsConversationTeam",
        "tags": [
          "Conversations"
        ],
        "summary": "Assign a conversation to a team",
        "description": "Assigns the conversation to a team, or clears the team with null. Never changes the assigned teammate, and doesn't distribute the conversation to a team member. Assigning a team posts a `Conversation assigned to the <name> team` notice that the customer also sees. When the caller isn't the assignee, a snoozed conversation also wakes (status `open`). Assigning the current team changes nothing. Requires the `update` permission. Records a `conversation.assigned` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "teamId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Team to assign, as a TypeID or its UUID. The team must exist and not be deleted. Null clears the team.",
                    "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                  }
                },
                "required": [
                  "teamId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation or the team doesn't exist in this workspace, or the team is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/contact-email": {
      "put": {
        "operationId": "captureQuillsVisitorContactEmail",
        "tags": [
          "Conversations"
        ],
        "summary": "Store a contact email for the conversation's visitor",
        "description": "Stores an email address for following up with the visitor, for example an anonymous widget visitor. It's saved, lowercased, as the visitor's contact email and as the conversation's visitor email, each only where none is set yet: an address already on file is never replaced. The customer isn't notified. Changes nothing when both already have an address. Requires the `update` permission. Records a `conversation.updated` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "description": "Email address of the visitor. Up to 320 characters.",
                    "example": "dana@example.com"
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/translation": {
      "put": {
        "operationId": "setQuillsInboxTranslationEnabled",
        "tags": [
          "Conversations"
        ],
        "summary": "Turn inbox translation on or off for a conversation",
        "description": "Turns inbox translation on or off for this conversation (`translation.enabled`). Turning it on also clears a dismissed suggestion. Stores the setting only: messages aren't translated by this operation. Setting the current value changes nothing. Requires the `update` permission. Records a `conversation.updated` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "True turns translation on, false turns it off.",
                    "example": true
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/translation/dismiss": {
      "post": {
        "operationId": "dismissQuillsInboxTranslationSuggestion",
        "tags": [
          "Conversations"
        ],
        "summary": "Dismiss the translation suggestion for a conversation",
        "description": "Records that a teammate dismissed the suggestion to translate this conversation (`translation.dismissedAt`), so it isn't offered again. Dismissing again changes nothing. Requires the `update` permission. Records a `conversation.updated` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/availability": {
      "put": {
        "operationId": "setQuillsAgentAvailability",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Set your chat availability",
        "description": "Sets the caller's own chat availability; it can't be set for another teammate. While `away`, the caller never counts as an online agent in what customers see, even with the inbox open. Setting the current value changes nothing. Requires the `update` permission. Records an `agent.availability_changed` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "availability": {
                    "type": "string",
                    "enum": [
                      "online",
                      "away"
                    ],
                    "description": "New availability. `online`: counts as an online agent while the inbox is open. `away`: never counts as online.",
                    "example": "away"
                  }
                },
                "required": [
                  "availability"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The caller's availability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the caller.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "availability": {
                      "type": "string",
                      "enum": [
                        "online",
                        "away"
                      ],
                      "description": "The caller's availability after the request.",
                      "example": "away"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the availability changed. False when it already had this value.",
                      "example": true
                    }
                  },
                  "required": [
                    "principalId",
                    "availability",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/requester": {
      "patch": {
        "operationId": "setQuillsConversationRequester",
        "tags": [
          "Conversations"
        ],
        "summary": "Override the customer requester on a conversation",
        "description": "Makes the person with this email address the conversation's visitor (requester), for example when a forwarded email was attributed to the wrong sender. The address is matched case-insensitively; when nobody has it, a new customer account and profile are created. Sets `visitorEmail` to the address and clears `forwardParseFailed`. Changes nothing when that person is already the requester with that address and no warning is set. Requires the `update` permission. Records a `conversation.requester_changed` event with the new visitor's principal ID when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "description": "Email address of the requester. Up to 320 characters.",
                    "example": "dana@example.com"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Display name for a newly created customer account or profile, 1 to 200 characters. Defaults to the part of the address before `@`. Ignored when the person already has both.",
                    "example": "Dana Whitfield"
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/offer-solution": {
      "post": {
        "operationId": "offerQuillsConversationSolution",
        "tags": [
          "Conversations"
        ],
        "summary": "Offer a solution and start the auto-close timer",
        "description": "Marks that a solution was offered and starts a quiet auto-close timer, leaving the status unchanged. Posts a transcript notice that the customer also sees. A background sweep posts one customer-visible check-in reminder shortly before the deadline (the workspace reopen policy's `reminderBeforeCloseHours`, 24 by default) and, if the conversation is still open at the deadline, closes it as `resolved`, unless an attribute marked required to close is empty, in which case the timer is dropped. A teammate or customer reply cancels the timer. Calling it again restarts the timer. A closed conversation changes nothing. Requires the `update` permission. Records a `conversation.solution_offered` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "autoCloseAfterDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30,
                    "description": "Days until the conversation closes quietly, 1 to 30. Defaults to the workspace reopen policy's `autoCloseAfterDays` (5 unless changed).",
                    "example": 5
                  }
                },
                "default": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation after the request, with `changed` saying whether anything changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation ID.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "open",
                        "snoozed",
                        "closed"
                      ],
                      "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                      "example": "open"
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "none",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                      "example": "high"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                      "example": "messenger"
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                      "example": "widget"
                    },
                    "subject": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                      "example": "Can't sign in after resetting my password"
                    },
                    "lastMessagePreview": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                      "example": "I tried the reset link twice, but it still says my session expired."
                    },
                    "lastMessageAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the conversation was created, in ISO 8601 UTC.",
                      "example": "2026-03-14T08:02:11.000Z"
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "visitorPrincipalId": {
                      "type": "string",
                      "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                      "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                    },
                    "visitorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                      "example": "Dana Whitfield"
                    },
                    "visitorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "URL of the visitor's profile picture. Null when there's none.",
                      "example": "https://example.com/avatars/dana.png"
                    },
                    "visitorEmail": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                      "example": "dana@example.com"
                    },
                    "isTest": {
                      "type": "boolean",
                      "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                      "example": false
                    },
                    "assignedAgentPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                      "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                    },
                    "assignedTeamId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                      "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                    },
                    "unreadCount": {
                      "type": "number",
                      "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                      "example": 2
                    },
                    "waitingSince": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                      "example": "2026-03-14T09:20:40.000Z"
                    },
                    "snoozedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                      "example": "2026-03-16T08:00:00.000Z"
                    },
                    "resolvedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                      "example": "2026-03-14T10:05:00.000Z"
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                      "example": null
                    },
                    "endReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                      "example": "resolved"
                    },
                    "endNote": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                      "example": "Customer confirmed the new password works."
                    },
                    "spamReason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                      "example": null
                    },
                    "csatRating": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                      "example": 5
                    },
                    "forwardParseFailed": {
                      "type": "boolean",
                      "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                      "example": false
                    },
                    "agentLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                      "example": "2026-03-14T09:25:00.000Z"
                    },
                    "visitorLastReadAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                      "example": "2026-03-14T09:24:12.000Z"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID.",
                            "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a hex code.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Custom attribute values stored on the conversation. Values of an invalid shape are left out."
                    },
                    "translation": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "True when a teammate turned on inbox translation for this conversation.",
                          "example": false
                        },
                        "detectedLanguage": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Language detected from the visitor's messages. Null when no language has been detected.",
                          "example": null
                        },
                        "dismissedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate dismissed the translation suggestion, in ISO 8601 UTC. Null when never dismissed; turning translation on clears it.",
                          "example": null
                        }
                      },
                      "required": [
                        "enabled",
                        "detectedLanguage",
                        "dismissedAt"
                      ],
                      "description": "Inbox translation state of the conversation."
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "AI-generated summary of the conversation. Null until one has been generated.",
                      "example": "Dana can't sign in after a password reset. The team reset the password again and asked her to retry."
                    },
                    "summaryUpdatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the summary was last generated, in ISO 8601 UTC. Null when there's no summary.",
                      "example": "2026-03-14T09:40:00.000Z"
                    },
                    "csatComment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Comment the visitor left with their satisfaction rating. Null when none.",
                      "example": "Quick and friendly, thanks!"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the conversation. False for a no-op, which records no event.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "priority",
                    "channel",
                    "source",
                    "subject",
                    "lastMessagePreview",
                    "lastMessageAt",
                    "createdAt",
                    "updatedAt",
                    "visitorPrincipalId",
                    "visitorName",
                    "visitorAvatarUrl",
                    "visitorEmail",
                    "isTest",
                    "assignedAgentPrincipalId",
                    "assignedTeamId",
                    "unreadCount",
                    "waitingSince",
                    "snoozedUntil",
                    "resolvedAt",
                    "archivedAt",
                    "endReason",
                    "endNote",
                    "spamReason",
                    "csatRating",
                    "forwardParseFailed",
                    "agentLastReadAt",
                    "visitorLastReadAt",
                    "tags",
                    "attributes",
                    "translation",
                    "summary",
                    "summaryUpdatedAt",
                    "csatComment",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-tags": {
      "get": {
        "operationId": "listQuillsConversationTags",
        "tags": [
          "Conversations"
        ],
        "summary": "List conversation tags",
        "description": "Lists the workspace's live (not archived) conversation tags, ordered by name, at most 1,000 with no pagination. With `counts=true`, each tag also carries the number of open conversations that have it, excluding test customers' conversations. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "Whether to count open conversations per tag. `true`: fill in `count`; `false`: leave `count` null, which is faster. Defaults to `false`.",
              "example": "true"
            },
            "required": false,
            "description": "Whether to count open conversations per tag. `true`: fill in `count`; `false`: leave `count` null, which is faster. Defaults to `false`.",
            "name": "counts",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The live conversation tags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID (TypeID).",
                            "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name as shown to teammates.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                            "example": "#6b7280"
                          },
                          "count": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Number of open conversations with this tag, excluding test customers' conversations. Null unless `counts=true`.",
                            "example": 12
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "count"
                        ],
                        "description": "A conversation tag."
                      },
                      "description": "Live tags, ordered by name."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsConversationTag",
        "tags": [
          "Conversations"
        ],
        "summary": "Create a conversation tag, or reuse one with the same name",
        "description": "Creates a conversation tag. Idempotent by name: when a live tag already has the name in any case, it's returned unchanged with `created: false` and its color isn't updated. An archived tag with exactly this name is restored with the given color instead of creating a new one. Requires the `manage_settings` permission. Records a `conversation_tag.created` event when `created` is true.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Tag name, 1 to 50 characters after trimming. Names are unique in the workspace regardless of case among live tags, and exactly among archived ones.",
                    "example": "Billing"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "default": "#6b7280",
                    "description": "Badge color as a six-digit hex code in `#RRGGBB` form. Defaults to `#6b7280` (gray).",
                    "example": "#2563eb"
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new, restored or existing tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation tag ID (TypeID).",
                      "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                    },
                    "name": {
                      "type": "string",
                      "description": "Tag name as shown to teammates.",
                      "example": "Billing"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    },
                    "created": {
                      "type": "boolean",
                      "description": "Whether this request created the tag or restored an archived one. False when a live tag with the same name was returned.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "color",
                    "created"
                  ],
                  "description": "A conversation tag."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A concurrent request created a tag with the same name in another case",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-tags/usage": {
      "get": {
        "operationId": "listQuillsConversationTagUsage",
        "tags": [
          "Conversations"
        ],
        "summary": "List every conversation tag with its usage",
        "description": "Lists every conversation tag of the workspace, archived ones included, with the number of conversations in any status that have it (test customers' conversations aren't counted). Ordered by name, at most 1,000 with no pagination. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Every conversation tag with its usage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID (TypeID).",
                            "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name as shown to teammates.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                            "example": "#6b7280"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of conversations in any status that have the tag, excluding test customers' conversations.",
                            "example": 48
                          },
                          "archived": {
                            "type": "boolean",
                            "description": "Whether the tag is archived. An archived tag is hidden from pickers and lists, and its name stays reserved.",
                            "example": false
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "count",
                          "archived"
                        ],
                        "description": "A conversation tag."
                      },
                      "description": "Every tag, archived ones included, by name."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-tags/{tagId}": {
      "patch": {
        "operationId": "updateQuillsConversationTag",
        "tags": [
          "Conversations"
        ],
        "summary": "Rename or recolor a conversation tag",
        "description": "Renames or recolors a live conversation tag. Send at least one of `name` and `color`. Conversations, workflows and macros reference the tag by ID, so they follow the change. Requires the `manage_settings` permission. Records a `conversation_tag.updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation tag ID. Accepts the TypeID or its UUID.",
              "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
            },
            "required": true,
            "description": "Conversation tag ID. Accepts the TypeID or its UUID.",
            "name": "tagId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "description": "Tag name, 1 to 50 characters after trimming. Names are unique in the workspace regardless of case among live tags, and exactly among archived ones.",
                    "example": "Billing"
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[0-9A-Fa-f]{6}$",
                    "description": "New badge color as a six-digit hex code in `#RRGGBB` form. Omit to keep the current color.",
                    "example": "#16a34a"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation tag ID (TypeID).",
                      "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                    },
                    "name": {
                      "type": "string",
                      "description": "Tag name as shown to teammates.",
                      "example": "Billing"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "color"
                  ],
                  "description": "A conversation tag."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The tag doesn't exist in this workspace or is archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another tag already uses the name (any case among live tags, exactly among archived ones)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "archiveQuillsConversationTag",
        "tags": [
          "Conversations"
        ],
        "summary": "Archive a conversation tag",
        "description": "Archives (soft-deletes) a live conversation tag. It leaves pickers and lists, and conversations stop showing it, but their assignments are kept and come back if the tag is restored. The name stays reserved. Refused while a live workflow or any macro uses the tag. Requires the `manage_settings` permission. Records a `conversation_tag.archived` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation tag ID. Accepts the TypeID or its UUID.",
              "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
            },
            "required": true,
            "description": "Conversation tag ID. Accepts the TypeID or its UUID.",
            "name": "tagId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The archived tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation tag ID (TypeID).",
                      "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                    },
                    "name": {
                      "type": "string",
                      "description": "Tag name as shown to teammates.",
                      "example": "Billing"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "color"
                  ],
                  "description": "A conversation tag."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The tag doesn't exist in this workspace or is already archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A live workflow or a macro uses the tag; the message names it. Update it first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-tags/{tagId}/restore": {
      "post": {
        "operationId": "restoreQuillsConversationTag",
        "tags": [
          "Conversations"
        ],
        "summary": "Restore an archived conversation tag",
        "description": "Restores an archived conversation tag with its name and color. Conversations that had it show it again. Requires the `manage_settings` permission. Records a `conversation_tag.restored` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation tag ID. Accepts the TypeID or its UUID.",
              "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
            },
            "required": true,
            "description": "Conversation tag ID. Accepts the TypeID or its UUID.",
            "name": "tagId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored tag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation tag ID (TypeID).",
                      "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                    },
                    "name": {
                      "type": "string",
                      "description": "Tag name as shown to teammates.",
                      "example": "Billing"
                    },
                    "color": {
                      "type": "string",
                      "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                      "example": "#6b7280"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "color"
                  ],
                  "description": "A conversation tag."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The tag doesn't exist in this workspace or isn't archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A live tag already uses this name in another case",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-tags/{tagId}/permanent": {
      "delete": {
        "operationId": "deleteQuillsConversationTag",
        "tags": [
          "Conversations"
        ],
        "summary": "Delete an archived conversation tag for good",
        "description": "Permanently deletes an archived conversation tag and removes it from every conversation. This can't be undone, and it frees the name. Archive the tag first. Refused while a live workflow or any macro uses the tag. Requires the `manage_settings` permission. Records a `conversation_tag.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation tag ID. Accepts the TypeID or its UUID.",
              "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
            },
            "required": true,
            "description": "Conversation tag ID. Accepts the TypeID or its UUID.",
            "name": "tagId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted tag's ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted tag (TypeID).",
                      "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The tag doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The tag isn't archived yet, or a live workflow or a macro uses it; the message says which",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/tags": {
      "post": {
        "operationId": "addQuillsConversationTag",
        "tags": [
          "Conversations"
        ],
        "summary": "Tag a conversation",
        "description": "Adds a live tag to a conversation. Idempotent: tagging a conversation that already has the tag changes nothing (`changed: false`). To tag with a new name, create the tag first. Requires the `update` permission. Records a `conversation.tags_changed` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tagId": {
                    "type": "string",
                    "description": "ID of the live tag to add. Accepts the TypeID or its UUID.",
                    "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                  }
                },
                "required": [
                  "tagId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation's tags after the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversationId": {
                      "type": "string",
                      "description": "Conversation ID (TypeID).",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the request added or removed the tag. False when the conversation already had it (add) or didn't have it (remove).",
                      "example": true
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID (TypeID).",
                            "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name as shown to teammates.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ],
                        "description": "A conversation tag."
                      },
                      "description": "The conversation's live tags after the request, ordered by name. Archived tags are left out."
                    }
                  },
                  "required": [
                    "conversationId",
                    "changed",
                    "tags"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace, or the tag doesn't exist or is archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/tags/{tagId}": {
      "delete": {
        "operationId": "removeQuillsConversationTag",
        "tags": [
          "Conversations"
        ],
        "summary": "Remove a tag from a conversation",
        "description": "Removes a tag from a conversation. The tag may be archived. Idempotent: removing a tag the conversation doesn't have changes nothing (`changed: false`). Requires the `update` permission. Records a `conversation.tags_changed` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation tag ID. Accepts the TypeID or its UUID.",
              "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
            },
            "required": true,
            "description": "Conversation tag ID. Accepts the TypeID or its UUID.",
            "name": "tagId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The conversation's tags after the request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversationId": {
                      "type": "string",
                      "description": "Conversation ID (TypeID).",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the request added or removed the tag. False when the conversation already had it (add) or didn't have it (remove).",
                      "example": true
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation tag ID (TypeID).",
                            "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name as shown to teammates.",
                            "example": "Billing"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                            "example": "#6b7280"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ],
                        "description": "A conversation tag."
                      },
                      "description": "The conversation's live tags after the request, ordered by name. Archived tags are left out."
                    }
                  },
                  "required": [
                    "conversationId",
                    "changed",
                    "tags"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation or the tag doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-attributes": {
      "get": {
        "operationId": "listQuillsConversationAttributes",
        "tags": [
          "Conversations"
        ],
        "summary": "List conversation attribute definitions",
        "description": "Lists the workspace's conversation attribute definitions, ordered by label, at most 500 with no pagination. Archived definitions are left out unless `includeArchived=true`. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "default": "false",
              "description": "Whether to include archived definitions. Defaults to `false`.",
              "example": "false"
            },
            "required": false,
            "description": "Whether to include archived definitions. Defaults to `false`.",
            "name": "includeArchived",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The attribute definitions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Conversation attribute definition ID (TypeID).",
                            "example": "conv_attr_01m8rzdgxqecrb410c7gx47pba"
                          },
                          "key": {
                            "type": "string",
                            "description": "Machine key the values are stored under on each conversation. Never changes, and stays reserved after archiving.",
                            "example": "plan_tier"
                          },
                          "label": {
                            "type": "string",
                            "description": "Label shown to teammates.",
                            "example": "Plan tier"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Help text shown with the attribute. Null when there is none.",
                            "example": "The customer's billing plan."
                          },
                          "fieldType": {
                            "type": "string",
                            "enum": [
                              "text",
                              "number",
                              "select",
                              "multi_select",
                              "checkbox",
                              "date"
                            ],
                            "description": "Kind of value the attribute holds. `text`: a string; `number`: a finite number; `select`: one option ID; `multi_select`: an array of option IDs; `checkbox`: true or false; `date`: a date string. Never changes after creation.",
                            "example": "select"
                          },
                          "options": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Stable option ID: the value stored on conversations. It never changes when the label does.",
                                  "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                                },
                                "label": {
                                  "type": "string",
                                  "description": "Option label shown to teammates.",
                                  "example": "Enterprise"
                                },
                                "description": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Help text for the option. Null or absent when there is none.",
                                  "example": "Annual contract with a dedicated account manager."
                                }
                              },
                              "required": [
                                "id",
                                "label"
                              ]
                            },
                            "description": "Choices of a `select` or `multi_select` attribute, in display order. Null for the other field types."
                          },
                          "requiredToClose": {
                            "type": "boolean",
                            "description": "Whether the attribute must have a value before a teammate closes a conversation. Closing without it returns 409 naming the missing attributes.",
                            "example": false
                          },
                          "sourceHint": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display-only hint of who is expected to fill the attribute. `ai`: AI detection; `workflow`: a workflow; `agent`: a teammate. Null for no hint. It doesn't restrict who can write values.",
                            "example": "ai"
                          },
                          "aiDetect": {
                            "type": "boolean",
                            "description": "Whether the attribute is opted in to AI detection, which picks one of its options for a conversation. `select` attributes only.",
                            "example": true
                          },
                          "detectOnClose": {
                            "type": "boolean",
                            "description": "Whether AI detection should also run when a teammate closes a conversation. `select` attributes only; meaningful with `aiDetect`.",
                            "example": false
                          },
                          "archivedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the definition was archived, in ISO 8601 UTC. Null while it's active. Archived definitions leave pickers but their stored values stay readable.",
                            "example": null
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the definition was created, in ISO 8601 UTC.",
                            "example": "2026-03-02T15:04:11.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the definition last changed, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "key",
                          "label",
                          "description",
                          "fieldType",
                          "options",
                          "requiredToClose",
                          "sourceHint",
                          "aiDetect",
                          "detectOnClose",
                          "archivedAt",
                          "createdAt",
                          "updatedAt"
                        ],
                        "description": "A conversation attribute definition."
                      },
                      "description": "Attribute definitions, ordered by label."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsConversationAttribute",
        "tags": [
          "Conversations"
        ],
        "summary": "Create a conversation attribute definition",
        "description": "Creates a conversation attribute definition. The key is normalized to snake_case and must be unused, archived definitions included. `select` and `multi_select` attributes need at least one option, and each option gets a generated stable ID; other field types take none (400). AI detection (`aiDetect`, `detectOnClose`) is only for `select` attributes (400 otherwise). Requires the `manage_settings` permission. Records a `conversation_attribute.created` event with the key.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Machine key the values are stored under. Trimmed, lowercased and with whitespace runs turned into `_`; the result must be 1 to 64 lowercase letters, digits and underscores. Must be unique in the workspace, archived definitions included. Can't be changed later.",
                    "example": "plan_tier"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "Label shown to teammates, 1 to 128 characters after trimming.",
                    "example": "Plan tier"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 512,
                    "description": "Optional help text shown with the attribute, up to 512 characters. Null or empty stores none.",
                    "example": "The customer's billing plan."
                  },
                  "fieldType": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "select",
                      "multi_select",
                      "checkbox",
                      "date"
                    ],
                    "description": "Kind of value the attribute holds. `text`: a string; `number`: a finite number; `select`: one option ID; `multi_select`: an array of option IDs; `checkbox`: true or false; `date`: a date string. Can't be changed later.",
                    "example": "select"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "Option label shown to teammates, 1 to 100 characters after trimming.",
                          "example": "Enterprise"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 512,
                          "description": "Optional help text for the option, up to 512 characters. Null or empty stores none.",
                          "example": "Annual contract with a dedicated account manager."
                        }
                      },
                      "required": [
                        "label"
                      ]
                    },
                    "maxItems": 100,
                    "description": "Choices in display order, up to 100. Required (at least one) for `select` and `multi_select`; must be omitted or empty for the other field types."
                  },
                  "requiredToClose": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether the attribute must have a value before a teammate closes a conversation. Defaults to `false`.",
                    "example": false
                  },
                  "sourceHint": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "ai",
                      "workflow",
                      "agent",
                      null
                    ],
                    "description": "Display-only hint of who is expected to fill the attribute. `ai`: AI detection; `workflow`: a workflow; `agent`: a teammate. Null for no hint. It doesn't restrict who can write values. On create, omitted means no hint; on update, omit it to keep the current hint.",
                    "example": "ai"
                  },
                  "aiDetect": {
                    "type": "boolean",
                    "description": "Whether to opt the attribute in to AI detection. Only `true` on a `select` attribute. Omitted means `true` for `select` attributes and `false` otherwise.",
                    "example": true
                  },
                  "detectOnClose": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether AI detection should also run when a teammate closes a conversation. Only `true` on a `select` attribute. Defaults to `false`.",
                    "example": false
                  }
                },
                "required": [
                  "key",
                  "label",
                  "fieldType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new attribute definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation attribute definition ID (TypeID).",
                      "example": "conv_attr_01m8rzdgxqecrb410c7gx47pba"
                    },
                    "key": {
                      "type": "string",
                      "description": "Machine key the values are stored under on each conversation. Never changes, and stays reserved after archiving.",
                      "example": "plan_tier"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label shown to teammates.",
                      "example": "Plan tier"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Help text shown with the attribute. Null when there is none.",
                      "example": "The customer's billing plan."
                    },
                    "fieldType": {
                      "type": "string",
                      "enum": [
                        "text",
                        "number",
                        "select",
                        "multi_select",
                        "checkbox",
                        "date"
                      ],
                      "description": "Kind of value the attribute holds. `text`: a string; `number`: a finite number; `select`: one option ID; `multi_select`: an array of option IDs; `checkbox`: true or false; `date`: a date string. Never changes after creation.",
                      "example": "select"
                    },
                    "options": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable option ID: the value stored on conversations. It never changes when the label does.",
                            "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                          },
                          "label": {
                            "type": "string",
                            "description": "Option label shown to teammates.",
                            "example": "Enterprise"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Help text for the option. Null or absent when there is none.",
                            "example": "Annual contract with a dedicated account manager."
                          }
                        },
                        "required": [
                          "id",
                          "label"
                        ]
                      },
                      "description": "Choices of a `select` or `multi_select` attribute, in display order. Null for the other field types."
                    },
                    "requiredToClose": {
                      "type": "boolean",
                      "description": "Whether the attribute must have a value before a teammate closes a conversation. Closing without it returns 409 naming the missing attributes.",
                      "example": false
                    },
                    "sourceHint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display-only hint of who is expected to fill the attribute. `ai`: AI detection; `workflow`: a workflow; `agent`: a teammate. Null for no hint. It doesn't restrict who can write values.",
                      "example": "ai"
                    },
                    "aiDetect": {
                      "type": "boolean",
                      "description": "Whether the attribute is opted in to AI detection, which picks one of its options for a conversation. `select` attributes only.",
                      "example": true
                    },
                    "detectOnClose": {
                      "type": "boolean",
                      "description": "Whether AI detection should also run when a teammate closes a conversation. `select` attributes only; meaningful with `aiDetect`.",
                      "example": false
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the definition was archived, in ISO 8601 UTC. Null while it's active. Archived definitions leave pickers but their stored values stay readable.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was created, in ISO 8601 UTC.",
                      "example": "2026-03-02T15:04:11.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition last changed, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "label",
                    "description",
                    "fieldType",
                    "options",
                    "requiredToClose",
                    "sourceHint",
                    "aiDetect",
                    "detectOnClose",
                    "archivedAt",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "A conversation attribute definition."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "An attribute definition with that key already exists, archived ones included",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-attributes/{attributeId}": {
      "patch": {
        "operationId": "updateQuillsConversationAttribute",
        "tags": [
          "Conversations"
        ],
        "summary": "Update a conversation attribute definition",
        "description": "Updates a conversation attribute definition, archived or not. Send at least one field; omitted fields keep their value. The key and field type never change. `options` replaces the option list and must name every existing option ID exactly once, because stored values use them: existing options can be relabeled and reordered, and entries without an ID are added with a generated ID (400 for an unknown, repeated or missing ID, or on a non-select attribute). AI detection is only for `select` attributes (400 otherwise). Requires the `manage_settings` permission. Records a `conversation_attribute.updated` event with the key.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation attribute definition ID. Accepts the TypeID or its UUID.",
              "example": "conv_attr_01m8rzdgxqecrb410c7gx47pba"
            },
            "required": true,
            "description": "Conversation attribute definition ID. Accepts the TypeID or its UUID.",
            "name": "attributeId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "description": "New label shown to teammates, 1 to 128 characters after trimming.",
                    "example": "Plan tier"
                  },
                  "description": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 512,
                    "description": "New help text, up to 512 characters. Null or empty clears it; omit to keep it.",
                    "example": "The customer's billing plan."
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "Option label shown to teammates, 1 to 100 characters after trimming.",
                          "example": "Enterprise"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 512,
                          "description": "Optional help text for the option, up to 512 characters. Null or empty stores none.",
                          "example": "Annual contract with a dedicated account manager."
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "description": "ID of the existing option this entry updates. Omit to add a new option.",
                          "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                        }
                      },
                      "required": [
                        "label"
                      ]
                    },
                    "maxItems": 100,
                    "description": "Full new option list in display order, up to 100, for `select` and `multi_select` attributes. Must include every existing option by ID; options can't be removed."
                  },
                  "requiredToClose": {
                    "type": "boolean",
                    "description": "Whether the attribute must have a value before a teammate closes a conversation.",
                    "example": true
                  },
                  "sourceHint": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "ai",
                      "workflow",
                      "agent",
                      null
                    ],
                    "description": "Display-only hint of who is expected to fill the attribute. `ai`: AI detection; `workflow`: a workflow; `agent`: a teammate. Null for no hint. It doesn't restrict who can write values. On create, omitted means no hint; on update, omit it to keep the current hint.",
                    "example": "ai"
                  },
                  "aiDetect": {
                    "type": "boolean",
                    "description": "Whether the attribute is opted in to AI detection. Only `true` on a `select` attribute.",
                    "example": true
                  },
                  "detectOnClose": {
                    "type": "boolean",
                    "description": "Whether AI detection should also run when a teammate closes a conversation. Only `true` on a `select` attribute.",
                    "example": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated attribute definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation attribute definition ID (TypeID).",
                      "example": "conv_attr_01m8rzdgxqecrb410c7gx47pba"
                    },
                    "key": {
                      "type": "string",
                      "description": "Machine key the values are stored under on each conversation. Never changes, and stays reserved after archiving.",
                      "example": "plan_tier"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label shown to teammates.",
                      "example": "Plan tier"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Help text shown with the attribute. Null when there is none.",
                      "example": "The customer's billing plan."
                    },
                    "fieldType": {
                      "type": "string",
                      "enum": [
                        "text",
                        "number",
                        "select",
                        "multi_select",
                        "checkbox",
                        "date"
                      ],
                      "description": "Kind of value the attribute holds. `text`: a string; `number`: a finite number; `select`: one option ID; `multi_select`: an array of option IDs; `checkbox`: true or false; `date`: a date string. Never changes after creation.",
                      "example": "select"
                    },
                    "options": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable option ID: the value stored on conversations. It never changes when the label does.",
                            "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                          },
                          "label": {
                            "type": "string",
                            "description": "Option label shown to teammates.",
                            "example": "Enterprise"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Help text for the option. Null or absent when there is none.",
                            "example": "Annual contract with a dedicated account manager."
                          }
                        },
                        "required": [
                          "id",
                          "label"
                        ]
                      },
                      "description": "Choices of a `select` or `multi_select` attribute, in display order. Null for the other field types."
                    },
                    "requiredToClose": {
                      "type": "boolean",
                      "description": "Whether the attribute must have a value before a teammate closes a conversation. Closing without it returns 409 naming the missing attributes.",
                      "example": false
                    },
                    "sourceHint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display-only hint of who is expected to fill the attribute. `ai`: AI detection; `workflow`: a workflow; `agent`: a teammate. Null for no hint. It doesn't restrict who can write values.",
                      "example": "ai"
                    },
                    "aiDetect": {
                      "type": "boolean",
                      "description": "Whether the attribute is opted in to AI detection, which picks one of its options for a conversation. `select` attributes only.",
                      "example": true
                    },
                    "detectOnClose": {
                      "type": "boolean",
                      "description": "Whether AI detection should also run when a teammate closes a conversation. `select` attributes only; meaningful with `aiDetect`.",
                      "example": false
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the definition was archived, in ISO 8601 UTC. Null while it's active. Archived definitions leave pickers but their stored values stay readable.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was created, in ISO 8601 UTC.",
                      "example": "2026-03-02T15:04:11.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition last changed, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "label",
                    "description",
                    "fieldType",
                    "options",
                    "requiredToClose",
                    "sourceHint",
                    "aiDetect",
                    "detectOnClose",
                    "archivedAt",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "A conversation attribute definition."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The attribute definition doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-attributes/{attributeId}/archive": {
      "post": {
        "operationId": "archiveQuillsConversationAttribute",
        "tags": [
          "Conversations"
        ],
        "summary": "Archive a conversation attribute definition",
        "description": "Archives a conversation attribute definition. It leaves pickers, is no longer required to close, and new values can't be set (409); stored values stay readable and the key stays reserved. Requires the `manage_settings` permission. Records a `conversation_attribute.archived` event with the key.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation attribute definition ID. Accepts the TypeID or its UUID.",
              "example": "conv_attr_01m8rzdgxqecrb410c7gx47pba"
            },
            "required": true,
            "description": "Conversation attribute definition ID. Accepts the TypeID or its UUID.",
            "name": "attributeId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The archived attribute definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation attribute definition ID (TypeID).",
                      "example": "conv_attr_01m8rzdgxqecrb410c7gx47pba"
                    },
                    "key": {
                      "type": "string",
                      "description": "Machine key the values are stored under on each conversation. Never changes, and stays reserved after archiving.",
                      "example": "plan_tier"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label shown to teammates.",
                      "example": "Plan tier"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Help text shown with the attribute. Null when there is none.",
                      "example": "The customer's billing plan."
                    },
                    "fieldType": {
                      "type": "string",
                      "enum": [
                        "text",
                        "number",
                        "select",
                        "multi_select",
                        "checkbox",
                        "date"
                      ],
                      "description": "Kind of value the attribute holds. `text`: a string; `number`: a finite number; `select`: one option ID; `multi_select`: an array of option IDs; `checkbox`: true or false; `date`: a date string. Never changes after creation.",
                      "example": "select"
                    },
                    "options": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable option ID: the value stored on conversations. It never changes when the label does.",
                            "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                          },
                          "label": {
                            "type": "string",
                            "description": "Option label shown to teammates.",
                            "example": "Enterprise"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Help text for the option. Null or absent when there is none.",
                            "example": "Annual contract with a dedicated account manager."
                          }
                        },
                        "required": [
                          "id",
                          "label"
                        ]
                      },
                      "description": "Choices of a `select` or `multi_select` attribute, in display order. Null for the other field types."
                    },
                    "requiredToClose": {
                      "type": "boolean",
                      "description": "Whether the attribute must have a value before a teammate closes a conversation. Closing without it returns 409 naming the missing attributes.",
                      "example": false
                    },
                    "sourceHint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display-only hint of who is expected to fill the attribute. `ai`: AI detection; `workflow`: a workflow; `agent`: a teammate. Null for no hint. It doesn't restrict who can write values.",
                      "example": "ai"
                    },
                    "aiDetect": {
                      "type": "boolean",
                      "description": "Whether the attribute is opted in to AI detection, which picks one of its options for a conversation. `select` attributes only.",
                      "example": true
                    },
                    "detectOnClose": {
                      "type": "boolean",
                      "description": "Whether AI detection should also run when a teammate closes a conversation. `select` attributes only; meaningful with `aiDetect`.",
                      "example": false
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the definition was archived, in ISO 8601 UTC. Null while it's active. Archived definitions leave pickers but their stored values stay readable.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was created, in ISO 8601 UTC.",
                      "example": "2026-03-02T15:04:11.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition last changed, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "label",
                    "description",
                    "fieldType",
                    "options",
                    "requiredToClose",
                    "sourceHint",
                    "aiDetect",
                    "detectOnClose",
                    "archivedAt",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "A conversation attribute definition."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The attribute definition doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The attribute definition is already archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-attributes/{attributeId}/restore": {
      "post": {
        "operationId": "restoreQuillsConversationAttribute",
        "tags": [
          "Conversations"
        ],
        "summary": "Restore an archived conversation attribute definition",
        "description": "Restores an archived conversation attribute definition, so it's offered in pickers and accepts values again. Requires the `manage_settings` permission. Records a `conversation_attribute.restored` event with the key.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation attribute definition ID. Accepts the TypeID or its UUID.",
              "example": "conv_attr_01m8rzdgxqecrb410c7gx47pba"
            },
            "required": true,
            "description": "Conversation attribute definition ID. Accepts the TypeID or its UUID.",
            "name": "attributeId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored attribute definition",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Conversation attribute definition ID (TypeID).",
                      "example": "conv_attr_01m8rzdgxqecrb410c7gx47pba"
                    },
                    "key": {
                      "type": "string",
                      "description": "Machine key the values are stored under on each conversation. Never changes, and stays reserved after archiving.",
                      "example": "plan_tier"
                    },
                    "label": {
                      "type": "string",
                      "description": "Label shown to teammates.",
                      "example": "Plan tier"
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Help text shown with the attribute. Null when there is none.",
                      "example": "The customer's billing plan."
                    },
                    "fieldType": {
                      "type": "string",
                      "enum": [
                        "text",
                        "number",
                        "select",
                        "multi_select",
                        "checkbox",
                        "date"
                      ],
                      "description": "Kind of value the attribute holds. `text`: a string; `number`: a finite number; `select`: one option ID; `multi_select`: an array of option IDs; `checkbox`: true or false; `date`: a date string. Never changes after creation.",
                      "example": "select"
                    },
                    "options": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable option ID: the value stored on conversations. It never changes when the label does.",
                            "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                          },
                          "label": {
                            "type": "string",
                            "description": "Option label shown to teammates.",
                            "example": "Enterprise"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Help text for the option. Null or absent when there is none.",
                            "example": "Annual contract with a dedicated account manager."
                          }
                        },
                        "required": [
                          "id",
                          "label"
                        ]
                      },
                      "description": "Choices of a `select` or `multi_select` attribute, in display order. Null for the other field types."
                    },
                    "requiredToClose": {
                      "type": "boolean",
                      "description": "Whether the attribute must have a value before a teammate closes a conversation. Closing without it returns 409 naming the missing attributes.",
                      "example": false
                    },
                    "sourceHint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display-only hint of who is expected to fill the attribute. `ai`: AI detection; `workflow`: a workflow; `agent`: a teammate. Null for no hint. It doesn't restrict who can write values.",
                      "example": "ai"
                    },
                    "aiDetect": {
                      "type": "boolean",
                      "description": "Whether the attribute is opted in to AI detection, which picks one of its options for a conversation. `select` attributes only.",
                      "example": true
                    },
                    "detectOnClose": {
                      "type": "boolean",
                      "description": "Whether AI detection should also run when a teammate closes a conversation. `select` attributes only; meaningful with `aiDetect`.",
                      "example": false
                    },
                    "archivedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the definition was archived, in ISO 8601 UTC. Null while it's active. Archived definitions leave pickers but their stored values stay readable.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition was created, in ISO 8601 UTC.",
                      "example": "2026-03-02T15:04:11.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the definition last changed, in ISO 8601 UTC.",
                      "example": "2026-03-14T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "key",
                    "label",
                    "description",
                    "fieldType",
                    "options",
                    "requiredToClose",
                    "sourceHint",
                    "aiDetect",
                    "detectOnClose",
                    "archivedAt",
                    "createdAt",
                    "updatedAt"
                  ],
                  "description": "A conversation attribute definition."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The attribute definition doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The attribute definition is already active",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-attributes/{attributeId}/value-counts": {
      "get": {
        "operationId": "attributeQuillsValueCounts",
        "tags": [
          "Conversations"
        ],
        "summary": "Count conversations per option of a select attribute",
        "description": "Counts the conversations created in the last `sinceDays` days per option of a `select` attribute, excluding test customers' conversations. Returns one bucket per option in display order, then a last `Not set` bucket (`optionId` null) for conversations with no value or a value that matches no current option. Works on archived definitions too. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation attribute definition ID. Accepts the TypeID or its UUID.",
              "example": "conv_attr_01m8rzdgxqecrb410c7gx47pba"
            },
            "required": true,
            "description": "Conversation attribute definition ID. Accepts the TypeID or its UUID.",
            "name": "attributeId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30,
              "description": "Size of the window in days, counted back from now, by conversation creation time. From 1 to 365. Defaults to 30.",
              "example": 30
            },
            "required": false,
            "description": "Size of the window in days, counted back from now, by conversation creation time. From 1 to 365. Defaults to 30.",
            "name": "sinceDays",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Conversation counts per option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "optionId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Option ID the bucket counts. Null for the last `Not set` bucket.",
                            "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                          },
                          "label": {
                            "type": "string",
                            "description": "Current option label, or `Not set` for the last bucket.",
                            "example": "Enterprise"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of conversations in the bucket.",
                            "example": 37
                          }
                        },
                        "required": [
                          "optionId",
                          "label",
                          "count"
                        ]
                      },
                      "description": "One bucket per option in display order, followed by the `Not set` bucket."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The attribute definition doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The attribute isn't a `select` attribute (including `multi_select`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/attributes/{key}": {
      "put": {
        "operationId": "setQuillsConversationAttributeValue",
        "tags": [
          "Conversations"
        ],
        "summary": "Set or clear an attribute value on a conversation",
        "description": "Sets or clears one custom attribute value on a conversation, checked against the attribute's definition by key. The value must match the field type (400 otherwise): `text` takes a string (trimmed; empty clears it), `number` a finite number, `checkbox` a boolean, `date` a parseable date string, `select` one option ID and `multi_select` an array of option IDs (duplicates removed). Null, an empty string and an empty array clear the value. The value is stored with source `teammate` and the current time; other keys are kept. Requires the `update` permission. Records a `conversation.attribute_changed` event with the key.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z0-9_.-]+$",
              "description": "Key of the attribute definition, 1 to 64 lowercase letters, digits, `_`, `.` or `-`.",
              "example": "plan_tier"
            },
            "required": true,
            "description": "Key of the attribute definition, 1 to 64 lowercase letters, digits, `_`, `.` or `-`.",
            "name": "key",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 100
                        },
                        "maxItems": 100
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "New value: a string up to 1,000 characters, a number, a boolean, or an array of up to 100 option IDs (each up to 100 characters), as the field type requires. Null, `\"\"` or `[]` clears the value.",
                    "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                  }
                },
                "required": [
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The conversation's attribute values after the change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversationId": {
                      "type": "string",
                      "description": "Conversation ID (TypeID).",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "attributes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Attribute key, as defined in the conversation attribute settings.",
                            "example": "plan"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Stored value: a string, a number, a boolean, a list of strings (multi-select) or null.",
                            "example": "enterprise"
                          },
                          "source": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Who set the value, such as `teammate`. Null for a value stored without a source.",
                            "example": "teammate"
                          },
                          "at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Time the value was set, as an ISO 8601 string. Null when no time was stored.",
                            "example": "2026-03-14T09:30:00.000Z"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "source",
                          "at"
                        ]
                      },
                      "description": "Every custom attribute value stored on the conversation after the change. Values of an invalid shape are left out."
                    }
                  },
                  "required": [
                    "conversationId",
                    "attributes"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation doesn't exist in this workspace, or no attribute definition has this key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The attribute definition is archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/participants": {
      "get": {
        "operationId": "listQuillsConversationParticipants",
        "tags": [
          "Conversations"
        ],
        "summary": "List the customers added to a conversation",
        "description": "Lists the customers added to the conversation besides its visitor (group threads), oldest first, at most 500. Teammates are never participants. Generated placeholder addresses are never shown. Callers without the `update` permission who belong to teams only reach conversations assigned to those teams. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Participants",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the customer (TypeID).",
                            "example": "principal_01m8ry2xt8fzv9y3vahq9h816h"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Customer's account name, or their display name. Null when neither is set.",
                            "example": "Jordan Lee"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Customer's account email, else their contact email. Null when they have neither or only a generated placeholder address.",
                            "example": "jordan@example.com"
                          },
                          "addedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who added the customer (TypeID). Null when unknown.",
                            "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the customer was added, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:45:00.000Z"
                          }
                        },
                        "required": [
                          "principalId",
                          "name",
                          "email",
                          "addedByPrincipalId",
                          "createdAt"
                        ]
                      },
                      "description": "Participants, oldest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "addQuillsConversationParticipant",
        "tags": [
          "Conversations"
        ],
        "summary": "Add a customer to a conversation",
        "description": "Adds an existing customer of this workspace to the conversation, found by principal ID or by account or contact email (create the person first if they don't exist). Idempotent; adding the conversation's visitor changes nothing. A change posts an internal notice on the transcript. Requires the `update` permission. Records a `conversation.participant_added` event when the customer was added.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "principalId": {
                    "type": "string",
                    "description": "Principal ID of the customer (TypeID or UUID). Send this or `email`, not both.",
                    "example": "principal_01m8ry2xt8fzv9y3vahq9h816h"
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "description": "Account or contact email of the customer, matched case-insensitively; the oldest match wins. Send this or `principalId`, not both.",
                    "example": "jordan@example.com"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The participant list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversationId": {
                      "type": "string",
                      "description": "Conversation ID (TypeID).",
                      "example": "conversation_01m8ry2xt8fzv9y3vgkyf110vz"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the customer who was added or removed (TypeID).",
                      "example": "principal_01m8ry2xt8fzv9y3vahq9h816h"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the participant list changed. False when the customer was already in (or already out of) the list, or is the conversation's visitor.",
                      "example": true
                    },
                    "participants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the customer (TypeID).",
                            "example": "principal_01m8ry2xt8fzv9y3vahq9h816h"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Customer's account name, or their display name. Null when neither is set.",
                            "example": "Jordan Lee"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Customer's account email, else their contact email. Null when they have neither or only a generated placeholder address.",
                            "example": "jordan@example.com"
                          },
                          "addedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who added the customer (TypeID). Null when unknown.",
                            "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the customer was added, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:45:00.000Z"
                          }
                        },
                        "required": [
                          "principalId",
                          "name",
                          "email",
                          "addedByPrincipalId",
                          "createdAt"
                        ]
                      },
                      "description": "Participants after the change, oldest first."
                    }
                  },
                  "required": [
                    "conversationId",
                    "principalId",
                    "changed",
                    "participants"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found, or no customer matches the ID or email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/participants/{principalId}": {
      "delete": {
        "operationId": "removeQuillsConversationParticipant",
        "tags": [
          "Conversations"
        ],
        "summary": "Remove a customer from a conversation",
        "description": "Removes a customer from the conversation's participants. Idempotent for a person of this workspace who isn't a participant. A change posts an internal notice on the transcript. Requires the `update` permission. Records a `conversation.participant_removed` event when the customer was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Principal ID of the customer to remove. Accepts the TypeID or its UUID.",
              "example": "principal_01m8ry2xt8fzv9y3vahq9h816h"
            },
            "required": true,
            "description": "Principal ID of the customer to remove. Accepts the TypeID or its UUID.",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The participant list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversationId": {
                      "type": "string",
                      "description": "Conversation ID (TypeID).",
                      "example": "conversation_01m8ry2xt8fzv9y3vgkyf110vz"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the customer who was added or removed (TypeID).",
                      "example": "principal_01m8ry2xt8fzv9y3vahq9h816h"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the participant list changed. False when the customer was already in (or already out of) the list, or is the conversation's visitor.",
                      "example": true
                    },
                    "participants": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the customer (TypeID).",
                            "example": "principal_01m8ry2xt8fzv9y3vahq9h816h"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Customer's account name, or their display name. Null when neither is set.",
                            "example": "Jordan Lee"
                          },
                          "email": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Customer's account email, else their contact email. Null when they have neither or only a generated placeholder address.",
                            "example": "jordan@example.com"
                          },
                          "addedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who added the customer (TypeID). Null when unknown.",
                            "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the customer was added, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:45:00.000Z"
                          }
                        },
                        "required": [
                          "principalId",
                          "name",
                          "email",
                          "addedByPrincipalId",
                          "createdAt"
                        ]
                      },
                      "description": "Participants after the change, oldest first."
                    }
                  },
                  "required": [
                    "conversationId",
                    "principalId",
                    "changed",
                    "participants"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation or person not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/followers": {
      "get": {
        "operationId": "listQuillsConversationFollowers",
        "tags": [
          "Conversations"
        ],
        "summary": "List teammates following a conversation (including forwarders)",
        "description": "Lists the teammates who follow the conversation, including teammates who forwarded its email into the inbox, oldest first, at most 100. Callers without the `update` permission who belong to teams only reach conversations assigned to those teams. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Teammate followers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the teammate (TypeID).",
                            "example": "principal_01m8rxs1h9fk3s7qprjefcmm25"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Teammate's display name. Null when unset.",
                            "example": "Dana Whitaker"
                          },
                          "avatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the teammate's avatar. Null when unset.",
                            "example": "https://example.com/avatars/dana.png"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the teammate started following, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:20:00.000Z"
                          }
                        },
                        "required": [
                          "principalId",
                          "name",
                          "avatarUrl",
                          "createdAt"
                        ]
                      },
                      "description": "Followers, oldest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-views": {
      "get": {
        "operationId": "listQuillsConversationViews",
        "tags": [
          "Inbox and views"
        ],
        "summary": "List saved inbox views",
        "description": "Lists the saved inbox views the caller can see: every shared view and the caller's own private ones. Views the caller pinned come first, then the rest, each group ordered by name. At most 500, with no pagination. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The saved views the caller can see",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Saved view ID (TypeID).",
                            "example": "conversation_view_01m8rzdgxqecrb410kagt8m9wy"
                          },
                          "name": {
                            "type": "string",
                            "description": "View name.",
                            "example": "Urgent billing"
                          },
                          "filters": {
                            "type": "object",
                            "properties": {
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string",
                                      "description": "Rule type: `status`, `priority`, `assignee`, `team`, `tag`, `source`, `waiting`, `unread`, `archived`, `kind`, `ticket_type`, `ticket_status_category`, `ticket_stage` or `attribute`.",
                                      "example": "status"
                                    },
                                    "key": {
                                      "type": "string",
                                      "description": "Conversation attribute key. Only on `attribute` rules.",
                                      "example": "plan_tier"
                                    },
                                    "operator": {
                                      "type": "string",
                                      "description": "Comparison operator, such as `eq` or `includes_any`. Only on `attribute` rules.",
                                      "example": "eq"
                                    },
                                    "value": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        }
                                      ],
                                      "description": "Value the rule matches. Tag, team and teammate IDs are TypeIDs. Absent on `attribute` rules with `is_set` or `is_empty`.",
                                      "example": "open"
                                    }
                                  },
                                  "required": [
                                    "field"
                                  ],
                                  "description": "One saved filter rule."
                                },
                                "description": "Saved filter rules. A view saved in an older format that doesn't fit the rule schema reads with no rules."
                              }
                            },
                            "required": [
                              "rules"
                            ],
                            "description": "Saved filter set."
                          },
                          "sort": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "recent",
                              "oldest",
                              "created",
                              "waiting",
                              "priority",
                              null
                            ],
                            "description": "Saved sort order. `recent`: latest activity first; `oldest`: earliest activity first; `created`: newest first; `waiting`: longest-waiting customer first; `priority`: highest priority first. Null when the view saves no sort.",
                            "example": "priority"
                          },
                          "isShared": {
                            "type": "boolean",
                            "description": "Whether every teammate sees the view. False for a view private to its creator.",
                            "example": true
                          },
                          "isPinned": {
                            "type": "boolean",
                            "description": "Whether the caller pinned the view. Pins are personal to each teammate.",
                            "example": false
                          },
                          "createdByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID (TypeID) of the teammate who created the view. Null when unknown.",
                            "example": "principal_01m8rzdgxqecrb4117p85yxmdw"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "filters",
                          "sort",
                          "isShared",
                          "isPinned",
                          "createdByPrincipalId"
                        ],
                        "description": "A saved inbox view."
                      },
                      "description": "Visible views, pinned first, then by name."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsConversationView",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Save an inbox view",
        "description": "Saves a set of inbox filter rules, and optionally a sort, as a named view created by the caller. At most 15 rules. Tag, team and teammate rule values must name live records of this workspace, and are stored as TypeIDs. The view is shared with every teammate unless `isShared` is false. Requires the `create` permission. Records a `conversation_view.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "View name, 1 to 80 characters after trimming.",
                    "example": "Urgent billing"
                  },
                  "filters": {
                    "type": "object",
                    "properties": {
                      "rules": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "status"
                                  ],
                                  "description": "Rule type. `status`: conversations with this status."
                                },
                                "value": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "snoozed",
                                    "closed"
                                  ],
                                  "description": "Conversation status. `open`: active; `snoozed`: set aside; `closed`: ended.",
                                  "example": "open"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "priority"
                                  ],
                                  "description": "Rule type. `priority`: items with this priority."
                                },
                                "value": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "low",
                                    "medium",
                                    "high",
                                    "urgent"
                                  ],
                                  "description": "Priority. `none` means no priority set; `low`, `medium`, `high` and `urgent` go from lowest to highest.",
                                  "example": "urgent"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "assignee"
                                  ],
                                  "description": "Rule type. `assignee`: items with this assigned teammate."
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "`me` for the teammate using the view, `unassigned` for no assigned teammate, or a teammate's principal ID (TypeID or UUID; stored as the TypeID). Up to 64 characters.",
                                  "example": "me"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "team"
                                  ],
                                  "description": "Rule type. `team`: items assigned to this team."
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "ID of a live team of this workspace. Accepts the TypeID or its UUID; stored as the TypeID.",
                                  "example": "team_01m8rzdgxqecrb411a33m7dten"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "tag"
                                  ],
                                  "description": "Rule type. `tag`: conversations that carry this tag."
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "ID of a live conversation tag of this workspace. Accepts the TypeID or its UUID; stored as the TypeID.",
                                  "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "source"
                                  ],
                                  "description": "Rule type. `source`: conversations from this source."
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 32,
                                  "description": "Source the conversation arrived from, such as `widget`, `portal` or `email`. 1 to 32 characters.",
                                  "example": "widget"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "waiting"
                                  ],
                                  "description": "Rule type. `waiting`: conversations where the customer awaits a reply."
                                },
                                "value": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ],
                                  "description": "Always `true`.",
                                  "example": true
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "unread"
                                  ],
                                  "description": "Rule type. `unread`: conversations with a customer message after the team's read mark."
                                },
                                "value": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ],
                                  "description": "Always `true`.",
                                  "example": true
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "archived"
                                  ],
                                  "description": "Rule type. `archived`: archived conversations."
                                },
                                "value": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ],
                                  "description": "Always `true`.",
                                  "example": true
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "kind"
                                  ],
                                  "description": "Rule type. `kind`: only conversations or only tickets."
                                },
                                "value": {
                                  "type": "string",
                                  "enum": [
                                    "conversation",
                                    "ticket"
                                  ],
                                  "description": "Item kind. `conversation` or `ticket`.",
                                  "example": "ticket"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "ticket_type"
                                  ],
                                  "description": "Rule type. `ticket_type`: tickets of this category."
                                },
                                "value": {
                                  "type": "string",
                                  "enum": [
                                    "customer",
                                    "back_office",
                                    "tracker"
                                  ],
                                  "description": "Ticket category. `customer`: a request from a customer; `back_office`: internal work customers don't see; `tracker`: an issue that groups other tickets.",
                                  "example": "customer"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "ticket_status_category"
                                  ],
                                  "description": "Rule type. `ticket_status_category`: tickets whose status is in this category."
                                },
                                "value": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "pending",
                                    "closed"
                                  ],
                                  "description": "Ticket status category. `open`: waiting on the team; `pending`: waiting on someone else; `closed`: done.",
                                  "example": "pending"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "ticket_stage"
                                  ],
                                  "description": "Rule type. `ticket_stage`: tickets whose status projects to this requester-facing stage."
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "Requester-facing stage, such as `received`, `in_progress`, `awaiting_requester` or `resolved`. 1 to 64 characters.",
                                  "example": "in_progress"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "attribute"
                                  ],
                                  "description": "Rule type. `attribute`: conversations whose custom attribute matches `operator` and `value`."
                                },
                                "key": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100,
                                  "description": "Key of the conversation attribute to compare, 1 to 100 characters after trimming.",
                                  "example": "plan_tier"
                                },
                                "operator": {
                                  "type": "string",
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "contains",
                                    "not_contains",
                                    "gt",
                                    "gte",
                                    "lt",
                                    "lte",
                                    "includes_any",
                                    "excludes_all",
                                    "is_set",
                                    "is_empty"
                                  ],
                                  "description": "Comparison. `eq`/`neq`: equal or not equal; `contains`/`not_contains`: text contains or doesn't contain; `gt`, `gte`, `lt`, `lte`: greater or less than (or equal); `includes_any`: has any of the listed options; `excludes_all`: has none of them; `is_set`/`is_empty`: has a value or not (no `value` needed).",
                                  "example": "eq"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "maxLength": 200
                                      },
                                      "maxItems": 50
                                    }
                                  ],
                                  "description": "Value to compare with: a string up to 500 characters, a number, a boolean, or an array of up to 50 strings (option IDs) for `includes_any` and `excludes_all`. Omit for `is_set` and `is_empty`.",
                                  "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                                }
                              },
                              "required": [
                                "field",
                                "key",
                                "operator"
                              ]
                            }
                          ],
                          "description": "One filter rule. `field` selects the rule type and the shape of `value`."
                        },
                        "maxItems": 15,
                        "description": "Filter rules, up to 15. Tag, team and teammate values must name live records of this workspace (404 otherwise)."
                      }
                    },
                    "required": [
                      "rules"
                    ],
                    "description": "Filter set the view saves."
                  },
                  "sort": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "recent",
                      "oldest",
                      "created",
                      "waiting",
                      "priority",
                      null
                    ],
                    "default": null,
                    "description": "Saved sort order. `recent`: latest activity first; `oldest`: earliest activity first; `created`: newest first; `waiting`: longest-waiting customer first; `priority`: highest priority first. Null or omitted saves no sort.",
                    "example": "priority"
                  },
                  "isShared": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether every teammate sees the view. `false` keeps it private to the caller. Defaults to `true`.",
                    "example": true
                  }
                },
                "required": [
                  "name",
                  "filters"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new view",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Saved view ID (TypeID).",
                      "example": "conversation_view_01m8rzdgxqecrb410kagt8m9wy"
                    },
                    "name": {
                      "type": "string",
                      "description": "View name.",
                      "example": "Urgent billing"
                    },
                    "filters": {
                      "type": "object",
                      "properties": {
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "description": "Rule type: `status`, `priority`, `assignee`, `team`, `tag`, `source`, `waiting`, `unread`, `archived`, `kind`, `ticket_type`, `ticket_status_category`, `ticket_stage` or `attribute`.",
                                "example": "status"
                              },
                              "key": {
                                "type": "string",
                                "description": "Conversation attribute key. Only on `attribute` rules.",
                                "example": "plan_tier"
                              },
                              "operator": {
                                "type": "string",
                                "description": "Comparison operator, such as `eq` or `includes_any`. Only on `attribute` rules.",
                                "example": "eq"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                ],
                                "description": "Value the rule matches. Tag, team and teammate IDs are TypeIDs. Absent on `attribute` rules with `is_set` or `is_empty`.",
                                "example": "open"
                              }
                            },
                            "required": [
                              "field"
                            ],
                            "description": "One saved filter rule."
                          },
                          "description": "Saved filter rules. A view saved in an older format that doesn't fit the rule schema reads with no rules."
                        }
                      },
                      "required": [
                        "rules"
                      ],
                      "description": "Saved filter set."
                    },
                    "sort": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "recent",
                        "oldest",
                        "created",
                        "waiting",
                        "priority",
                        null
                      ],
                      "description": "Saved sort order. `recent`: latest activity first; `oldest`: earliest activity first; `created`: newest first; `waiting`: longest-waiting customer first; `priority`: highest priority first. Null when the view saves no sort.",
                      "example": "priority"
                    },
                    "isShared": {
                      "type": "boolean",
                      "description": "Whether every teammate sees the view. False for a view private to its creator.",
                      "example": true
                    },
                    "isPinned": {
                      "type": "boolean",
                      "description": "Whether the caller pinned the view. Pins are personal to each teammate.",
                      "example": false
                    },
                    "createdByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID (TypeID) of the teammate who created the view. Null when unknown.",
                      "example": "principal_01m8rzdgxqecrb4117p85yxmdw"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "filters",
                    "sort",
                    "isShared",
                    "isPinned",
                    "createdByPrincipalId"
                  ],
                  "description": "A saved inbox view."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A tag, team or teammate that a rule names doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-views/{viewId}": {
      "patch": {
        "operationId": "updateQuillsConversationView",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Change a saved inbox view",
        "description": "Changes a saved view's name, rules, sort or sharing. Send at least one field; omitted fields keep their value, and `filters` replaces every rule. Any teammate who can see a shared view can change it; a private view is visible to, and changed by, its creator only. Only the creator can share or unshare a view (403 otherwise). Rule values are checked as on create. Requires the `update` permission. Records a `conversation_view.updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Saved view ID. Accepts the TypeID or its UUID. Deleted views, and other teammates' private views, are not found.",
              "example": "conversation_view_01m8rzdgxqecrb410kagt8m9wy"
            },
            "required": true,
            "description": "Saved view ID. Accepts the TypeID or its UUID. Deleted views, and other teammates' private views, are not found.",
            "name": "viewId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "New view name, 1 to 80 characters after trimming.",
                    "example": "Urgent billing"
                  },
                  "filters": {
                    "type": "object",
                    "properties": {
                      "rules": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "status"
                                  ],
                                  "description": "Rule type. `status`: conversations with this status."
                                },
                                "value": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "snoozed",
                                    "closed"
                                  ],
                                  "description": "Conversation status. `open`: active; `snoozed`: set aside; `closed`: ended.",
                                  "example": "open"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "priority"
                                  ],
                                  "description": "Rule type. `priority`: items with this priority."
                                },
                                "value": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "low",
                                    "medium",
                                    "high",
                                    "urgent"
                                  ],
                                  "description": "Priority. `none` means no priority set; `low`, `medium`, `high` and `urgent` go from lowest to highest.",
                                  "example": "urgent"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "assignee"
                                  ],
                                  "description": "Rule type. `assignee`: items with this assigned teammate."
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "`me` for the teammate using the view, `unassigned` for no assigned teammate, or a teammate's principal ID (TypeID or UUID; stored as the TypeID). Up to 64 characters.",
                                  "example": "me"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "team"
                                  ],
                                  "description": "Rule type. `team`: items assigned to this team."
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "ID of a live team of this workspace. Accepts the TypeID or its UUID; stored as the TypeID.",
                                  "example": "team_01m8rzdgxqecrb411a33m7dten"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "tag"
                                  ],
                                  "description": "Rule type. `tag`: conversations that carry this tag."
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "ID of a live conversation tag of this workspace. Accepts the TypeID or its UUID; stored as the TypeID.",
                                  "example": "conversation_tag_01m8rzdgxpecrb40zvgem6jqmt"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "source"
                                  ],
                                  "description": "Rule type. `source`: conversations from this source."
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 32,
                                  "description": "Source the conversation arrived from, such as `widget`, `portal` or `email`. 1 to 32 characters.",
                                  "example": "widget"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "waiting"
                                  ],
                                  "description": "Rule type. `waiting`: conversations where the customer awaits a reply."
                                },
                                "value": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ],
                                  "description": "Always `true`.",
                                  "example": true
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "unread"
                                  ],
                                  "description": "Rule type. `unread`: conversations with a customer message after the team's read mark."
                                },
                                "value": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ],
                                  "description": "Always `true`.",
                                  "example": true
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "archived"
                                  ],
                                  "description": "Rule type. `archived`: archived conversations."
                                },
                                "value": {
                                  "type": "boolean",
                                  "enum": [
                                    true
                                  ],
                                  "description": "Always `true`.",
                                  "example": true
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "kind"
                                  ],
                                  "description": "Rule type. `kind`: only conversations or only tickets."
                                },
                                "value": {
                                  "type": "string",
                                  "enum": [
                                    "conversation",
                                    "ticket"
                                  ],
                                  "description": "Item kind. `conversation` or `ticket`.",
                                  "example": "ticket"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "ticket_type"
                                  ],
                                  "description": "Rule type. `ticket_type`: tickets of this category."
                                },
                                "value": {
                                  "type": "string",
                                  "enum": [
                                    "customer",
                                    "back_office",
                                    "tracker"
                                  ],
                                  "description": "Ticket category. `customer`: a request from a customer; `back_office`: internal work customers don't see; `tracker`: an issue that groups other tickets.",
                                  "example": "customer"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "ticket_status_category"
                                  ],
                                  "description": "Rule type. `ticket_status_category`: tickets whose status is in this category."
                                },
                                "value": {
                                  "type": "string",
                                  "enum": [
                                    "open",
                                    "pending",
                                    "closed"
                                  ],
                                  "description": "Ticket status category. `open`: waiting on the team; `pending`: waiting on someone else; `closed`: done.",
                                  "example": "pending"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "ticket_stage"
                                  ],
                                  "description": "Rule type. `ticket_stage`: tickets whose status projects to this requester-facing stage."
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "Requester-facing stage, such as `received`, `in_progress`, `awaiting_requester` or `resolved`. 1 to 64 characters.",
                                  "example": "in_progress"
                                }
                              },
                              "required": [
                                "field",
                                "value"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "enum": [
                                    "attribute"
                                  ],
                                  "description": "Rule type. `attribute`: conversations whose custom attribute matches `operator` and `value`."
                                },
                                "key": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100,
                                  "description": "Key of the conversation attribute to compare, 1 to 100 characters after trimming.",
                                  "example": "plan_tier"
                                },
                                "operator": {
                                  "type": "string",
                                  "enum": [
                                    "eq",
                                    "neq",
                                    "contains",
                                    "not_contains",
                                    "gt",
                                    "gte",
                                    "lt",
                                    "lte",
                                    "includes_any",
                                    "excludes_all",
                                    "is_set",
                                    "is_empty"
                                  ],
                                  "description": "Comparison. `eq`/`neq`: equal or not equal; `contains`/`not_contains`: text contains or doesn't contain; `gt`, `gte`, `lt`, `lte`: greater or less than (or equal); `includes_any`: has any of the listed options; `excludes_all`: has none of them; `is_set`/`is_empty`: has a value or not (no `value` needed).",
                                  "example": "eq"
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 500
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "maxLength": 200
                                      },
                                      "maxItems": 50
                                    }
                                  ],
                                  "description": "Value to compare with: a string up to 500 characters, a number, a boolean, or an array of up to 50 strings (option IDs) for `includes_any` and `excludes_all`. Omit for `is_set` and `is_empty`.",
                                  "example": "opt_3f6c2a9e-8b1d-4f7a-9c2e-5d4b7a1e0f93"
                                }
                              },
                              "required": [
                                "field",
                                "key",
                                "operator"
                              ]
                            }
                          ],
                          "description": "One filter rule. `field` selects the rule type and the shape of `value`."
                        },
                        "maxItems": 15,
                        "description": "Filter rules, up to 15. Tag, team and teammate values must name live records of this workspace (404 otherwise)."
                      }
                    },
                    "required": [
                      "rules"
                    ],
                    "description": "New filter set. Replaces every saved rule."
                  },
                  "sort": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "recent",
                      "oldest",
                      "created",
                      "waiting",
                      "priority",
                      null
                    ],
                    "description": "Saved sort order. `recent`: latest activity first; `oldest`: earliest activity first; `created`: newest first; `waiting`: longest-waiting customer first; `priority`: highest priority first. Null removes the saved sort; omit to keep it.",
                    "example": "waiting"
                  },
                  "isShared": {
                    "type": "boolean",
                    "description": "Whether every teammate sees the view. Only the view's creator can change it.",
                    "example": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated view",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Saved view ID (TypeID).",
                      "example": "conversation_view_01m8rzdgxqecrb410kagt8m9wy"
                    },
                    "name": {
                      "type": "string",
                      "description": "View name.",
                      "example": "Urgent billing"
                    },
                    "filters": {
                      "type": "object",
                      "properties": {
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "description": "Rule type: `status`, `priority`, `assignee`, `team`, `tag`, `source`, `waiting`, `unread`, `archived`, `kind`, `ticket_type`, `ticket_status_category`, `ticket_stage` or `attribute`.",
                                "example": "status"
                              },
                              "key": {
                                "type": "string",
                                "description": "Conversation attribute key. Only on `attribute` rules.",
                                "example": "plan_tier"
                              },
                              "operator": {
                                "type": "string",
                                "description": "Comparison operator, such as `eq` or `includes_any`. Only on `attribute` rules.",
                                "example": "eq"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                ],
                                "description": "Value the rule matches. Tag, team and teammate IDs are TypeIDs. Absent on `attribute` rules with `is_set` or `is_empty`.",
                                "example": "open"
                              }
                            },
                            "required": [
                              "field"
                            ],
                            "description": "One saved filter rule."
                          },
                          "description": "Saved filter rules. A view saved in an older format that doesn't fit the rule schema reads with no rules."
                        }
                      },
                      "required": [
                        "rules"
                      ],
                      "description": "Saved filter set."
                    },
                    "sort": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "recent",
                        "oldest",
                        "created",
                        "waiting",
                        "priority",
                        null
                      ],
                      "description": "Saved sort order. `recent`: latest activity first; `oldest`: earliest activity first; `created`: newest first; `waiting`: longest-waiting customer first; `priority`: highest priority first. Null when the view saves no sort.",
                      "example": "priority"
                    },
                    "isShared": {
                      "type": "boolean",
                      "description": "Whether every teammate sees the view. False for a view private to its creator.",
                      "example": true
                    },
                    "isPinned": {
                      "type": "boolean",
                      "description": "Whether the caller pinned the view. Pins are personal to each teammate.",
                      "example": false
                    },
                    "createdByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID (TypeID) of the teammate who created the view. Null when unknown.",
                      "example": "principal_01m8rzdgxqecrb4117p85yxmdw"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "filters",
                    "sort",
                    "isShared",
                    "isPinned",
                    "createdByPrincipalId"
                  ],
                  "description": "A saved inbox view."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The view doesn't exist, was deleted or is another teammate's private view, or a tag, team or teammate that a rule names doesn't exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsConversationView",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Delete a saved inbox view",
        "description": "Deletes (soft-deletes) a saved view the caller can see, and removes every teammate's pin of it. Any teammate with the permission can delete a shared view; a private view only by its creator. Requires the `delete` permission. Records a `conversation_view.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Saved view ID. Accepts the TypeID or its UUID. Deleted views, and other teammates' private views, are not found.",
              "example": "conversation_view_01m8rzdgxqecrb410kagt8m9wy"
            },
            "required": true,
            "description": "Saved view ID. Accepts the TypeID or its UUID. Deleted views, and other teammates' private views, are not found.",
            "name": "viewId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted view's ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted view (TypeID).",
                      "example": "conversation_view_01m8rzdgxqecrb410kagt8m9wy"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The view doesn't exist, was deleted or is another teammate's private view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-views/{viewId}/pin": {
      "put": {
        "operationId": "pinQuillsConversationView",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Pin a saved view",
        "description": "Pins a saved view for the caller, so it lists first. Pins are personal: other teammates' lists don't change. Idempotent. Requires the `update` permission. Records no event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Saved view ID. Accepts the TypeID or its UUID. Deleted views, and other teammates' private views, are not found.",
              "example": "conversation_view_01m8rzdgxqecrb410kagt8m9wy"
            },
            "required": true,
            "description": "Saved view ID. Accepts the TypeID or its UUID. Deleted views, and other teammates' private views, are not found.",
            "name": "viewId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The view with the caller's pin state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Saved view ID (TypeID).",
                      "example": "conversation_view_01m8rzdgxqecrb410kagt8m9wy"
                    },
                    "name": {
                      "type": "string",
                      "description": "View name.",
                      "example": "Urgent billing"
                    },
                    "filters": {
                      "type": "object",
                      "properties": {
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "description": "Rule type: `status`, `priority`, `assignee`, `team`, `tag`, `source`, `waiting`, `unread`, `archived`, `kind`, `ticket_type`, `ticket_status_category`, `ticket_stage` or `attribute`.",
                                "example": "status"
                              },
                              "key": {
                                "type": "string",
                                "description": "Conversation attribute key. Only on `attribute` rules.",
                                "example": "plan_tier"
                              },
                              "operator": {
                                "type": "string",
                                "description": "Comparison operator, such as `eq` or `includes_any`. Only on `attribute` rules.",
                                "example": "eq"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                ],
                                "description": "Value the rule matches. Tag, team and teammate IDs are TypeIDs. Absent on `attribute` rules with `is_set` or `is_empty`.",
                                "example": "open"
                              }
                            },
                            "required": [
                              "field"
                            ],
                            "description": "One saved filter rule."
                          },
                          "description": "Saved filter rules. A view saved in an older format that doesn't fit the rule schema reads with no rules."
                        }
                      },
                      "required": [
                        "rules"
                      ],
                      "description": "Saved filter set."
                    },
                    "sort": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "recent",
                        "oldest",
                        "created",
                        "waiting",
                        "priority",
                        null
                      ],
                      "description": "Saved sort order. `recent`: latest activity first; `oldest`: earliest activity first; `created`: newest first; `waiting`: longest-waiting customer first; `priority`: highest priority first. Null when the view saves no sort.",
                      "example": "priority"
                    },
                    "isShared": {
                      "type": "boolean",
                      "description": "Whether every teammate sees the view. False for a view private to its creator.",
                      "example": true
                    },
                    "isPinned": {
                      "type": "boolean",
                      "description": "Whether the caller pinned the view. Pins are personal to each teammate.",
                      "example": false
                    },
                    "createdByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID (TypeID) of the teammate who created the view. Null when unknown.",
                      "example": "principal_01m8rzdgxqecrb4117p85yxmdw"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "filters",
                    "sort",
                    "isShared",
                    "isPinned",
                    "createdByPrincipalId"
                  ],
                  "description": "A saved inbox view."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The view doesn't exist, was deleted or is another teammate's private view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "unpinQuillsConversationView",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Unpin a saved view",
        "description": "Unpins a saved view for the caller. Pins are personal: other teammates' lists don't change. Idempotent. Requires the `update` permission. Records no event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Saved view ID. Accepts the TypeID or its UUID. Deleted views, and other teammates' private views, are not found.",
              "example": "conversation_view_01m8rzdgxqecrb410kagt8m9wy"
            },
            "required": true,
            "description": "Saved view ID. Accepts the TypeID or its UUID. Deleted views, and other teammates' private views, are not found.",
            "name": "viewId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The view with the caller's pin state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Saved view ID (TypeID).",
                      "example": "conversation_view_01m8rzdgxqecrb410kagt8m9wy"
                    },
                    "name": {
                      "type": "string",
                      "description": "View name.",
                      "example": "Urgent billing"
                    },
                    "filters": {
                      "type": "object",
                      "properties": {
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "description": "Rule type: `status`, `priority`, `assignee`, `team`, `tag`, `source`, `waiting`, `unread`, `archived`, `kind`, `ticket_type`, `ticket_status_category`, `ticket_stage` or `attribute`.",
                                "example": "status"
                              },
                              "key": {
                                "type": "string",
                                "description": "Conversation attribute key. Only on `attribute` rules.",
                                "example": "plan_tier"
                              },
                              "operator": {
                                "type": "string",
                                "description": "Comparison operator, such as `eq` or `includes_any`. Only on `attribute` rules.",
                                "example": "eq"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                ],
                                "description": "Value the rule matches. Tag, team and teammate IDs are TypeIDs. Absent on `attribute` rules with `is_set` or `is_empty`.",
                                "example": "open"
                              }
                            },
                            "required": [
                              "field"
                            ],
                            "description": "One saved filter rule."
                          },
                          "description": "Saved filter rules. A view saved in an older format that doesn't fit the rule schema reads with no rules."
                        }
                      },
                      "required": [
                        "rules"
                      ],
                      "description": "Saved filter set."
                    },
                    "sort": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "recent",
                        "oldest",
                        "created",
                        "waiting",
                        "priority",
                        null
                      ],
                      "description": "Saved sort order. `recent`: latest activity first; `oldest`: earliest activity first; `created`: newest first; `waiting`: longest-waiting customer first; `priority`: highest priority first. Null when the view saves no sort.",
                      "example": "priority"
                    },
                    "isShared": {
                      "type": "boolean",
                      "description": "Whether every teammate sees the view. False for a view private to its creator.",
                      "example": true
                    },
                    "isPinned": {
                      "type": "boolean",
                      "description": "Whether the caller pinned the view. Pins are personal to each teammate.",
                      "example": false
                    },
                    "createdByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID (TypeID) of the teammate who created the view. Null when unknown.",
                      "example": "principal_01m8rzdgxqecrb4117p85yxmdw"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "filters",
                    "sort",
                    "isShared",
                    "isPinned",
                    "createdByPrincipalId"
                  ],
                  "description": "A saved inbox view."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The view doesn't exist, was deleted or is another teammate's private view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/inbox": {
      "get": {
        "operationId": "listQuillsInboxItems",
        "tags": [
          "Inbox and views"
        ],
        "summary": "List the inbox: conversations and tickets",
        "description": "Lists conversations and tickets in one page, merged in the requested sort (by default newest activity first: a conversation's last message, a ticket's last change). `facet` maps to a conversation status (`waiting` = `snoozed`) and a ticket status category (`waiting` = `pending`). A customer ticket with a linked conversation lists once, as that conversation. Test customers' conversations and tickets are left out, and conversations follow `view` (by default no spam-ended or archived ones). A conversation-only filter (`visitorPrincipalId`, `tagId`, `channel`, `source`, `waitingOnly`, `unreadOnly`, or a `view` other than `all`) lists conversations only. `updatedSince` filters conversations only; tickets aren't filtered by it. For tickets, `search` matches the title or the ticket number (`123` or `#123`). Each page holds up to `limit` items; pass `nextCursor` as `cursor` for the next page with the same filters and sort (an unreadable cursor returns 400). Requires the `read` permission; a caller without the `update` permission who belongs to teams sees only items assigned to those teams.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "low",
                "medium",
                "high",
                "urgent"
              ],
              "description": "Only items with this priority. For conversations, `none` means no priority set. Omit for every priority.",
              "example": "urgent"
            },
            "required": false,
            "description": "Only items with this priority. For conversations, `none` means no priority set. Omit for every priority.",
            "name": "priority",
            "in": "query"
          },
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "mine",
                    "unassigned"
                  ]
                },
                {
                  "type": "string",
                  "description": "TypeID with the `principal` prefix. Requests also accept the bare UUID.",
                  "example": "principal_01h455vb4pex5vsknk084sn02q"
                }
              ],
              "description": "Only items with this assigned teammate: `mine` for the caller, `unassigned` for items with no assigned teammate, or a teammate's principal ID (TypeID or UUID). Omit for any assignee.",
              "example": "mine"
            },
            "required": false,
            "description": "Only items with this assigned teammate: `mine` for the caller, `unassigned` for items with no assigned teammate, or a teammate's principal ID (TypeID or UUID). Omit for any assignee.",
            "name": "assignee",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only items assigned to this team. Accepts the TypeID or its UUID.",
              "example": "team_01m8rxv9wze05sk3nqtd18s18g"
            },
            "required": false,
            "description": "Only items assigned to this team. Accepts the TypeID or its UUID.",
            "name": "teamId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only conversations with this visitor (customer). Accepts the principal TypeID or its UUID.",
              "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
            },
            "required": false,
            "description": "Only conversations with this visitor (customer). Accepts the principal TypeID or its UUID.",
            "name": "visitorPrincipalId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only conversations that carry this tag. Accepts the TypeID or its UUID.",
              "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
            },
            "required": false,
            "description": "Only conversations that carry this tag. Accepts the TypeID or its UUID.",
            "name": "tagId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "messenger",
                "email",
                "github"
              ],
              "description": "Only conversations currently on this channel: `messenger` (in-app chat), `email` or `github`.",
              "example": "email"
            },
            "required": false,
            "description": "Only conversations currently on this channel: `messenger` (in-app chat), `email` or `github`.",
            "name": "channel",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32,
              "description": "Only conversations that arrived from this source, such as `widget`, `portal`, `email`, `github` or `ticket_form`. Exact match, up to 32 characters.",
              "example": "widget"
            },
            "required": false,
            "description": "Only conversations that arrived from this source, such as `widget`, `portal`, `email`, `github` or `ticket_form`. Exact match, up to 32 characters.",
            "name": "source",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "`true` lists only conversations where the customer is waiting for a reply (`waitingSince` is set). Defaults to `false`.",
              "example": "true"
            },
            "required": false,
            "description": "`true` lists only conversations where the customer is waiting for a reply (`waitingSince` is set). Defaults to `false`.",
            "name": "waitingOnly",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 64,
              "format": "date-time",
              "description": "Only conversations whose `updatedAt` is at or after this time, for an integration that syncs changes. ISO 8601 with a UTC offset. Conversations with no recorded change (`updatedAt` null) are left out.",
              "example": "2026-03-14T00:00:00Z"
            },
            "required": false,
            "description": "Only conversations whose `updatedAt` is at or after this time, for an integration that syncs changes. ISO 8601 with a UTC offset. Conversations with no recorded change (`updatedAt` null) are left out.",
            "name": "updatedSince",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "`true` lists only conversations with a customer message (not deleted) after the team's read mark. Defaults to `false`.",
              "example": "true"
            },
            "required": false,
            "description": "`true` lists only conversations with a customer message (not deleted) after the team's read mark. Defaults to `false`.",
            "name": "unreadOnly",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "mentions",
                "spam",
                "created_by_me",
                "archived"
              ],
              "default": "all",
              "description": "Saved slice of the inbox. `all`: every conversation that isn't archived or ended as spam. `mentions`: conversations where an internal note (not deleted) mentions the caller. `spam`: closed conversations ended as spam. `created_by_me`: conversations whose first sent, undeleted message is a teammate message from the caller. `archived`: archived conversations only, spam included. Every view except `spam` and `archived` leaves out spam-ended conversations, and every view except `archived` leaves out archived ones. Defaults to `all`.",
              "example": "all"
            },
            "required": false,
            "description": "Saved slice of the inbox. `all`: every conversation that isn't archived or ended as spam. `mentions`: conversations where an internal note (not deleted) mentions the caller. `spam`: closed conversations ended as spam. `created_by_me`: conversations whose first sent, undeleted message is a teammate message from the caller. `archived`: archived conversations only, spam included. Every view except `spam` and `archived` leaves out spam-ended conversations, and every view except `archived` leaves out archived ones. Defaults to `all`.",
            "name": "view",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Case-insensitive text to look for. A conversation matches when its subject, the visitor's name or the text of one of its sent, undeleted messages (internal notes included) contains it. Up to 200 characters.",
              "example": "password reset"
            },
            "required": false,
            "description": "Case-insensitive text to look for. A conversation matches when its subject, the visitor's name or the text of one of its sent, undeleted messages (internal notes included) contains it. Up to 200 characters.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25,
              "description": "Maximum number of items to return, 1 to 100. Defaults to 25.",
              "example": 25
            },
            "required": false,
            "description": "Maximum number of items to return, 1 to 100. Defaults to 25.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "waiting",
                "closed",
                "all"
              ],
              "default": "open",
              "description": "Inbox tab. `open`: open conversations and tickets in an `open` status category; `waiting`: snoozed conversations and tickets in a `pending` category; `closed`: closed conversations and tickets in a `closed` category; `all`: every status. Defaults to `open`.",
              "example": "open"
            },
            "required": false,
            "description": "Inbox tab. `open`: open conversations and tickets in an `open` status category; `waiting`: snoozed conversations and tickets in a `pending` category; `closed`: closed conversations and tickets in a `closed` category; `all`: every status. Defaults to `open`.",
            "name": "facet",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "conversation",
                "ticket"
              ],
              "description": "Only one kind of item. `conversation`: conversations only; `ticket`: tickets only. Omit for both.",
              "example": "ticket"
            },
            "required": false,
            "description": "Only one kind of item. `conversation`: conversations only; `ticket`: tickets only. Omit for both.",
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "oldest",
                "created",
                "priority"
              ],
              "default": "recent",
              "description": "Sort order across both kinds. `recent`: latest activity first (a conversation's last message or creation, a ticket's last change); `oldest`: earliest activity first; `created`: newest first; `priority`: `urgent` to lowest, then latest activity. On a tie the conversation comes first. Defaults to `recent`.",
              "example": "recent"
            },
            "required": false,
            "description": "Sort order across both kinds. `recent`: latest activity first (a conversation's last message or creation, a ticket's last change); `oldest`: earliest activity first; `created`: newest first; `priority`: `urgent` to lowest, then latest activity. On a tie the conversation comes first. Defaults to `recent`.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300,
              "description": "Opaque `nextCursor` from the previous page, up to 300 characters. Omit for the first page.",
              "example": "eyJjIjoiY29udmVyc2F0aW9uXzAxbThyeHY5d3plMDVzazNtYzJ4NXNzN2Q4IiwidCI6bnVsbH0"
            },
            "required": false,
            "description": "Opaque `nextCursor` from the previous page, up to 300 characters. Omit for the first page.",
            "name": "cursor",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of inbox items",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "conversation",
                              "ticket"
                            ],
                            "description": "Item kind. `conversation`: `conversation` is set; `ticket`: `ticket` is set.",
                            "example": "conversation"
                          },
                          "conversation": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Conversation ID.",
                                "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "open",
                                  "snoozed",
                                  "closed"
                                ],
                                "description": "Conversation status. `open`: active and waiting on the team or the customer. `snoozed`: set aside until `snoozedUntil`, or until the customer replies when `snoozedUntil` is null. `closed`: ended; `endReason` says why when it was ended with a reason.",
                                "example": "open"
                              },
                              "priority": {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "low",
                                  "medium",
                                  "high",
                                  "urgent"
                                ],
                                "description": "Triage priority set by a teammate. `none`: not set (the default). `low`, `medium`, `high`, `urgent`: lowest to highest.",
                                "example": "high"
                              },
                              "channel": {
                                "type": "string",
                                "description": "Channel the conversation is conducted on now: `messenger` (in-app chat from the widget, the portal or a ticket form), `email` or `github`. It can change, for example a widget thread answered by email becomes `email`. `source` keeps where it arrived.",
                                "example": "messenger"
                              },
                              "source": {
                                "type": "string",
                                "description": "Where the conversation arrived from. It never changes. Values in use include `widget`, `portal`, `email`, `github` and `ticket_form`.",
                                "example": "widget"
                              },
                              "subject": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Plain-text subject, usually the email subject or the start of the first message. Null when there's none.",
                                "example": "Can't sign in after resetting my password"
                              },
                              "lastMessagePreview": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Plain-text preview of the latest customer-visible message, at most 140 characters; longer text is usually cut with an ellipsis. Internal notes never appear here. Null when there's none.",
                                "example": "I tried the reset link twice, but it still says my session expired."
                              },
                              "lastMessageAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Time of the latest customer-visible message, in ISO 8601 UTC. Internal notes and system notices don't change it. The `recent`, `oldest` and `priority` list sorts use it.",
                                "example": "2026-03-14T09:26:53.000Z"
                              },
                              "createdAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Time the conversation was created, in ISO 8601 UTC.",
                                "example": "2026-03-14T08:02:11.000Z"
                              },
                              "updatedAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "Time the conversation last changed (a message, a state change or an edit), in ISO 8601 UTC. Null when nothing has changed since it was created.",
                                "example": "2026-03-14T09:26:53.000Z"
                              },
                              "visitorPrincipalId": {
                                "type": "string",
                                "description": "Principal ID of the visitor: the customer the conversation is with (its requester).",
                                "example": "principal_01m8rxv9wze05sk3mrfwrkfn67"
                              },
                              "visitorName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Visitor's name: their account name, else their profile display name. Null when neither is set.",
                                "example": "Dana Whitfield"
                              },
                              "visitorAvatarUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "URL of the visitor's profile picture. Null when there's none.",
                                "example": "https://example.com/avatars/dana.png"
                              },
                              "visitorEmail": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Best known email address of the visitor: the address stored on the conversation, else the visitor's contact email, else their account email. Placeholder addresses of anonymous visitors are never shown. Null when no real address is known.",
                                "example": "dana@example.com"
                              },
                              "isTest": {
                                "type": "boolean",
                                "description": "True when the visitor is a teammate's test customer. Lists and counts leave test conversations out.",
                                "example": false
                              },
                              "assignedAgentPrincipalId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Principal ID of the teammate assigned to the conversation. Null when no teammate is assigned. Independent of `assignedTeamId`.",
                                "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                              },
                              "assignedTeamId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the team the conversation is assigned to. Null when no team is assigned. Independent of `assignedAgentPrincipalId`.",
                                "example": "team_01m8rxv9wze05sk3nqtd18s18g"
                              },
                              "unreadCount": {
                                "type": "number",
                                "description": "Number of customer messages (not deleted) sent after the team's read mark `agentLastReadAt`, or all of them when the team has never read the conversation.",
                                "example": 2
                              },
                              "waitingSince": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "Time the customer started waiting for a teammate's reply, in ISO 8601 UTC. A customer message sets it when it isn't set yet, and so does the AI assistant handing the conversation to the team. A teammate reply clears it. Null when nobody is waiting.",
                                "example": "2026-03-14T09:20:40.000Z"
                              },
                              "snoozedUntil": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "Wake time of a snoozed conversation, in ISO 8601 UTC. Null when it isn't snoozed or is snoozed until the customer replies.",
                                "example": "2026-03-16T08:00:00.000Z"
                              },
                              "resolvedAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "Time the conversation was closed, in ISO 8601 UTC. Null while it's open or snoozed; reopening clears it.",
                                "example": "2026-03-14T10:05:00.000Z"
                              },
                              "archivedAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "Time a teammate archived the conversation, in ISO 8601 UTC. While set, the conversation lists only in `view=archived`, whatever its status. A new customer message clears it. Null when not archived.",
                                "example": null
                              },
                              "endReason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Why the conversation was ended: `resolved`, `tracked_as_feedback`, `duplicate`, `no_response`, `spam` or `other`, or `merged` when it was merged into another conversation. Null when it wasn't ended with a reason; reopening clears it.",
                                "example": "resolved"
                              },
                              "endNote": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Teammate's free-text note on why the conversation ended. Null when none was given; reopening clears it.",
                                "example": "Customer confirmed the new password works."
                              },
                              "spamReason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "What filed the conversation as spam, such as `manual` (a teammate) or `heuristic` (the automatic content check on arrival). Null unless it was ended as spam; reopening or restoring clears it.",
                                "example": null
                              },
                              "csatRating": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "Customer satisfaction rating the visitor gave, from 1 (worst) to 5 (best). Null when not rated.",
                                "example": 5
                              },
                              "forwardParseFailed": {
                                "type": "boolean",
                                "description": "True when a teammate-forwarded email couldn't be parsed cleanly (for example the original sender's address was stripped), so the requester should be checked. Setting the requester clears it.",
                                "example": false
                              },
                              "agentLastReadAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "Team read mark, in ISO 8601 UTC: set when a teammate marks the conversation read or replies, moved back when one marks it unread. Shared by the whole team. Null when never read.",
                                "example": "2026-03-14T09:25:00.000Z"
                              },
                              "visitorLastReadAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "Time the visitor last read the conversation, in ISO 8601 UTC. Null when never read.",
                                "example": "2026-03-14T09:24:12.000Z"
                              },
                              "tags": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "description": "Conversation tag ID.",
                                      "example": "conversation_tag_01m8rxv9wze05sk3nrfb1dvz76"
                                    },
                                    "name": {
                                      "type": "string",
                                      "description": "Tag name.",
                                      "example": "Billing"
                                    },
                                    "color": {
                                      "type": "string",
                                      "description": "Tag color as a hex code.",
                                      "example": "#6b7280"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "name",
                                    "color"
                                  ]
                                },
                                "description": "Tags on the conversation, sorted by name. Archived tags are left out."
                              }
                            },
                            "required": [
                              "id",
                              "status",
                              "priority",
                              "channel",
                              "source",
                              "subject",
                              "lastMessagePreview",
                              "lastMessageAt",
                              "createdAt",
                              "updatedAt",
                              "visitorPrincipalId",
                              "visitorName",
                              "visitorAvatarUrl",
                              "visitorEmail",
                              "isTest",
                              "assignedAgentPrincipalId",
                              "assignedTeamId",
                              "unreadCount",
                              "waitingSince",
                              "snoozedUntil",
                              "resolvedAt",
                              "archivedAt",
                              "endReason",
                              "endNote",
                              "spamReason",
                              "csatRating",
                              "forwardParseFailed",
                              "agentLastReadAt",
                              "visitorLastReadAt",
                              "tags"
                            ],
                            "description": "The conversation, when `kind` is `conversation`. Absent for a ticket."
                          },
                          "ticket": {
                            "$ref": "#/components/schemas/QuillsTicket"
                          }
                        },
                        "required": [
                          "kind"
                        ],
                        "description": "One inbox item: a conversation (with `conversation` set) or a ticket (with `ticket` set)."
                      },
                      "description": "Inbox items in the requested sort."
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque cursor for the next page, to pass as `cursor`. Null on the last page.",
                      "example": "eyJjIjoiY29udmVyc2F0aW9uXzAxbThyeHY5d3plMDVzazNtYzJ4NXNzN2Q4IiwidCI6bnVsbH0"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether more items follow this page.",
                      "example": true
                    }
                  },
                  "required": [
                    "items",
                    "nextCursor",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation or ticket that the cursor continues from no longer exists or isn't visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/inbox/counts": {
      "get": {
        "operationId": "fetchQuillsInboxCounts",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Count the open inbox queues",
        "description": "Counts the open inbox queues: open conversations assigned to the caller and unassigned ones; open tickets by type, where the customer count includes open conversations paired with a customer ticket (a pair counts once, as in the list); and test conversations in any status. Test customers' threads, spam-ended and archived conversations aren't counted in the queues. Requires the `read` permission; for a caller without the `update` permission who belongs to teams, only items assigned to those teams count.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The open queue counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "mine": {
                      "type": "number",
                      "description": "Number of open conversations assigned to the caller, excluding spam-ended, archived and test conversations.",
                      "example": 7
                    },
                    "unassigned": {
                      "type": "number",
                      "description": "Number of open conversations with no assigned teammate, excluding spam-ended, archived and test conversations.",
                      "example": 3
                    },
                    "ticketsByType": {
                      "type": "object",
                      "properties": {
                        "customer": {
                          "type": "number",
                          "description": "Number of open customer tickets without a linked conversation, plus open conversations paired with a customer ticket (each pair counts once).",
                          "example": 12
                        },
                        "back_office": {
                          "type": "number",
                          "description": "Number of open back-office tickets.",
                          "example": 4
                        },
                        "tracker": {
                          "type": "number",
                          "description": "Number of open tracker tickets.",
                          "example": 1
                        }
                      },
                      "required": [
                        "customer",
                        "back_office",
                        "tracker"
                      ],
                      "description": "Open tickets (status category `open`) by category, excluding test customers' tickets."
                    },
                    "test": {
                      "type": "number",
                      "description": "Number of test conversations (started by a teammate's test customer) in any status.",
                      "example": 2
                    }
                  },
                  "required": [
                    "mine",
                    "unassigned",
                    "ticketsByType",
                    "test"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/inbox/segments": {
      "get": {
        "operationId": "fetchQuillsInboxSegmentsWithCounts",
        "tags": [
          "Inbox and views"
        ],
        "summary": "List segments with their open conversation counts",
        "description": "Lists the workspace's live customer segments by name, at most 500 with no pagination, each with the number of open conversations whose customer is a member. Test, spam-ended and archived conversations aren't counted. Requires the `read` permission; for a caller without the `update` permission who belongs to teams, only conversations assigned to those teams count.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The segments with their open conversation counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Segment ID (TypeID).",
                            "example": "segment_01m8rzdgxqecrb4122hfmgm2he"
                          },
                          "name": {
                            "type": "string",
                            "description": "Segment name.",
                            "example": "Enterprise customers"
                          },
                          "color": {
                            "type": "string",
                            "description": "Badge color as a six-digit hex code in `#RRGGBB` form.",
                            "example": "#6366f1"
                          },
                          "count": {
                            "type": "number",
                            "description": "Number of open conversations whose customer is in the segment. Zero when there are none.",
                            "example": 5
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "count"
                        ]
                      },
                      "description": "Live segments, ordered by name."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/posts": {
      "post": {
        "operationId": "createQuillsPostFromConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "Track a conversation as feedback",
        "description": "Tracks the conversation as feedback on behalf of its visitor, in one of two ways. With `boardId` and `title`, creates a post by the visitor on that board, with the workspace's default post status (none when there's no default), the visitor's vote (a vote count of 1), the visitor subscribed as the author and the caller recorded as the teammate who tracked it. With `asUpvoteOfPostId`, adds the visitor's vote to that post instead, or to the post it was merged into. A visitor who already voted on it, or on a post merged with it, gets no second vote, and a vote doesn't subscribe the visitor. In that mode `sourceMessageContent`, when given, becomes a private team comment on the post. `asUpvoteOfPostId` wins when both are sent; with neither, the request fails with 400.\n\nEither way, the post is linked to the conversation (once) and shared into the thread as a reply from the caller with an embedded post card. Like any reply, that reopens a closed conversation, assigns an unassigned one to the caller and marks it read for the team. The board or post must be live and on a board the caller can see: a board linked to projects the caller can't open is hidden. A test customer's conversation answers 409. Requires the `create` and `update` permissions. Records one event: `post.created` for a new post, else `post.voted` when a vote was added, else `message.created` for the shared reply.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardId": {
                    "type": "string",
                    "description": "ID of the board for a new post. Required with `title` unless `asUpvoteOfPostId` is set. Must be a live board the caller can see. Accepts the TypeID or its UUID.",
                    "example": "board_01m8rzgvbjeh787gfvfc56btt0"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Title of the new post. 1 to 200 characters after trimming. Required with `boardId` unless `asUpvoteOfPostId` is set.",
                    "example": "Export conversations to CSV"
                  },
                  "content": {
                    "type": "string",
                    "maxLength": 10000,
                    "default": "",
                    "description": "Body of the new post, as plain text. Up to 10,000 characters after trimming. Defaults to empty. Ignored with `asUpvoteOfPostId`.",
                    "example": "Dana needs a monthly CSV export of all conversations for her compliance review."
                  },
                  "asUpvoteOfPostId": {
                    "type": "string",
                    "description": "ID of an existing post to add the visitor's vote to, instead of creating a post. Must be a live post on a board the caller can see. A merged post's vote goes to the post it was merged into. Accepts the TypeID or its UUID.",
                    "example": "post_01m8rzgvbkeh787gg7n4dxh1eg"
                  },
                  "sourceMessageContent": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "Customer message text to keep on the post as a private team comment, after the line \"Tracked from a support conversation:\". Up to 10,000 characters after trimming. Used only with `asUpvoteOfPostId`; ignored when a new post is created. Omit for no comment.",
                    "example": "Is there any way to download all our chats as a spreadsheet?"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The tracked post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "ID of the tracked post: the new post, or the post that took the vote (the merge target when the given post was merged).",
                      "example": "post_01m8rzgvbkeh787gg7n4dxh1eg"
                    },
                    "created": {
                      "type": "boolean",
                      "description": "Whether a new post was created. False when `asUpvoteOfPostId` was used.",
                      "example": true
                    },
                    "voted": {
                      "type": "boolean",
                      "description": "Whether this request added the visitor's vote to an existing post. False for a new post, whose author vote comes with it, and when the visitor had already voted.",
                      "example": false
                    },
                    "messageId": {
                      "type": "string",
                      "description": "ID of the reply that shares the post card in the conversation.",
                      "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
                    }
                  },
                  "required": [
                    "postId",
                    "created",
                    "voted",
                    "messageId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found, or the board or post is missing, deleted or on a board hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The conversation's visitor is a test customer, so it can't be tracked as feedback",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "getQuillsLinkedPostsForConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "List the posts tracked from a conversation",
        "description": "Lists the posts that the conversation is tracked as, oldest link first, up to 100. Unlinked and deleted posts, and posts on deleted boards or boards the caller can't see, are left out. Requires the `read` permission. A caller without the `update` permission who belongs to teams sees only conversations assigned to one of those teams; any other conversation answers 404.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "postId": {
                            "type": "string",
                            "description": "ID of the post.",
                            "example": "post_01m8rzgvbkeh787gg7n4dxh1eg"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title of the post.",
                            "example": "Export conversations to CSV"
                          },
                          "boardId": {
                            "type": "string",
                            "description": "ID of the post's board.",
                            "example": "board_01m8rzgvbjeh787gfvfc56btt0"
                          },
                          "boardSlug": {
                            "type": "string",
                            "description": "URL slug of the post's board.",
                            "example": "feature-requests"
                          }
                        },
                        "required": [
                          "postId",
                          "title",
                          "boardId",
                          "boardSlug"
                        ]
                      },
                      "description": "Tracked posts, oldest link first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not visible to the caller's teams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/share-post": {
      "post": {
        "operationId": "shareQuillsPost",
        "tags": [
          "Conversations"
        ],
        "summary": "Share a feedback post in a conversation",
        "description": "Posts a reply from the caller that embeds a card of the post, with an empty text body; the inbox preview shows the post's title. Like any reply, it reopens a closed conversation (a snoozed one stays snoozed), assigns an unassigned one to the caller and marks it read for the team. The post must be live and on a board the caller can see. It doesn't link the post to the conversation; `POST /conversations/{conversationId}/posts` does. Requires the `update` permission. Records a `message.created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postId": {
                    "type": "string",
                    "description": "ID of the post to share. Must be a live post on a board the caller can see. Accepts the TypeID or its UUID.",
                    "example": "post_01m8rzgvbkeh787gg7n4dxh1eg"
                  }
                },
                "required": [
                  "postId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reply",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messageId": {
                      "type": "string",
                      "description": "ID of the new reply that embeds the post.",
                      "example": "conversation_msg_01m8rxv9wze05sk3p3yaky889y"
                    },
                    "conversationId": {
                      "type": "string",
                      "description": "ID of the conversation.",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    }
                  },
                  "required": [
                    "messageId",
                    "conversationId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found, or the post is missing, deleted or on a board hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/posts/{postId}": {
      "delete": {
        "operationId": "unlinkQuillsPostFromConversation",
        "tags": [
          "Conversations"
        ],
        "summary": "Stop tracking a post from a conversation",
        "description": "Removes the link between the post and the conversation. Only the link goes: the post, the visitor's vote and the shared reply stay. Idempotent: when there's no link, nothing changes and `changed` is false. The post must be live and on a board the caller can see. Requires the `update` permission. Records a `conversation.post_unlinked` event when a link was removed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the post to unlink. Accepts the TypeID or its UUID.",
              "example": "post_01m8rzgvbkeh787gg7n4dxh1eg"
            },
            "required": true,
            "description": "ID of the post to unlink. Accepts the TypeID or its UUID.",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a link was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request removed a link. False when the post wasn't linked to the conversation.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found, or the post is missing, deleted or on a board hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/conversations": {
      "get": {
        "operationId": "getQuillsLinkedConversationsForPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the conversations a post was tracked from",
        "description": "Lists the conversations that the post is tracked from, oldest conversation first. At most 100 links are read. The post must be live and on a board the caller can see. Requires the `read` permission. A caller without the `update` permission who belongs to teams sees only conversations assigned to one of those teams; other conversations are left out.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID. Accepts the TypeID or its UUID.",
              "example": "post_01m8rzgvbkeh787gg7n4dxh1eg"
            },
            "required": true,
            "description": "Post ID. Accepts the TypeID or its UUID.",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Conversations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "conversationId": {
                            "type": "string",
                            "description": "ID of the conversation.",
                            "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                          },
                          "subject": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Plain-text subject of the conversation. Null when it has none.",
                            "example": "Can I export my chats?"
                          },
                          "status": {
                            "type": "string",
                            "description": "Conversation status: `open`, `snoozed` or `closed`.",
                            "example": "closed"
                          }
                        },
                        "required": [
                          "conversationId",
                          "subject",
                          "status"
                        ]
                      },
                      "description": "Conversations the post is tracked from, oldest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted or on a board hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/ticket": {
      "get": {
        "operationId": "getQuillsConversationTicketLink",
        "tags": [
          "Conversations"
        ],
        "summary": "Get the customer ticket of a conversation",
        "description": "Returns a summary of the customer ticket paired with the conversation (the ticket that shares its thread), or null when there is none or it was deleted. Tickets merely opened from the conversation aren't returned. Callers without the `update` permission who belong to teams only reach conversations assigned to those teams. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The paired customer ticket",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ticket": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Ticket ID (TypeID).",
                          "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
                        },
                        "number": {
                          "type": "number",
                          "description": "Sequential ticket number within the workspace.",
                          "example": 1042
                        },
                        "reference": {
                          "type": "string",
                          "description": "The number prefixed with `#`.",
                          "example": "#1042"
                        },
                        "title": {
                          "type": "string",
                          "description": "Ticket title.",
                          "example": "Refund for duplicate charge on invoice INV-2291"
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "Name of the ticket's current status.",
                              "example": "Waiting on engineering"
                            },
                            "category": {
                              "type": "string",
                              "enum": [
                                "open",
                                "pending",
                                "closed"
                              ],
                              "description": "Category of the status. `open`: waiting on the team; `pending`: waiting on someone else; `closed`: done.",
                              "example": "pending"
                            }
                          },
                          "required": [
                            "name",
                            "category"
                          ],
                          "description": "Current status of the ticket."
                        }
                      },
                      "required": [
                        "id",
                        "number",
                        "reference",
                        "title",
                        "status"
                      ],
                      "description": "The paired customer ticket. Null when the conversation has none or it was deleted."
                    }
                  },
                  "required": [
                    "ticket"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or hidden from the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/ip-block": {
      "get": {
        "operationId": "getQuillsConversationIpBlock",
        "tags": [
          "Conversations"
        ],
        "summary": "Get whether the conversation sender's IP address is blocked",
        "description": "Returns whether the conversation's sender address was recorded and, when it's blocked, until when. The address itself is never stored or returned, only a keyed hash, so the block matches the same address without revealing it. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The IP block of the conversation's sender",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean",
                      "description": "Whether the sender's address was recorded for this conversation. It's recorded, as a keyed hash, when the conversation is created from a request with a client address, and kept 90 days. Without it the sender can't be blocked.",
                      "example": true
                    },
                    "blockedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the block on the sender's address ends, in ISO 8601 UTC. Null when the address isn't blocked or wasn't recorded.",
                      "example": "2027-01-15T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "available",
                    "blockedUntil"
                  ],
                  "description": "The IP block state of a conversation's sender. The address itself is never returned."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "blockQuillsConversationIp",
        "tags": [
          "Conversations"
        ],
        "summary": "Block the conversation sender's IP address for 30 days",
        "description": "Blocks the address that the conversation's sender wrote from, for 30 days. Customer writes (posts, votes, comments, messages, sessions) from that address answer 403 until the block ends; reads still work. The block covers the whole workspace, not only this conversation. Blocking again starts a new 30 days. Useful for an anonymous visitor with no profile to block. The address itself is never stored or returned, only a keyed hash, so the block matches the same address without revealing it. Requires the `update` permission. Records a `conversation.ip_blocked` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The IP block of the conversation's sender",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean",
                      "description": "Whether the sender's address was recorded for this conversation. It's recorded, as a keyed hash, when the conversation is created from a request with a client address, and kept 90 days. Without it the sender can't be blocked.",
                      "example": true
                    },
                    "blockedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the block on the sender's address ends, in ISO 8601 UTC. Null when the address isn't blocked or wasn't recorded.",
                      "example": "2027-01-15T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "available",
                    "blockedUntil"
                  ],
                  "description": "The IP block state of a conversation's sender. The address itself is never returned."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No address was recorded for this conversation, or it was recorded more than 90 days ago",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "unblockQuillsConversationIp",
        "tags": [
          "Conversations"
        ],
        "summary": "Lift the IP block of the conversation's sender",
        "description": "Removes the block on the address that the conversation's sender wrote from, so customer writes from it work again everywhere in the workspace. Idempotent: succeeds when there is no block or no recorded address. Requires the `update` permission. Records a `conversation.ip_unblocked` event, also when there was no block.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The IP block of the conversation's sender",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "available": {
                      "type": "boolean",
                      "description": "Whether the sender's address was recorded for this conversation. It's recorded, as a keyed hash, when the conversation is created from a request with a client address, and kept 90 days. Without it the sender can't be blocked.",
                      "example": true
                    },
                    "blockedUntil": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the block on the sender's address ends, in ISO 8601 UTC. Null when the address isn't blocked or wasn't recorded.",
                      "example": "2027-01-15T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "available",
                    "blockedUntil"
                  ],
                  "description": "The IP block state of a conversation's sender. The address itself is never returned."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/spam-blocks": {
      "get": {
        "operationId": "listQuillsSpamBlocks",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "List active workspace spam blocks",
        "description": "Lists the workspace's spam blocks that have not expired, newest first, at most 500. A live block makes customer-facing write requests (portal, widget, signed-link and public routes) from a matching address or visitor answer 403, and drops inbound email whose sender's domain or visitor matches. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "ip_cidr",
                "email_domain",
                "visitor_principal"
              ],
              "description": "Only blocks of this kind. All kinds when omitted. What the block matches. `ip_cidr`: a client IPv4 or IPv6 address range in CIDR notation; `email_domain`: the domain of a sender's email address; `visitor_principal`: one visitor (a customer principal with no account).",
              "example": "email_domain"
            },
            "required": false,
            "description": "Only blocks of this kind. All kinds when omitted. What the block matches. `ip_cidr`: a client IPv4 or IPv6 address range in CIDR notation; `email_domain`: the domain of a sender's email address; `visitor_principal`: one visitor (a customer principal with no account).",
            "name": "kind",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Active spam blocks (CIDR ranges, email domains, visitors)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Spam block ID, a UUID.",
                            "example": "a12fa1a3-f7da-4e68-96c3-d0c8b87e52b0"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "ip_cidr",
                              "email_domain",
                              "visitor_principal"
                            ],
                            "description": "What the block matches. `ip_cidr`: a client IPv4 or IPv6 address range in CIDR notation; `email_domain`: the domain of a sender's email address; `visitor_principal`: one visitor (a customer principal with no account).",
                            "example": "ip_cidr"
                          },
                          "value": {
                            "type": "string",
                            "description": "Normalized value the block matches. `ip_cidr`: the network in CIDR notation with host bits cleared (a single address gets `/32` or `/128`); `email_domain`: the lowercase domain; `visitor_principal`: the visitor's principal TypeID.",
                            "example": "203.0.113.0/24"
                          },
                          "reason": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Teammate note on why the address, domain or visitor is blocked. Null when none was given.",
                            "example": "Repeated spam chats from this range"
                          },
                          "createdByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Principal ID of the teammate who created the block or last saved it. Null when that principal was deleted.",
                            "example": "principal_01m8rzbm5kfqfrqfhab8sk7x9b"
                          },
                          "expiresAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the block stops applying, in ISO 8601 UTC. Null when it never expires.",
                            "example": "2027-01-15T09:26:53.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the block was first created, in ISO 8601 UTC. Saving the same block again does not change it.",
                            "example": "2026-12-16T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "value",
                          "reason",
                          "createdByPrincipalId",
                          "expiresAt",
                          "createdAt"
                        ],
                        "description": "A workspace spam block."
                      },
                      "description": "Active spam blocks, newest first. Expired blocks are left out."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsSpamBlock",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Create or update a workspace spam block",
        "description": "Blocks an IPv4 or IPv6 address range (for example `203.0.113.0/24`), an email domain (for example `spammer.example`) or one visitor. The value is normalized first. Idempotent by kind and normalized value: saving an existing block replaces its reason and expiry and records the caller as its creator, and keeps its ID and creation time. A live block makes customer-facing write requests (portal, widget, signed-link and public routes) from a matching address or visitor answer 403, and drops inbound email whose sender's domain or visitor matches. Requires the `update` permission. Records a `spam_block.created` event, also when an existing block is saved again.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "ip_cidr",
                      "email_domain",
                      "visitor_principal"
                    ],
                    "description": "What the block matches. `ip_cidr`: a client IPv4 or IPv6 address range in CIDR notation; `email_domain`: the domain of a sender's email address; `visitor_principal`: one visitor (a customer principal with no account).",
                    "example": "ip_cidr"
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "What to block, up to 255 characters. `ip_cidr`: an IPv4 or IPv6 address, with an optional `/prefix` (a bare address blocks that address only); host bits are cleared. `email_domain`: a domain such as `spammer.example`; a leading `@` is dropped and it is lowercased. `visitor_principal`: the visitor's principal TypeID or UUID; a teammate's principal is refused.",
                    "example": "203.0.113.0/24"
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 500,
                    "description": "Teammate note on why the block exists, up to 500 characters. Null or omitted stores no note, also replacing the note of an existing block.",
                    "example": "Repeated spam chats from this range"
                  },
                  "expiresInDays": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 3650,
                    "description": "Number of days from now until the block expires, from 1 to 3650. Defaults to 30 when omitted. Null makes the block permanent.",
                    "example": 30
                  }
                },
                "required": [
                  "kind",
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created or updated spam block",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Spam block ID, a UUID.",
                      "example": "a12fa1a3-f7da-4e68-96c3-d0c8b87e52b0"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "ip_cidr",
                        "email_domain",
                        "visitor_principal"
                      ],
                      "description": "What the block matches. `ip_cidr`: a client IPv4 or IPv6 address range in CIDR notation; `email_domain`: the domain of a sender's email address; `visitor_principal`: one visitor (a customer principal with no account).",
                      "example": "ip_cidr"
                    },
                    "value": {
                      "type": "string",
                      "description": "Normalized value the block matches. `ip_cidr`: the network in CIDR notation with host bits cleared (a single address gets `/32` or `/128`); `email_domain`: the lowercase domain; `visitor_principal`: the visitor's principal TypeID.",
                      "example": "203.0.113.0/24"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Teammate note on why the address, domain or visitor is blocked. Null when none was given.",
                      "example": "Repeated spam chats from this range"
                    },
                    "createdByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who created the block or last saved it. Null when that principal was deleted.",
                      "example": "principal_01m8rzbm5kfqfrqfhab8sk7x9b"
                    },
                    "expiresAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Time the block stops applying, in ISO 8601 UTC. Null when it never expires.",
                      "example": "2027-01-15T09:26:53.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Time the block was first created, in ISO 8601 UTC. Saving the same block again does not change it.",
                      "example": "2026-12-16T09:26:53.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "value",
                    "reason",
                    "createdByPrincipalId",
                    "expiresAt",
                    "createdAt"
                  ],
                  "description": "A workspace spam block."
                }
              }
            }
          },
          "400": {
            "description": "The value is not a valid IP address or CIDR range, email domain, or principal ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No visitor principal with that ID, or the principal belongs to a teammate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/spam-blocks/{blockId}": {
      "delete": {
        "operationId": "deleteQuillsSpamBlock",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Remove a workspace spam block",
        "description": "Permanently deletes a spam block, active or expired, so it stops applying at once. Requires the `update` permission. Records a `spam_block.deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Spam block ID, a UUID.",
              "example": "a12fa1a3-f7da-4e68-96c3-d0c8b87e52b0"
            },
            "required": true,
            "description": "Spam block ID, a UUID.",
            "name": "blockId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The removed spam block",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`: the block was deleted.",
                      "example": true
                    },
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted spam block.",
                      "example": "a12fa1a3-f7da-4e68-96c3-d0c8b87e52b0"
                    }
                  },
                  "required": [
                    "deleted",
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No spam block with that ID in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/access-links": {
      "get": {
        "operationId": "listQuillsConversationAccessLinks",
        "tags": [
          "Conversations"
        ],
        "summary": "List signed magic links issued for a conversation",
        "description": "Lists the conversation's magic links, newest first, at most 50, including expired and revoked ones. Tokens are never returned after creation. Callers without the `update` permission who belong to one or more teams only see conversations assigned to those teams; any other conversation is not found. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Magic links for this conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Access link ID.",
                            "example": "request_link_01m8rzbm5kfqfrqfh7tx03yf1n"
                          },
                          "resourceType": {
                            "type": "string",
                            "enum": [
                              "conversation",
                              "ticket"
                            ],
                            "description": "Kind of record the link opens: `conversation` or `ticket`. These routes create and list `conversation` links only.",
                            "example": "conversation"
                          },
                          "resourceId": {
                            "type": "string",
                            "description": "ID of the conversation (or ticket) that the link opens.",
                            "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the link stops working, in ISO 8601 UTC.",
                            "example": "2027-01-15T09:26:53.000Z"
                          },
                          "revokedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the link was revoked, in ISO 8601 UTC. Null while it's not revoked.",
                            "example": null
                          },
                          "lastOpenedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "Time the requester last replied through the link, in ISO 8601 UTC. Null when they haven't. Reading the request through the link doesn't set it.",
                            "example": "2026-12-18T16:02:11.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time the link was created, in ISO 8601 UTC.",
                            "example": "2026-12-16T09:26:53.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "resourceType",
                          "resourceId",
                          "expiresAt",
                          "revokedAt",
                          "lastOpenedAt",
                          "createdAt"
                        ],
                        "description": "A signed magic link that lets a requester open one support request in the portal without signing in. The token itself is never listed."
                      },
                      "description": "The conversation's magic links, newest first, at most 50. Expired and revoked links are included."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found, or not assigned to one of the caller's teams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsConversationAccessLink",
        "tags": [
          "Conversations"
        ],
        "summary": "Mint a signed magic link for a conversation's requester",
        "description": "Creates a signed magic link with which the conversation's requester can read this one conversation in the portal and reply to it without signing in. The link works for `ttlDays` days and can be revoked at any time. The token and URL are returned only in this response: only a hash of the token is stored. Nothing sends the link for you; share the URL with the requester yourself. Requires the `update` permission. Records no event; revoking a link records `request_link.revoked`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ttlDays": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 90,
                    "default": 30,
                    "description": "Number of days the link stays valid, from 1 to 90. Defaults to 30.",
                    "example": 30
                  }
                },
                "default": {
                  "ttlDays": 30
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The newly minted magic link (token is returned once)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "link": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Access link ID.",
                          "example": "request_link_01m8rzbm5kfqfrqfh7tx03yf1n"
                        },
                        "resourceType": {
                          "type": "string",
                          "enum": [
                            "conversation",
                            "ticket"
                          ],
                          "description": "Kind of record the link opens: `conversation` or `ticket`. These routes create and list `conversation` links only.",
                          "example": "conversation"
                        },
                        "resourceId": {
                          "type": "string",
                          "description": "ID of the conversation (or ticket) that the link opens.",
                          "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the link stops working, in ISO 8601 UTC.",
                          "example": "2027-01-15T09:26:53.000Z"
                        },
                        "revokedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the link was revoked, in ISO 8601 UTC. Null while it's not revoked.",
                          "example": null
                        },
                        "lastOpenedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the requester last replied through the link, in ISO 8601 UTC. Null when they haven't. Reading the request through the link doesn't set it.",
                          "example": "2026-12-18T16:02:11.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the link was created, in ISO 8601 UTC.",
                          "example": "2026-12-16T09:26:53.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "resourceType",
                        "resourceId",
                        "expiresAt",
                        "revokedAt",
                        "lastOpenedAt",
                        "createdAt"
                      ],
                      "description": "The new access link."
                    },
                    "token": {
                      "type": "string",
                      "description": "Signed magic-link token. Returned only here; only its hash is stored. Treat it as opaque and secret.",
                      "example": "rl1.ZXhhbXBsZS1wYXlsb2Fk.ZXhhbXBsZS1zaWduYXR1cmU"
                    },
                    "url": {
                      "type": "string",
                      "description": "Portal URL that opens the request with the token, built from the instance's web app URL.",
                      "example": "https://app.example.com/portal/cfklow33tpuxgpxko9nxqllg/r/rl1.ZXhhbXBsZS1wYXlsb2Fk.ZXhhbXBsZS1zaWduYXR1cmU"
                    }
                  },
                  "required": [
                    "link",
                    "token",
                    "url"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/access-links/{linkId}/revoke": {
      "post": {
        "operationId": "revokeQuillsAccessLink",
        "tags": [
          "Conversations"
        ],
        "summary": "Revoke a single magic link immediately",
        "description": "Revokes one magic link so it stops working at once. Idempotent: revoking a link that's already revoked succeeds with `changed: false`. Requires the `update` permission. Records a `request_link.revoked` event on the conversation when the link changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Access link ID. Accepts the TypeID or its UUID.",
              "example": "request_link_01m8rzbm5kfqfrqfh7tx03yf1n"
            },
            "required": true,
            "description": "Access link ID. Accepts the TypeID or its UUID.",
            "name": "linkId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Revocation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the access link.",
                      "example": "request_link_01m8rzbm5kfqfrqfh7tx03yf1n"
                    },
                    "conversationId": {
                      "type": "string",
                      "description": "ID of the conversation that the link opens.",
                      "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                    },
                    "revoked": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`: the link is revoked.",
                      "example": true
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether this request revoked the link. False when it was already revoked.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "conversationId",
                    "revoked",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Access link not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/access-links/revoke-all": {
      "post": {
        "operationId": "revokeAllQuillsConversationAccessLinks",
        "tags": [
          "Conversations"
        ],
        "summary": "Revoke every active magic link for a conversation immediately",
        "description": "Revokes every magic link of the conversation that isn't revoked yet, so they stop working at once. Links that were already revoked keep their revocation time. Idempotent. Requires the `update` permission. Records a `request_link.revoked` event with the count when at least one link was revoked.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Number of links revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "conversationId": {
                      "type": "string",
                      "description": "ID of the conversation.",
                      "example": "conversation_01m8rzbm5kfqfrqfhr5vnf92pk"
                    },
                    "revokedCount": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Number of links this request revoked, including expired links that hadn't been revoked. Zero when there were none.",
                      "example": 2
                    }
                  },
                  "required": [
                    "conversationId",
                    "revokedCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/presence": {
      "put": {
        "operationId": "setQuillsConversationViewer",
        "tags": [
          "Conversations"
        ],
        "summary": "Report that the caller is viewing or replying to a conversation",
        "description": "Records that the caller is viewing or replying to the conversation, so other teammates are warned before two replies collide. The marker expires 25 seconds after the last report; report again before then to stay listed. A new report replaces the caller's previous state. Team-only: customers never see it. Requires the `read` permission. A caller without the `update` permission who belongs to teams can report only on conversations assigned to one of those teams; any other conversation answers 404. Records no event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "viewing",
                      "replying"
                    ],
                    "description": "What the teammate is doing on the thread. `viewing`: has it open. `replying`: is writing a reply.",
                    "example": "replying"
                  }
                },
                "required": [
                  "state"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presence marker recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`.",
                      "example": true
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not visible to the caller's teams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "listQuillsConversationViewers",
        "tags": [
          "Conversations"
        ],
        "summary": "List other teammates currently viewing or replying to a conversation",
        "description": "Lists the other teammates viewing or replying to the conversation right now: those whose marker hasn't expired (25 seconds after their last report). The caller and people who are no longer workspace members are left out. Teammates replying come first, then by display name. Requires the `read` permission. A caller without the `update` permission who belongs to teams can read only conversations assigned to one of those teams; any other conversation answers 404.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Active teammates on this conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "viewers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the teammate.",
                            "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                          },
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Teammate's display name. Null when not set.",
                            "example": "Priya Natarajan"
                          },
                          "avatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the teammate's profile picture. Null when there's none.",
                            "example": "https://example.com/avatars/priya.png"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "viewing",
                              "replying"
                            ],
                            "description": "What the teammate is doing on the thread. `viewing`: has it open. `replying`: is writing a reply.",
                            "example": "replying"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time of the teammate's last report, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:41.000Z"
                          }
                        },
                        "required": [
                          "principalId",
                          "displayName",
                          "avatarUrl",
                          "state",
                          "updatedAt"
                        ],
                        "description": "A teammate with a live presence marker on the thread."
                      },
                      "description": "Other teammates with a live marker on the thread, those replying first, then by display name. Never includes the caller. Empty when nobody else is there."
                    }
                  },
                  "required": [
                    "viewers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found or not visible to the caller's teams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/presence": {
      "put": {
        "operationId": "setQuillsTicketViewer",
        "tags": [
          "Tickets"
        ],
        "summary": "Report that the caller is viewing or replying to a ticket",
        "description": "Records that the caller is viewing or replying to the ticket, so other teammates are warned before two replies collide. The marker expires 25 seconds after the last report; report again before then to stay listed. A new report replaces the caller's previous state. Team-only: customers never see it. Requires the `read` permission. A caller without the `update` permission who belongs to teams can report only on tickets assigned to one of those teams; any other ticket answers 404. Records no event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "viewing",
                      "replying"
                    ],
                    "description": "What the teammate is doing on the thread. `viewing`: has it open. `replying`: is writing a reply.",
                    "example": "replying"
                  }
                },
                "required": [
                  "state"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Presence marker recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`.",
                      "example": true
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found, deleted or not visible to the caller's teams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "listQuillsTicketViewers",
        "tags": [
          "Tickets"
        ],
        "summary": "List other teammates currently viewing or replying to a ticket",
        "description": "Lists the other teammates viewing or replying to the ticket right now: those whose marker hasn't expired (25 seconds after their last report). The caller and people who are no longer workspace members are left out. Teammates replying come first, then by display name. Requires the `read` permission. A caller without the `update` permission who belongs to teams can read only tickets assigned to one of those teams; any other ticket answers 404.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
              "example": "ticket_01m8rxs1h9fk3s7qpjpm85d8v4"
            },
            "required": true,
            "description": "Ticket ID. Accepts the TypeID or its UUID. Deleted tickets are not found.",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Active teammates on this ticket",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "viewers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Principal ID of the teammate.",
                            "example": "principal_01m8rxv9wze05sk3n53hn2z16n"
                          },
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Teammate's display name. Null when not set.",
                            "example": "Priya Natarajan"
                          },
                          "avatarUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "URL of the teammate's profile picture. Null when there's none.",
                            "example": "https://example.com/avatars/priya.png"
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "viewing",
                              "replying"
                            ],
                            "description": "What the teammate is doing on the thread. `viewing`: has it open. `replying`: is writing a reply.",
                            "example": "replying"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "Time of the teammate's last report, in ISO 8601 UTC.",
                            "example": "2026-03-14T09:26:41.000Z"
                          }
                        },
                        "required": [
                          "principalId",
                          "displayName",
                          "avatarUrl",
                          "state",
                          "updatedAt"
                        ],
                        "description": "A teammate with a live presence marker on the thread."
                      },
                      "description": "Other teammates with a live marker on the thread, those replying first, then by display name. Never includes the caller. Empty when nobody else is there."
                    }
                  },
                  "required": [
                    "viewers"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Ticket not found, deleted or not visible to the caller's teams",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/inbox/assistant-counts": {
      "get": {
        "operationId": "fetchQuillsAssistantInboxCounts",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Count the conversations in each assistant inbox bucket",
        "description": "Counts the conversations in each assistant inbox bucket, by the status of the customer agent's involvements: resolved, escalated to a teammate, or still handled by the agent. A conversation counts once per bucket, and can count in more than one bucket when it has several involvements. As in the inbox list, test customers' conversations and conversations ended as spam aren't counted. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resolved": {
                      "type": "number",
                      "description": "Number of conversations with an involvement that the agent resolved: confirmed by the customer (`resolved_confirmed`) or assumed after the customer went quiet following an answer (`resolved_assumed`).",
                      "example": 42
                    },
                    "escalated": {
                      "type": "number",
                      "description": "Number of conversations with an involvement that the agent handed off to a teammate (`handed_off`).",
                      "example": 7
                    },
                    "pending": {
                      "type": "number",
                      "description": "Number of conversations with an involvement that the agent is still handling (`active`).",
                      "example": 3
                    }
                  },
                  "required": [
                    "resolved",
                    "escalated",
                    "pending"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/assistant-activity": {
      "get": {
        "operationId": "getQuillsConversationAssistantActivity",
        "tags": [
          "Conversations"
        ],
        "summary": "Get the customer agent's activity on a conversation",
        "description": "Returns the customer agent's latest involvement in the conversation (the most recently created): its outcome, handoff reason, cited sources, rating and the time of its last answer. `activity` is null when the agent never took part. Any conversation of the workspace can be read. A cited post that the caller couldn't see in a post list (deleted, or on a board hidden from the caller) is left out, as is a malformed stored source; then at most 50 sources are returned. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The latest involvement, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "activity": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "outcome": {
                          "type": "string",
                          "enum": [
                            "active",
                            "handed_off",
                            "resolved_confirmed",
                            "resolved_assumed",
                            "abandoned"
                          ],
                          "description": "Status of the involvement. `active`: the agent is still handling the conversation. `handed_off`: it handed the conversation to a teammate. `resolved_confirmed`: the customer confirmed the issue was resolved. `resolved_assumed`: resolved because the customer went quiet after a real answer. `abandoned`: ended with no resolution or handoff.",
                          "example": "handed_off"
                        },
                        "handoffReason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Why the agent handed off: `explicit_request`, `frustration`, `repetition`, `low_confidence`, `capability_limit`, `safety`, `system_error` (a turn failed before the model answered) or `awaiting_confirmation` (the customer asked for an action that a teammate has to confirm). Null when it didn't hand off.",
                          "example": "explicit_request"
                        },
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "Kind of source: `article`, `post`, `snippet`, `summary`, `ticket`, `changelog`, `document` or `webpage`.",
                                "example": "article"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the cited record, as stored.",
                                "example": "article_01m8rzgvbkeh787ggqabcer0dp"
                              },
                              "title": {
                                "type": "string",
                                "description": "Title of the source. Empty when none was stored.",
                                "example": "Reset your password"
                              },
                              "url": {
                                "type": "string",
                                "description": "Link to the source. Empty when none was stored.",
                                "example": "https://help.example.com/articles/reset-your-password"
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title",
                              "url"
                            ]
                          },
                          "description": "Sources the agent cited, in stored order, up to 50. Empty when it cited none."
                        },
                        "rating": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Customer satisfaction rating recorded on the involvement. Null when not rated.",
                          "example": 4
                        },
                        "answeredAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time of the agent's last substantive answer, in ISO 8601 UTC. Null when it hasn't answered.",
                          "example": "2026-03-14T09:12:30.000Z"
                        }
                      },
                      "required": [
                        "outcome",
                        "handoffReason",
                        "sources",
                        "rating",
                        "answeredAt"
                      ],
                      "description": "The latest involvement. Null when the customer agent never took part in the conversation."
                    }
                  },
                  "required": [
                    "activity"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Not returned by this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/search": {
      "get": {
        "operationId": "searchQuillsWorkspace",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Search the workspace",
        "description": "Searches posts, conversations, tickets, articles, changelog entries, customers, teammates and companies and returns one ranked list, sorted by score, then newest update, then kind and ID. Each kind shows only records that its own list shows the caller: a post on a board the caller cannot see, a test customer's or spam conversation and a deleted record are never found. Conversations and tickets are limited to the teams that the caller may see. A query under 2 characters finds nothing; `offset + limit` stops at 100. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Search text. Full-text matching for content kinds (web search syntax); people, teammates and companies match when a name, email or domain contains it. Under 2 characters returns no results.",
              "example": "csv export"
            },
            "required": true,
            "description": "Search text. Full-text matching for content kinds (web search syntax); people, teammates and companies match when a name, email or domain contains it. Under 2 characters returns no results.",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "post",
                "conversation",
                "ticket",
                "article",
                "changelog",
                "person",
                "teammate",
                "company"
              ],
              "description": "Only search this kind. Omit to search every kind.",
              "example": "post"
            },
            "required": false,
            "description": "Only search this kind. Omit to search every kind.",
            "name": "kind",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100,
              "default": 0,
              "description": "Number of results to skip. Default: 0.",
              "example": 0
            },
            "required": false,
            "description": "Number of results to skip. Default: 0.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of results on the page. Default: 20.",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of results on the page. Default: 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of results, best first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "post",
                              "conversation",
                              "ticket",
                              "article",
                              "changelog",
                              "person",
                              "teammate",
                              "company"
                            ],
                            "description": "The record's kind. person: a customer. teammate: a current workspace member's principal.",
                            "example": "post"
                          },
                          "id": {
                            "type": "string",
                            "description": "The record's ID; its prefix follows the kind (post_, conversation_, ticket_, article_, changelog_, principal_ for person and teammate, company_)",
                            "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "title": {
                            "type": "string",
                            "description": "Display title: the post, ticket, article or changelog title, the conversation subject or customer name, the person's name or email, the teammate's name, or the company name. Empty string when the record has none.",
                            "example": "Export boards to CSV"
                          },
                          "excerpt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Plain-text passage around the first query word found: from the record's content, or from a conversation's or ticket's best-matching message (internal notes included). Null for people, teammates and companies, and for a conversation or ticket matched only by its subject or title.",
                            "example": "…we need to export every board to CSV for our quarterly review…"
                          },
                          "subtitle": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Secondary line: a person's email or a company's domain. Null for other kinds and when unknown.",
                            "example": null
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the record last changed. Null for teammates.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "score": {
                            "type": "number",
                            "description": "Relevance score; higher is better. Comparable only within one response.",
                            "example": 2.35
                          }
                        },
                        "required": [
                          "kind",
                          "id",
                          "title",
                          "excerpt",
                          "subtitle",
                          "updatedAt",
                          "score"
                        ]
                      },
                      "description": "The page of results, best first"
                    },
                    "hasMore": {
                      "type": "boolean",
                      "description": "Whether another page follows. Always false once offset + limit reaches 100.",
                      "example": true
                    }
                  },
                  "required": [
                    "results",
                    "hasMore"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/typing": {
      "get": {
        "operationId": "getQuillsConversationTyping",
        "tags": [
          "Conversations"
        ],
        "summary": "Get whether the customer is typing",
        "description": "Returns whether the conversation's customer is typing: true for 8 seconds after the customer's widget or portal last signaled typing. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The customer's typing state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "visitorTyping": {
                      "type": "boolean",
                      "description": "Whether the customer signaled typing in the last 8 seconds.",
                      "example": false
                    }
                  },
                  "required": [
                    "visitorTyping"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "sendQuillsConversationTyping",
        "tags": [
          "Conversations"
        ],
        "summary": "Signal that a teammate is typing to the customer",
        "description": "Signals that a teammate is typing in the conversation. The team side keeps one marker that lapses 8 seconds after the latest signal; the customer reads it as `teamTyping` when loading the conversation. Records no event, since the marker is ephemeral. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Conversation ID. Accepts the TypeID or its UUID.",
              "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
            },
            "required": true,
            "description": "Conversation ID. Accepts the TypeID or its UUID.",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The signal is stored",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`: the signal is stored.",
                      "example": true
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Conversation not found in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/presence": {
      "put": {
        "operationId": "sendQuillsAgentHeartbeat",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Mark the caller as online in the support inbox",
        "description": "Marks the caller as online for the team availability that customers see in the widget and the portal. Send it about every 30 seconds while the inbox is open: the mark lapses 90 seconds after the last heartbeat. A teammate whose chat availability is set to away doesn't count as online, heartbeat or not. Requires the `update` permission. Records no event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The heartbeat is stored",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always `true`.",
                      "example": true
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/support/link-preview": {
      "get": {
        "operationId": "unfurlQuillsLink",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get a link preview for a web page",
        "description": "Returns a link preview of a web page: its title, description and site name, read from the first 200 KB of the page's HTML head. Answers `preview: null`, with no error detail, for a private, loopback, link-local or metadata address or a redirect to one, more than 3 redirects, no answer within 5 seconds, a status other than 2xx, a body that isn't HTML, a page with neither a title nor a description, more than 2 previews already running in the API process, or any other failure. Nothing is cached. The instance setting that allows private webhook destinations also lets teammates preview private addresses, as for imports and webhooks. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri",
              "description": "URL of the web page to preview: an absolute `http` or `https` URL, up to 2,048 characters.",
              "example": "https://example.com/blog/spring-release"
            },
            "required": true,
            "description": "URL of the web page to preview: an absolute `http` or `https` URL, up to 2,048 characters.",
            "name": "url",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The preview, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "preview": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "Final URL of the page, after redirects.",
                          "example": "https://example.com/blog/spring-release"
                        },
                        "title": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Page title: the OpenGraph title, else the Twitter title, else the `<title>` tag. HTML entities decoded, on one line, up to 200 characters. Null when the page has none.",
                          "example": "Our spring release is here"
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Page description: the OpenGraph description, else the Twitter description, else the `description` meta tag. HTML entities decoded, on one line, up to 500 characters. Null when the page has none.",
                          "example": "Faster search, saved replies and a new mobile inbox."
                        },
                        "siteName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Site name from the OpenGraph `og:site_name` tag, up to 100 characters. Null when the page has none.",
                          "example": "Example Blog"
                        }
                      },
                      "required": [
                        "url",
                        "title",
                        "description",
                        "siteName"
                      ],
                      "description": "The preview. Null when the page couldn't be fetched or read, or has neither a title nor a description."
                    }
                  },
                  "required": [
                    "preview"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/read-batch": {
      "post": {
        "operationId": "readQuillsTogether",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Run up to 20 teammate reads in one request",
        "description": "Runs up to 20 teammate reads in one request and returns each one's result. Each read names a teammate GET route by operationId, with its query values. The reads run one after another in the request's transaction, and each is validated, permission-checked and answered as its own route would answer the caller. A route with path parameters, native permissions, a project check, a step outside its handler, or extra checks on the caller's other permissions is not batchable and answers 404; this route can't batch itself. One refused read doesn't fail the others; an unexpected server error fails the whole batch. Requires the `read` permission, and each read also needs its own route's permission. An API key spends one request of its rate limit and quota on the whole batch.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reads": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "operationId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "operationId of the teammate GET route to run, as listed in this API reference. 1 to 100 characters."
                        },
                        "query": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "maxLength": 2000
                          },
                          "description": "Query parameters for the read, as string values keyed by parameter name. Up to 30 values; names up to 100 characters, values up to 2,000. Omit for none.",
                          "example": {
                            "limit": "20"
                          }
                        }
                      },
                      "required": [
                        "operationId"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 20,
                    "description": "Reads to run, 1 to 20, in order."
                  }
                },
                "required": [
                  "reads"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One result for each read, in order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "operationId": {
                            "type": "string",
                            "description": "operationId of the read, as sent."
                          },
                          "status": {
                            "type": "number",
                            "description": "HTTP status that the route itself answers this caller: `200` on success, `400` when the query fails the route's validation, `403` when the caller lacks the route's permission, `404` for an unknown or unbatchable route or the route's own not-found, or another error status that the route returns, such as `409`.",
                            "example": 200
                          },
                          "body": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The route's JSON response, serialized as a string. Null unless `status` is `200`.",
                            "example": "{\"items\":[],\"nextCursor\":null,\"hasMore\":false}"
                          }
                        },
                        "required": [
                          "operationId",
                          "status",
                          "body"
                        ]
                      },
                      "description": "One result for each read, in request order."
                    }
                  },
                  "required": [
                    "results"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/test-conversations": {
      "delete": {
        "operationId": "deleteQuillsTestConversations",
        "tags": [
          "Conversations"
        ],
        "summary": "Delete every test conversation",
        "description": "Deletes every conversation whose visitor is a teammate's test customer, with its messages, and the ticket paired with each such conversation when the same test customer requested it. This is permanent, not a soft delete. Other conversations and tickets stay; cleanup of the deleted attachments' stored files is queued by the storage triggers. Requires the `delete` permission. Records one `conversation.test_deleted` event, with the count, when anything was deleted.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The number of deleted conversations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "number",
                      "description": "Number of test conversations deleted. `0` when there were none.",
                      "example": 3
                    }
                  },
                  "required": [
                    "deleted"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/portal/invites": {
      "post": {
        "operationId": "sendQuillsPortalInvite",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Invite one email address to the portal",
        "description": "Creates a pending invite that gives the address portal access after its owner signs in with an account that has this verified email. It never adds a workspace member. Requires the `manage_settings` permission. Records a `portal.invite_sent` event; the invite mail with a link valid for 30 days is sent by a background job after commit. An expired pending invite for the same address is marked expired first. One address per request.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 320,
                    "format": "email",
                    "description": "The address to invite; stored lowercase",
                    "example": "jane@example.com"
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "A personal note for the invite mail. Omitted or empty: no note.",
                    "example": "Here is early access to our roadmap."
                  }
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new invite",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The invite ID",
                      "example": "invite_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "email": {
                      "type": "string",
                      "description": "The invited email address, lowercase",
                      "example": "jane@example.com"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "canceled",
                        "expired"
                      ],
                      "description": "pending: the invite link works. accepted: the invitee accepted and has portal access. canceled: a teammate canceled it. expired: it passed expiresAt before acceptance.",
                      "example": "pending"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the invite was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "lastSentAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the invite mail was last queued. Null when it was never sent.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the invite links stop working: 30 days after the last send",
                      "example": "2026-12-30T14:05:00.000Z"
                    },
                    "acceptedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the invitee accepted. Null until accepted.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "email",
                    "status",
                    "createdAt",
                    "lastSentAt",
                    "expiresAt",
                    "acceptedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A pending, unexpired invite exists for this address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "listQuillsPortalInvites",
        "tags": [
          "Settings and domains"
        ],
        "summary": "List portal invites",
        "description": "Lists portal invites: pending first, then by last send and creation time, newest first. Returns at most 100; there is no pagination. A pending invite past its expiry is returned as expired. Requires the `manage_settings` permission. Never returns tokens.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Portal invites",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The invite ID",
                            "example": "invite_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "email": {
                            "type": "string",
                            "description": "The invited email address, lowercase",
                            "example": "jane@example.com"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "canceled",
                              "expired"
                            ],
                            "description": "pending: the invite link works. accepted: the invitee accepted and has portal access. canceled: a teammate canceled it. expired: it passed expiresAt before acceptance.",
                            "example": "pending"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the invite was created",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "lastSentAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the invite mail was last queued. Null when it was never sent.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the invite links stop working: 30 days after the last send",
                            "example": "2026-12-30T14:05:00.000Z"
                          },
                          "acceptedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the invitee accepted. Null until accepted.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "email",
                          "status",
                          "createdAt",
                          "lastSentAt",
                          "expiresAt",
                          "acceptedAt"
                        ]
                      },
                      "description": "Portal invites"
                    }
                  },
                  "required": [
                    "invites"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/portal/invites/{inviteId}/resend": {
      "post": {
        "operationId": "resendQuillsPortalInvite",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Send a portal invite again",
        "description": "Extends a pending, unexpired invite to 30 days from now and mails a new link after commit. Earlier links keep working. Requires the `manage_settings` permission. Records a `portal.invite_resent` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The invite ID",
              "example": "invite_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The invite ID",
            "name": "inviteId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The invite",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The invite ID",
                      "example": "invite_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "email": {
                      "type": "string",
                      "description": "The invited email address, lowercase",
                      "example": "jane@example.com"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "canceled",
                        "expired"
                      ],
                      "description": "pending: the invite link works. accepted: the invitee accepted and has portal access. canceled: a teammate canceled it. expired: it passed expiresAt before acceptance.",
                      "example": "pending"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the invite was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "lastSentAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the invite mail was last queued. Null when it was never sent.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the invite links stop working: 30 days after the last send",
                      "example": "2026-12-30T14:05:00.000Z"
                    },
                    "acceptedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the invitee accepted. Null until accepted.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "email",
                    "status",
                    "createdAt",
                    "lastSentAt",
                    "expiresAt",
                    "acceptedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No invite with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The invite is accepted, canceled or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/portal/invites/{inviteId}": {
      "delete": {
        "operationId": "cancelQuillsPortalInvite",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Cancel a pending portal invite",
        "description": "Cancels a pending invite; every link of the invite stops working. An accepted invite cannot be canceled here, and the access policy does not override it: to remove an invitee's access, block the person. Requires the `manage_settings` permission. Records a `portal.invite_canceled` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The invite ID",
              "example": "invite_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The invite ID",
            "name": "inviteId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The canceled invite",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The invite ID",
                      "example": "invite_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "email": {
                      "type": "string",
                      "description": "The invited email address, lowercase",
                      "example": "jane@example.com"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "canceled",
                        "expired"
                      ],
                      "description": "pending: the invite link works. accepted: the invitee accepted and has portal access. canceled: a teammate canceled it. expired: it passed expiresAt before acceptance.",
                      "example": "pending"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the invite was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "lastSentAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the invite mail was last queued. Null when it was never sent.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the invite links stop working: 30 days after the last send",
                      "example": "2026-12-30T14:05:00.000Z"
                    },
                    "acceptedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the invitee accepted. Null until accepted.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "email",
                    "status",
                    "createdAt",
                    "lastSentAt",
                    "expiresAt",
                    "acceptedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No invite with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The invite is accepted, canceled or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/portal/invites/{inviteId}/link": {
      "post": {
        "operationId": "createQuillsPortalInviteLink",
        "tags": [
          "Settings and domains"
        ],
        "summary": "Create a link for a pending portal invite",
        "description": "Mints a new invite link for a teammate who shares it by hand; no mail is sent. The link expires with the invite and works only for the invited address. The newest 20 links of an invite stay valid. Requires the `manage_settings` permission. Records a `portal.invite_link_created` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The invite ID",
              "example": "invite_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The invite ID",
            "name": "inviteId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The invite link",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "inviteUrl": {
                      "type": "string",
                      "description": "The portal invite page, with the token in the URL fragment so it never reaches a server log",
                      "example": "https://app.example.com/portal/pfh0haxfpzowht3oi213cqos/invite/invite_01m8rxfrbhfzr9r837k90wcggm#token=q8Zt3nV1xW0bR7kL2mP9sD4fG6hJ5cY1aE8uI3oN2tQ"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the invite, and so the link, expires",
                      "example": "2026-12-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "inviteUrl",
                    "expiresAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No invite with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The invite is accepted, canceled or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/profiles/{principalId}/team-context": {
      "get": {
        "operationId": "getQuillsProfileTeamContext",
        "tags": [
          "Contacts and companies"
        ],
        "summary": "Get the team context of a profile",
        "description": "Returns the email, company, segments, last device visit and the verified and blocked flags of a person with a profile, for the panel next to their profile. Requires the `read` permission. The email is the customer account's, else the contact email; a teammate's account email is not returned. The company's mrrCents is null without the `view_revenue` permission. Segments are sorted by name, at most 100.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The person's principal ID",
              "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
            },
            "required": true,
            "description": "The person's principal ID",
            "name": "principalId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The team context",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "email": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The customer account's email, else the contact email. Null when neither is a real address.",
                      "example": "jane@example.com"
                    },
                    "company": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The company ID",
                          "example": "company_01m8rxfrbhfzr9r84wtdjjzmgm"
                        },
                        "name": {
                          "type": "string",
                          "description": "The company name",
                          "example": "Example Corp"
                        },
                        "plan": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The company's plan. Null when none is set.",
                          "example": "Enterprise"
                        },
                        "mrrCents": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "The company's monthly recurring revenue in cents. Null without the view_revenue permission or when none is set.",
                          "example": 120000
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "plan",
                        "mrrCents"
                      ],
                      "description": "The person's company. Null when none is set."
                    },
                    "segments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The segment ID",
                            "example": "segment_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "name": {
                            "type": "string",
                            "description": "The segment name",
                            "example": "Beta testers"
                          },
                          "color": {
                            "type": "string",
                            "description": "The segment color, as stored",
                            "example": "#10b981"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "The person's segments, by name"
                    },
                    "lastSeenAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "The latest visit of any of the person's widget or portal devices. Null when none is recorded.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "emailVerified": {
                      "type": "boolean",
                      "description": "Whether the customer account's email is verified",
                      "example": true
                    },
                    "blocked": {
                      "type": "boolean",
                      "description": "Whether the person is blocked",
                      "example": false
                    }
                  },
                  "required": [
                    "email",
                    "company",
                    "segments",
                    "lastSeenAt",
                    "emailVerified",
                    "blocked"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No person with a profile has this principal ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/reporting/analytics": {
      "get": {
        "operationId": "getQuillsAnalyticsData",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Get feedback analytics for a period",
        "description": "Returns feedback activity for the period, computed live: totals with period-over-period deltas, daily counts, posts per status and per board, the 10 most voted new posts, and changelog reach.\n\nCounts only what the caller can see: posts on boards the caller can open, with deleted posts, deleted comments and test customers left out. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "90d",
                "12m"
              ],
              "default": "30d",
              "description": "Reporting period in whole UTC days, today included. `7d`: 7 days. `30d`: 30 days. `90d`: 90 days. `12m`: 365 days. Deltas compare it with the period of the same length just before."
            },
            "required": false,
            "description": "Reporting period in whole UTC days, today included. `7d`: 7 days. `30d`: 30 days. `90d`: 90 days. `12m`: 365 days. Deltas compare it with the period of the same length just before.",
            "name": "period",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 5,
              "description": "Number of most viewed published changelog entries to return in `changelog.topEntries`",
              "example": 5
            },
            "required": false,
            "description": "Number of most viewed published changelog entries to return in `changelog.topEntries`",
            "name": "changelogLimit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Feedback analytics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "summary": {
                      "type": "object",
                      "properties": {
                        "posts": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "number",
                              "description": "Count in the current period",
                              "example": 42
                            },
                            "delta": {
                              "type": "number",
                              "description": "Change from the previous period in percent, rounded to a whole number. 100 when the previous period was empty and the current one is not; 0 when both are empty.",
                              "example": 12
                            }
                          },
                          "required": [
                            "total",
                            "delta"
                          ],
                          "description": "Posts created"
                        },
                        "votes": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "number",
                              "description": "Count in the current period",
                              "example": 42
                            },
                            "delta": {
                              "type": "number",
                              "description": "Change from the previous period in percent, rounded to a whole number. 100 when the previous period was empty and the current one is not; 0 when both are empty.",
                              "example": 12
                            }
                          },
                          "required": [
                            "total",
                            "delta"
                          ],
                          "description": "Votes cast"
                        },
                        "comments": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "number",
                              "description": "Count in the current period",
                              "example": 42
                            },
                            "delta": {
                              "type": "number",
                              "description": "Change from the previous period in percent, rounded to a whole number. 100 when the previous period was empty and the current one is not; 0 when both are empty.",
                              "example": 12
                            }
                          },
                          "required": [
                            "total",
                            "delta"
                          ],
                          "description": "Comments written"
                        },
                        "users": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "number",
                              "description": "Count in the current period",
                              "example": 42
                            },
                            "delta": {
                              "type": "number",
                              "description": "Change from the previous period in percent, rounded to a whole number. 100 when the previous period was empty and the current one is not; 0 when both are empty.",
                              "example": 12
                            }
                          },
                          "required": [
                            "total",
                            "delta"
                          ],
                          "description": "Customers who signed up for an account. Teammates, anonymous visitors and test customers are not counted."
                        }
                      },
                      "required": [
                        "posts",
                        "votes",
                        "comments",
                        "users"
                      ],
                      "description": "Totals for the period with deltas"
                    },
                    "dailyStats": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "description": "UTC day in `YYYY-MM-DD` form",
                            "example": "2026-11-18"
                          },
                          "posts": {
                            "type": "number",
                            "description": "Posts created that day",
                            "example": 4
                          },
                          "votes": {
                            "type": "number",
                            "description": "Votes cast that day",
                            "example": 17
                          },
                          "comments": {
                            "type": "number",
                            "description": "Comments written that day",
                            "example": 6
                          },
                          "users": {
                            "type": "number",
                            "description": "Customer signups that day",
                            "example": 2
                          }
                        },
                        "required": [
                          "date",
                          "posts",
                          "votes",
                          "comments",
                          "users"
                        ]
                      },
                      "description": "One row per UTC day of the period, oldest first, today included. Days with no activity have zeros."
                    },
                    "statusDistribution": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "statusId": {
                            "type": "string",
                            "description": "Post status ID",
                            "example": "post_status_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "status": {
                            "type": "string",
                            "description": "Status name",
                            "example": "Planned"
                          },
                          "color": {
                            "type": "string",
                            "description": "Status color as a hex code",
                            "example": "#3b82f6"
                          },
                          "category": {
                            "type": "string",
                            "description": "Status category. `active`: still being considered or worked on. `complete`: shipped. `closed`: closed without shipping.",
                            "example": "active"
                          },
                          "count": {
                            "type": "number",
                            "description": "Posts currently in this status",
                            "example": 23
                          }
                        },
                        "required": [
                          "statusId",
                          "status",
                          "color",
                          "category",
                          "count"
                        ]
                      },
                      "description": "Current post count per status across all time, not only the period, in status order. Statuses with no posts are left out."
                    },
                    "boardBreakdown": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "boardId": {
                            "type": "string",
                            "description": "Board ID",
                            "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9b"
                          },
                          "board": {
                            "type": "string",
                            "description": "Board name",
                            "example": "Feature requests"
                          },
                          "count": {
                            "type": "number",
                            "description": "Posts created on the board in the period",
                            "example": 11
                          }
                        },
                        "required": [
                          "boardId",
                          "board",
                          "count"
                        ]
                      },
                      "description": "Posts created in the period per board, most first. Boards with no new posts are left out."
                    },
                    "topPosts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rank": {
                            "type": "number",
                            "description": "Position in the list, starting at 1",
                            "example": 1
                          },
                          "postId": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9c"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Dark mode for the dashboard"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Votes cast on the post in the period, test customers left out",
                            "example": 31
                          },
                          "commentCount": {
                            "type": "number",
                            "description": "Comments written on the post in the period, deleted comments and test customers left out",
                            "example": 8
                          },
                          "boardName": {
                            "type": "string",
                            "description": "Name of the post's board",
                            "example": "Feature requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the post's status. Null when it has none.",
                            "example": "Under review"
                          }
                        },
                        "required": [
                          "rank",
                          "postId",
                          "title",
                          "voteCount",
                          "commentCount",
                          "boardName",
                          "statusName"
                        ]
                      },
                      "description": "Up to 10 posts created in the period, most votes in the period first, then newest first"
                    },
                    "changelog": {
                      "type": "object",
                      "properties": {
                        "publishedCount": {
                          "type": "number",
                          "description": "Published changelog entries in total, not only the period",
                          "example": 38
                        },
                        "publishedInPeriod": {
                          "type": "number",
                          "description": "Changelog entries published in the period",
                          "example": 3
                        },
                        "totalViews": {
                          "type": "number",
                          "description": "Sum of the view counts of all published entries",
                          "example": 5120
                        },
                        "topEntries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Changelog entry ID",
                                "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9d"
                              },
                              "title": {
                                "type": "string",
                                "description": "Entry title",
                                "example": "Faster board filters"
                              },
                              "viewCount": {
                                "type": "number",
                                "description": "Times the entry was viewed, all time",
                                "example": 860
                              },
                              "publishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the entry was published, in ISO 8601 UTC",
                                "example": "2026-11-19T09:10:00.000Z"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "viewCount",
                              "publishedAt"
                            ]
                          },
                          "description": "The `changelogLimit` most viewed published entries, most views first"
                        }
                      },
                      "required": [
                        "publishedCount",
                        "publishedInPeriod",
                        "totalViews",
                        "topEntries"
                      ],
                      "description": "Changelog reach. Only published entries count; deleted and scheduled entries are left out."
                    },
                    "computedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When these numbers were computed (the request time), in ISO 8601 UTC",
                      "example": "2026-11-20T08:00:00.000Z"
                    }
                  },
                  "required": [
                    "summary",
                    "dailyStats",
                    "statusDistribution",
                    "boardBreakdown",
                    "topPosts",
                    "changelog",
                    "computedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/reporting/admin-overview": {
      "get": {
        "operationId": "fetchQuillsAdminOverview",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Get the admin overview",
        "description": "Returns what waits for the team across support, feedback, changelog, help center and status page: conversations waiting for a reply, new posts to review, shipped posts not yet in a changelog entry, the posts with the most votes in the last 7 days, changelog and help center drafts, open incidents and status subscribers. Feedback lists and counts cover only boards the caller can see and leave out merged posts. Test customers are left out everywhere. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Admin overview",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "support": {
                      "type": "object",
                      "properties": {
                        "waitingCount": {
                          "type": "number",
                          "description": "Conversations that are not closed and whose customer is waiting for a reply",
                          "example": 7
                        },
                        "waiting": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Conversation ID",
                                "example": "conversation_01jd3k8m2q5r7t9v1w3x5y7z9b"
                              },
                              "title": {
                                "type": "string",
                                "description": "Conversation subject, else the last message preview, else `Conversation`",
                                "example": "Can't log in after password reset"
                              },
                              "priority": {
                                "type": "string",
                                "description": "Triage priority: `none`, `low`, `medium`, `high` or `urgent`",
                                "example": "high"
                              },
                              "waitingSince": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "When the customer started waiting for a reply, in ISO 8601 UTC",
                                "example": "2026-11-20T07:45:00.000Z"
                              },
                              "mine": {
                                "type": "boolean",
                                "description": "True when the conversation is assigned to the caller"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "priority",
                              "waitingSince",
                              "mine"
                            ]
                          },
                          "description": "Up to 8 waiting conversations, longest waiting first"
                        }
                      },
                      "required": [
                        "waitingCount",
                        "waiting"
                      ],
                      "description": "Support inbox"
                    },
                    "feedback": {
                      "type": "object",
                      "properties": {
                        "reviewCount": {
                          "type": "number",
                          "description": "Posts in the workspace's default status, where new posts start",
                          "example": 12
                        },
                        "completeCount": {
                          "type": "number",
                          "description": "Posts in a `complete` status that no changelog entry links yet",
                          "example": 4
                        },
                        "review": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Post ID",
                                "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                              },
                              "title": {
                                "type": "string",
                                "description": "Post title",
                                "example": "Export boards to CSV"
                              },
                              "boardName": {
                                "type": "string",
                                "description": "Name of the post's board",
                                "example": "Feature requests"
                              },
                              "statusName": {
                                "type": "string",
                                "description": "Name of the post's status",
                                "example": "Open"
                              },
                              "at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Sort time in ISO 8601 UTC: when the post was created (`review`) or last updated (`announce`)",
                                "example": "2026-11-18T14:32:05.000Z"
                              },
                              "mine": {
                                "type": "boolean",
                                "description": "True when the caller owns the post"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "boardName",
                              "statusName",
                              "at",
                              "mine"
                            ]
                          },
                          "description": "Up to 8 posts in the default status, newest first. Empty when the workspace has no default status."
                        },
                        "announce": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Post ID",
                                "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                              },
                              "title": {
                                "type": "string",
                                "description": "Post title",
                                "example": "Export boards to CSV"
                              },
                              "boardName": {
                                "type": "string",
                                "description": "Name of the post's board",
                                "example": "Feature requests"
                              },
                              "statusName": {
                                "type": "string",
                                "description": "Name of the post's status",
                                "example": "Open"
                              },
                              "at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "Sort time in ISO 8601 UTC: when the post was created (`review`) or last updated (`announce`)",
                                "example": "2026-11-18T14:32:05.000Z"
                              },
                              "mine": {
                                "type": "boolean",
                                "description": "True when the caller owns the post"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "boardName",
                              "statusName",
                              "at",
                              "mine"
                            ]
                          },
                          "description": "Up to 8 shipped posts not linked to any changelog entry, most recently updated first"
                        }
                      },
                      "required": [
                        "reviewCount",
                        "completeCount",
                        "review",
                        "announce"
                      ],
                      "description": "Feedback waiting for review or announcement"
                    },
                    "momentum": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "postId": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9c"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Dark mode for the dashboard"
                          },
                          "votesLast7d": {
                            "type": "number",
                            "description": "Votes cast on the post in the last 7 days",
                            "example": 19
                          }
                        },
                        "required": [
                          "postId",
                          "title",
                          "votesLast7d"
                        ]
                      },
                      "description": "Up to 3 posts with the most votes in the last 7 days. Posts with no votes in that time are left out."
                    },
                    "changelog": {
                      "type": "object",
                      "properties": {
                        "drafts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Changelog entry ID",
                                "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9d"
                              },
                              "title": {
                                "type": "string",
                                "description": "Entry title",
                                "example": "November improvements"
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "draft",
                                  "scheduled"
                                ],
                                "description": "`draft`: no publish time set. `scheduled`: set to publish at a future `publishedAt`."
                              },
                              "publishedAt": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "Scheduled publish time in ISO 8601 UTC. Null for a draft.",
                                "example": "2026-12-02T15:00:00.000Z"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "status",
                              "publishedAt"
                            ]
                          },
                          "description": "Up to 2 unpublished or scheduled entries, most recently updated first"
                        }
                      },
                      "required": [
                        "drafts"
                      ],
                      "description": "Changelog drafts"
                    },
                    "helpCenter": {
                      "type": "object",
                      "properties": {
                        "draftCount": {
                          "type": "number",
                          "description": "Unpublished help center articles",
                          "example": 5
                        },
                        "drafts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Article ID",
                                "example": "article_01jd3k8m2q5r7t9v1w3x5y7z9e"
                              },
                              "title": {
                                "type": "string",
                                "description": "Article title",
                                "example": "Setting up single sign-on"
                              }
                            },
                            "required": [
                              "id",
                              "title"
                            ]
                          },
                          "description": "Up to 2 unpublished articles, most recently updated first"
                        }
                      },
                      "required": [
                        "draftCount",
                        "drafts"
                      ],
                      "description": "Help center drafts"
                    },
                    "status": {
                      "type": "object",
                      "properties": {
                        "openIncidentCount": {
                          "type": "number",
                          "description": "Unresolved incidents on the status page. Scheduled maintenance is not counted.",
                          "example": 1
                        },
                        "subscriberCount": {
                          "type": "number",
                          "description": "Active status page subscribers",
                          "example": 240
                        }
                      },
                      "required": [
                        "openIncidentCount",
                        "subscriberCount"
                      ],
                      "description": "Status page"
                    }
                  },
                  "required": [
                    "support",
                    "feedback",
                    "momentum",
                    "changelog",
                    "helpCenter",
                    "status"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/reporting/support/reopens": {
      "get": {
        "operationId": "getQuillsReopenReport",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Get ticket and conversation reopen rates",
        "description": "Returns how often resolved conversations and tickets were reopened, for those created in the last `days` days (a rolling window ending now), with the most reopened items. Requires the `quills:read` permission. A caller without `quills:update` who belongs to one or more teams sees only conversations and tickets assigned to those teams; other callers see the whole workspace.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30,
              "description": "Window length in days, counted back from now. Only items created in the window count.",
              "example": 30
            },
            "required": false,
            "description": "Window length in days, counted back from now. Only items created in the window count.",
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Reopen metrics over the requested window",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "days": {
                      "type": "integer",
                      "description": "Length of the window in days, as requested",
                      "example": 30
                    },
                    "conversations": {
                      "type": "object",
                      "properties": {
                        "resolvedCount": {
                          "type": "integer",
                          "description": "Items created in the window that were resolved at least once: resolved now, or reopened after a resolution",
                          "example": 120
                        },
                        "reopenedCount": {
                          "type": "integer",
                          "description": "Conversations created in the window that were reopened at least once",
                          "example": 9
                        },
                        "reopenRatePercent": {
                          "type": "number",
                          "description": "`reopenedCount` as a percentage of `resolvedCount`, rounded to one decimal place. 0 when nothing was resolved.",
                          "example": 7.5
                        },
                        "topReopened": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Conversation ID",
                                "example": "conversation_01jd3k8m2q5r7t9v1w3x5y7z9a"
                              },
                              "subject": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Conversation subject. Null when it has none.",
                                "example": "Invoice shows the wrong plan"
                              },
                              "reopenedCount": {
                                "type": "integer",
                                "description": "Times the conversation was reopened",
                                "example": 3
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the conversation last changed, in ISO 8601 UTC",
                                "example": "2026-11-19T16:20:00.000Z"
                              }
                            },
                            "required": [
                              "id",
                              "subject",
                              "reopenedCount",
                              "updatedAt"
                            ]
                          },
                          "description": "Up to 10 reopened conversations, most reopens first, then most recently updated"
                        }
                      },
                      "required": [
                        "resolvedCount",
                        "reopenedCount",
                        "reopenRatePercent",
                        "topReopened"
                      ],
                      "description": "Conversations created in the window. Conversations ended as spam and those with test customers are left out."
                    },
                    "tickets": {
                      "type": "object",
                      "properties": {
                        "resolvedCount": {
                          "type": "integer",
                          "description": "Items created in the window that were resolved at least once: resolved now, or reopened after a resolution",
                          "example": 64
                        },
                        "reopenedCount": {
                          "type": "integer",
                          "description": "Tickets created in the window that were reopened at least once",
                          "example": 5
                        },
                        "reopenRatePercent": {
                          "type": "number",
                          "description": "`reopenedCount` as a percentage of `resolvedCount`, rounded to one decimal place. 0 when nothing was resolved.",
                          "example": 7.8
                        },
                        "topReopened": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Ticket ID",
                                "example": "ticket_01jd3k8m2q5r7t9v1w3x5y7z9b"
                              },
                              "number": {
                                "type": "number",
                                "description": "Ticket number shown to teammates and customers",
                                "example": 1042
                              },
                              "title": {
                                "type": "string",
                                "description": "Ticket title",
                                "example": "Webhook deliveries failing"
                              },
                              "reopenedCount": {
                                "type": "integer",
                                "description": "Times the ticket was reopened",
                                "example": 2
                              },
                              "updatedAt": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the ticket last changed, in ISO 8601 UTC",
                                "example": "2026-11-19T16:20:00.000Z"
                              }
                            },
                            "required": [
                              "id",
                              "number",
                              "title",
                              "reopenedCount",
                              "updatedAt"
                            ]
                          },
                          "description": "Up to 10 reopened tickets, most reopens first, then most recently updated"
                        }
                      },
                      "required": [
                        "resolvedCount",
                        "reopenedCount",
                        "reopenRatePercent",
                        "topReopened"
                      ],
                      "description": "Tickets created in the window. Deleted tickets and tickets from test customers are left out."
                    }
                  },
                  "required": [
                    "days",
                    "conversations",
                    "tickets"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/reporting/visitor-analytics": {
      "get": {
        "operationId": "getQuillsVisitorAnalyticsData",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Get portal and widget visitor analytics for a period",
        "description": "Returns unique visitors, page views and visits for the portal and widget, per day and in total with period-over-period deltas, plus the top pages, traffic sources, countries, devices, browsers and operating systems.\n\nNumbers come from an hourly rollup of the page views that `createQuillsTrack` records, so the last hour may be missing. Test customers' views are left out. A visit starts when a visitor returns after more than 30 minutes without a page view. The visitor hash changes every UTC day, so a period's unique visitors are the sum of its daily unique visitors. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "7d",
                "30d",
                "90d",
                "12m"
              ],
              "default": "30d",
              "description": "Reporting period in whole UTC days, today included. `7d`: 7 days. `30d`: 30 days. `90d`: 90 days. `12m`: 365 days. Deltas compare it with the period of the same length just before."
            },
            "required": false,
            "description": "Reporting period in whole UTC days, today included. `7d`: 7 days. `30d`: 30 days. `90d`: 90 days. `12m`: 365 days. Deltas compare it with the period of the same length just before.",
            "name": "period",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "portal",
                "widget"
              ],
              "default": "all",
              "description": "Which views to count. `all`: portal and widget together. `portal`: the public feedback portal only. `widget`: the embedded widget only."
            },
            "required": false,
            "description": "Which views to count. `all`: portal and widget together. `portal`: the public feedback portal only. `widget`: the embedded widget only.",
            "name": "surface",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Visitor analytics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uniqueVisitors": {
                      "type": "object",
                      "properties": {
                        "current": {
                          "type": "number",
                          "description": "Total for the current period",
                          "example": 1840
                        },
                        "delta": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Change from the previous period in percent, rounded to a whole number. Null when the previous period had none.",
                          "example": -8
                        }
                      },
                      "required": [
                        "current",
                        "delta"
                      ],
                      "description": "Unique visitors, summed per day"
                    },
                    "pageviews": {
                      "type": "object",
                      "properties": {
                        "current": {
                          "type": "number",
                          "description": "Total for the current period",
                          "example": 1840
                        },
                        "delta": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Change from the previous period in percent, rounded to a whole number. Null when the previous period had none.",
                          "example": -8
                        }
                      },
                      "required": [
                        "current",
                        "delta"
                      ],
                      "description": "Page views"
                    },
                    "visits": {
                      "type": "object",
                      "properties": {
                        "current": {
                          "type": "number",
                          "description": "Total for the current period",
                          "example": 1840
                        },
                        "delta": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Change from the previous period in percent, rounded to a whole number. Null when the previous period had none.",
                          "example": -8
                        }
                      },
                      "required": [
                        "current",
                        "delta"
                      ],
                      "description": "Visits (sessions split by 30 minutes of inactivity)"
                    },
                    "dailyStats": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "description": "UTC day in `YYYY-MM-DD` form",
                            "example": "2026-11-18"
                          },
                          "uniqueVisitors": {
                            "type": "number",
                            "description": "Unique visitors that day",
                            "example": 96
                          },
                          "pageviews": {
                            "type": "number",
                            "description": "Page views that day",
                            "example": 410
                          },
                          "visits": {
                            "type": "number",
                            "description": "Visits that day",
                            "example": 128
                          }
                        },
                        "required": [
                          "date",
                          "uniqueVisitors",
                          "pageviews",
                          "visits"
                        ]
                      },
                      "description": "One row per UTC day of the period that has rolled-up data, oldest first. Days without data are left out."
                    },
                    "top": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "Dimension value, such as a page path or a country code",
                                "example": "/roadmap"
                              },
                              "count": {
                                "type": "number",
                                "description": "Unique visitors with this value in the period",
                                "example": 312
                              }
                            },
                            "required": [
                              "label",
                              "count"
                            ]
                          },
                          "description": "Up to 10 values, most unique visitors first, then by label"
                        },
                        "source": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "Dimension value, such as a page path or a country code",
                                "example": "/roadmap"
                              },
                              "count": {
                                "type": "number",
                                "description": "Unique visitors with this value in the period",
                                "example": 312
                              }
                            },
                            "required": [
                              "label",
                              "count"
                            ]
                          },
                          "description": "Up to 10 values, most unique visitors first, then by label"
                        },
                        "country": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "Dimension value, such as a page path or a country code",
                                "example": "/roadmap"
                              },
                              "count": {
                                "type": "number",
                                "description": "Unique visitors with this value in the period",
                                "example": 312
                              }
                            },
                            "required": [
                              "label",
                              "count"
                            ]
                          },
                          "description": "Up to 10 values, most unique visitors first, then by label"
                        },
                        "device": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "Dimension value, such as a page path or a country code",
                                "example": "/roadmap"
                              },
                              "count": {
                                "type": "number",
                                "description": "Unique visitors with this value in the period",
                                "example": 312
                              }
                            },
                            "required": [
                              "label",
                              "count"
                            ]
                          },
                          "description": "Up to 10 values, most unique visitors first, then by label"
                        },
                        "browser": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "Dimension value, such as a page path or a country code",
                                "example": "/roadmap"
                              },
                              "count": {
                                "type": "number",
                                "description": "Unique visitors with this value in the period",
                                "example": 312
                              }
                            },
                            "required": [
                              "label",
                              "count"
                            ]
                          },
                          "description": "Up to 10 values, most unique visitors first, then by label"
                        },
                        "os": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "description": "Dimension value, such as a page path or a country code",
                                "example": "/roadmap"
                              },
                              "count": {
                                "type": "number",
                                "description": "Unique visitors with this value in the period",
                                "example": 312
                              }
                            },
                            "required": [
                              "label",
                              "count"
                            ]
                          },
                          "description": "Up to 10 values, most unique visitors first, then by label"
                        }
                      },
                      "required": [
                        "page",
                        "source",
                        "country",
                        "device",
                        "browser",
                        "os"
                      ],
                      "description": "Top values per dimension for the period, ranked by unique visitors. `page`: page path. `source`: campaign source or referrer host. `country`: CDN country code. `device`: `desktop`, `mobile` or `tablet`. `browser` and `os`: browser and operating system names. Views without a value for a dimension are left out of it."
                    },
                    "computedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the rollup last computed the newest day, in ISO 8601 UTC. Null when neither this period nor the previous one has rolled-up data.",
                      "example": "2026-11-20T08:00:00.000Z"
                    }
                  },
                  "required": [
                    "uniqueVisitors",
                    "pageviews",
                    "visits",
                    "dailyStats",
                    "top",
                    "computedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/reporting/team-counts": {
      "get": {
        "operationId": "getQuillsTeamCounts",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Get the navigation counts of the teammate app",
        "description": "Returns the badge counts of the teammate app's navigation. Each count follows the rules of the list it counts, so it never includes a row the caller cannot read in that list. Conversations count only open, unarchived conversations with real customers, spam left out, as the inbox counts them. Post counts match `getQuillsPostFilterCounts` without deleted posts, and the open ticket count matches `listQuillsTickets` with `statusCategory=open`. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "myConversations": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Open conversations assigned to the caller",
                      "example": 4
                    },
                    "unassignedConversations": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Open conversations assigned to no teammate",
                      "example": 6
                    },
                    "openConversations": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "All open conversations",
                      "example": 23
                    },
                    "queueConversations": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Open conversations whose customer is waiting for a reply",
                      "example": 9
                    },
                    "openTickets": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Tickets in a status of the `open` category, deleted tickets left out",
                      "example": 15
                    },
                    "pendingDuplicates": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Pending duplicate-post (merge) suggestions whose two posts the caller can see",
                      "example": 3
                    },
                    "pendingSignals": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Pending feedback signals that the caller can read",
                      "example": 11
                    },
                    "postStatuses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post status ID",
                            "example": "post_status_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "name": {
                            "type": "string",
                            "description": "Status name",
                            "example": "Under review"
                          },
                          "color": {
                            "type": "string",
                            "description": "Status color as a hex code",
                            "example": "#f59e0b"
                          },
                          "count": {
                            "type": "integer",
                            "minimum": 0,
                            "description": "Posts in this status that the caller can see",
                            "example": 18
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color",
                          "count"
                        ]
                      },
                      "maxItems": 100,
                      "description": "Each status of the `active` category that is not deleted, in status position order, with its post count. At most 100."
                    }
                  },
                  "required": [
                    "myConversations",
                    "unassignedConversations",
                    "openConversations",
                    "queueConversations",
                    "openTickets",
                    "pendingDuplicates",
                    "pendingSignals",
                    "postStatuses"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/transfer/export-runs": {
      "get": {
        "operationId": "listQuillsExportRuns",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "List the caller's export runs, newest first",
        "description": "Lists the export runs that the caller started, newest first, up to `limit`. Other teammates' runs are left out: an export holds the rows that its initiator can read. Not paginated. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "The maximum number of runs to return. Default 20.",
              "example": 20
            },
            "required": false,
            "description": "The maximum number of runs to return. Default 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Export runs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The export run ID.",
                            "example": "export_run_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "`pending`: queued. `running`: the file is being written. `completed`: the file is ready to download until `expiresAt`. `failed`: the export stopped; `error` says why.",
                            "example": "completed"
                          },
                          "fileName": {
                            "type": "string",
                            "description": "The CSV file name: the export kind, the workspace slug and the UTC date the run started.",
                            "example": "posts-acme-2026-11-30.csv"
                          },
                          "sizeBytes": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "The file size in bytes. Null until the file is written.",
                            "example": 48213
                          },
                          "entityCounts": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "posts": {
                                "type": "number",
                                "description": "Rows in the posts file. Present only for a posts export.",
                                "example": 120
                              },
                              "users": {
                                "type": "number",
                                "description": "Rows in the users file. Present only for a users export.",
                                "example": 340
                              },
                              "companies": {
                                "type": "number",
                                "description": "Rows in the companies file. Present only for a companies export.",
                                "example": 25
                              },
                              "conversations": {
                                "type": "number",
                                "description": "Rows in the conversations file. Present only for a conversations export.",
                                "example": 980
                              }
                            },
                            "description": "Rows in the file, keyed by export kind. Null until the file is written."
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Why the export failed. Null unless `status` is `failed`.",
                            "example": "The export stopped before it finished"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the run was requested.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "finishedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the run completed or failed. Null while it is pending or running.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "expiresAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the file stops being downloadable and is removed: 7 days after a completed run finished. Null for a run that has not completed.",
                            "example": "2026-12-07T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "fileName",
                          "sizeBytes",
                          "entityCounts",
                          "error",
                          "createdAt",
                          "finishedAt",
                          "expiresAt"
                        ]
                      },
                      "description": "The caller's export runs, newest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsExportWorkspace",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "Start an export run",
        "description": "Queues a CSV export of posts, users, companies or conversations and records an `export.requested` event; a background job writes the file after commit. The file holds only rows that the caller can read: posts on boards the caller can see, no test customers and no deleted rows. The companies file has the monthly_spend column only when the caller holds the `view_revenue` permission, both at the request and when the file is built. One export runs per workspace at a time; a stuck run whose job is gone is marked failed so a new one can start. Poll `getQuillsExportRuns`, then request a download URL. Requires the `manage_settings` permission and configured file storage.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "posts",
                      "users",
                      "companies",
                      "conversations"
                    ],
                    "description": "Which file to build: `posts`, `users` (customers), `companies` or `conversations`.",
                    "example": "posts"
                  }
                },
                "required": [
                  "kind"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The queued run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runId": {
                      "type": "string",
                      "description": "The new export run's ID, in `pending` status.",
                      "example": "export_run_01m8rxfrbhfzr9r837k90wcggm"
                    }
                  },
                  "required": [
                    "runId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another export of this workspace is pending or running",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/transfer/import-runs": {
      "get": {
        "operationId": "listQuillsImportRuns",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "List the workspace's import runs, newest first",
        "description": "Lists every import run of the workspace, whoever started it, newest first, up to `limit`. Not paginated. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "The maximum number of runs to return. Default 20.",
              "example": 20
            },
            "required": false,
            "description": "The maximum number of runs to return. Default 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Import runs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The import run ID.",
                            "example": "import_run_01m8rxfrbhfzr9r83a29m5ke14"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "csv",
                              "uservoice",
                              "canny",
                              "api"
                            ],
                            "description": "Where the data came from. Runs started with `createQuillsImport` are `csv`; `uservoice`, `canny` and `api` appear on imported history.",
                            "example": "csv"
                          },
                          "fileName": {
                            "type": "string",
                            "description": "The name of the imported file.",
                            "example": "feedback-export.csv"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "dry_run",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "`pending`: queued. `running`: the job is checking and importing rows. `completed`: every valid row was imported. `failed`: nothing was imported; `errorReport` says why. `dry_run` appears only on imported history.",
                            "example": "completed"
                          },
                          "totals": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "rows": {
                                "type": "number",
                                "description": "Data rows in the file.",
                                "example": 250
                              },
                              "created": {
                                "type": "number",
                                "description": "Posts created.",
                                "example": 240
                              },
                              "updated": {
                                "type": "number",
                                "description": "Existing posts updated. CSV imports never update posts, so this is 0.",
                                "example": 0
                              },
                              "skipped": {
                                "type": "number",
                                "description": "Rows skipped because an earlier import already created a post with their `source_id`.",
                                "example": 10
                              },
                              "errors": {
                                "type": "number",
                                "description": "Invalid rows. Any error fails the run and imports nothing.",
                                "example": 0
                              }
                            },
                            "required": [
                              "rows",
                              "created",
                              "updated",
                              "skipped",
                              "errors"
                            ],
                            "description": "Row counts. Null until the job has checked the file."
                          },
                          "errorReport": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "object",
                              "properties": {
                                "row": {
                                  "type": "number",
                                  "description": "The data row number, starting at 1 for the first row after the header. 0: the error is about the whole file or the target board.",
                                  "example": 12
                                },
                                "message": {
                                  "type": "string",
                                  "description": "What is wrong with the row.",
                                  "example": "Unknown status: someday"
                                },
                                "field": {
                                  "type": "string",
                                  "description": "The column or field at fault, when the error names one.",
                                  "example": "status"
                                }
                              },
                              "required": [
                                "row",
                                "message"
                              ]
                            },
                            "description": "The first 100 row errors. Null when there are none or the job has not checked the file yet."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the run was requested.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "finishedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the run completed or failed. Null while it is pending or running.",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "source",
                          "fileName",
                          "status",
                          "totals",
                          "errorReport",
                          "createdAt",
                          "finishedAt"
                        ]
                      },
                      "description": "The import runs, newest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsImport",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "Start a post CSV import run",
        "description": "Upload the CSV with a URL from POST /files/uploads (purpose `file`), then start the run. Columns: `title` (required), and `content`, `status`, `tags`, `board`, `author_email`, `author_name`, `created_at` and `source_id`. Headers match case and spacing aside, and the common names of other feedback tools' exports also match (for example `Post Title`, `Details`, `Description`, `Post Status`, `Email`, `Created`, `URL`), so such an export imports as it is. Their status words (for example `shipped`, `declined`, `in development`) map to the default status of the same meaning, and a date and time without a zone is read as UTC. Vote counts are not imported. Rows without `board` go to `boardId`. The job checks every row first: one invalid row fails the run with an error report and imports nothing. A row whose `source_id` an earlier import created is skipped. Records an `import.requested` event; a background job imports the file after commit. Poll `getQuillsImportRuns` for the outcome. The file must be a CSV of at most 10 MB. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "pattern": "^[^\\\\/\\p{Cc}]+$/u",
                    "description": "The file name to show in the run history. It must not contain slashes or control characters.",
                    "example": "feedback-export.csv"
                  },
                  "boardId": {
                    "type": "string",
                    "description": "The board that receives rows without a `board` column value. The caller must be able to see it.",
                    "example": "board_01m8rxfrbhfzr9r83a29m5ke14"
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size",
                  "name",
                  "boardId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The queued run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runId": {
                      "type": "string",
                      "description": "The new import run's ID.",
                      "example": "import_run_01m8rxfrbhfzr9r83a29m5ke14"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "dry_run",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "The run's status: `pending` until the job picks it up.",
                      "example": "pending"
                    },
                    "fileId": {
                      "type": "string",
                      "description": "The ID of the file record that keeps the upload until the job has read it. It does not appear in file lists.",
                      "example": "file_01m8rxfrbhfzr9r83t8d2n37cb"
                    }
                  },
                  "required": [
                    "runId",
                    "status",
                    "fileId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The upload was not found in storage, or the board does not exist or the caller cannot see it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "This upload is already registered to a file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/transfer/export-runs/{runId}": {
      "get": {
        "operationId": "getQuillsExportRuns",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "Get one of the caller's export runs",
        "description": "Returns the run's status, file details and expiry. Poll it after `createQuillsExportWorkspace` until `status` is `completed` or `failed`. Another teammate's run is not found. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The ID of an export run that the caller started.",
              "example": "export_run_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The ID of an export run that the caller started.",
            "name": "runId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Export run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The export run ID.",
                      "example": "export_run_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "`pending`: queued. `running`: the file is being written. `completed`: the file is ready to download until `expiresAt`. `failed`: the export stopped; `error` says why.",
                      "example": "completed"
                    },
                    "fileName": {
                      "type": "string",
                      "description": "The CSV file name: the export kind, the workspace slug and the UTC date the run started.",
                      "example": "posts-acme-2026-11-30.csv"
                    },
                    "sizeBytes": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The file size in bytes. Null until the file is written.",
                      "example": 48213
                    },
                    "entityCounts": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "posts": {
                          "type": "number",
                          "description": "Rows in the posts file. Present only for a posts export.",
                          "example": 120
                        },
                        "users": {
                          "type": "number",
                          "description": "Rows in the users file. Present only for a users export.",
                          "example": 340
                        },
                        "companies": {
                          "type": "number",
                          "description": "Rows in the companies file. Present only for a companies export.",
                          "example": 25
                        },
                        "conversations": {
                          "type": "number",
                          "description": "Rows in the conversations file. Present only for a conversations export.",
                          "example": 980
                        }
                      },
                      "description": "Rows in the file, keyed by export kind. Null until the file is written."
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the export failed. Null unless `status` is `failed`.",
                      "example": "The export stopped before it finished"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the run was requested.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "finishedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the run completed or failed. Null while it is pending or running.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "expiresAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the file stops being downloadable and is removed: 7 days after a completed run finished. Null for a run that has not completed.",
                      "example": "2026-12-07T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "fileName",
                    "sizeBytes",
                    "entityCounts",
                    "error",
                    "createdAt",
                    "finishedAt",
                    "expiresAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No export run with this ID was started by the caller in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/transfer/export-runs/{runId}/download": {
      "get": {
        "operationId": "listQuillsExportRunsDownload",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "Get a short-lived download URL for a finished export",
        "description": "Returns a presigned URL for the finished CSV file of one of the caller's export runs. The URL expires at `downloadExpiresAt`, set by the storage presign lifetime; request a new one after that. The file itself is removed when the run expires, 7 days after it finished. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The ID of an export run that the caller started.",
              "example": "export_run_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The ID of an export run that the caller started.",
            "name": "runId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Download URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fileName": {
                      "type": "string",
                      "description": "The CSV file name, which the download also uses.",
                      "example": "posts-acme-2026-11-30.csv"
                    },
                    "downloadUrl": {
                      "type": "string",
                      "description": "The presigned URL that downloads the file.",
                      "example": "https://storage.example.com/exports/posts-acme-2026-11-30.csv?X-Amz-Signature=abc123"
                    },
                    "downloadExpiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When `downloadUrl` stops working.",
                      "example": "2026-11-30T15:05:00.000Z"
                    }
                  },
                  "required": [
                    "fileName",
                    "downloadUrl",
                    "downloadExpiresAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No export run with this ID was started by the caller in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The export is still pending or running, failed, or has expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/transfer/full-export": {
      "post": {
        "operationId": "exportQuillsWorkspaceZip",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "Export the full workspace as a portable .zip archive (NDJSON + Markdown KB + manifest)",
        "description": "Builds a standard PKZIP archive containing manifest.json, data/<table>.ndjson for every portable table (redacting secrets and omitting scheduled backup credentials), and articles/<slug>.md for live KB articles, and returns it inline as base64. Operational tables such as events, jobs and rate limits are left out, and attachment bytes are not included. The request builds the whole archive before it answers. Records a completed export run, which appears in `listQuillsExportRuns` but has no downloadable file, and an `export.finished` event. Requires an interactive session (API keys are refused) plus the `manage_settings` and `view_revenue` permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string",
                    "enum": [
                      "zip"
                    ],
                    "description": "The archive format. Only `zip` is supported.",
                    "example": "zip"
                  },
                  "since": {
                    "type": "string",
                    "maxLength": 64,
                    "format": "date-time",
                    "description": "An ISO 8601 date-time with an offset. Only rows created or updated at or after it are exported; rows without a timestamp are always included. Leave it out for a full export.",
                    "example": "2026-11-01T00:00:00Z"
                  }
                },
                "required": [
                  "format"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Portable workspace .zip archive and manifest",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runId": {
                      "type": "string",
                      "description": "The ID of the export run that records this export.",
                      "example": "export_run_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "fileName": {
                      "type": "string",
                      "description": "A suggested file name: the workspace slug and the UTC export date.",
                      "example": "workspace-export-acme-2026-11-30.zip"
                    },
                    "sizeBytes": {
                      "type": "number",
                      "description": "The archive size in bytes, before base64 encoding.",
                      "example": 1048576
                    },
                    "manifest": {
                      "type": "object",
                      "properties": {
                        "format": {
                          "type": "string",
                          "enum": [
                            "kaneo-workspace-zip"
                          ],
                          "description": "The archive format identifier.",
                          "example": "kaneo-workspace-zip"
                        },
                        "version": {
                          "type": "number",
                          "enum": [
                            1
                          ],
                          "description": "The archive format version.",
                          "example": 1
                        },
                        "exportedAt": {
                          "type": "string",
                          "description": "When the archive was built, as an ISO 8601 UTC date-time.",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "since": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The `since` cutoff as an ISO 8601 UTC date-time. Null for a full export.",
                          "example": null
                        },
                        "tables": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "table": {
                                "type": "string",
                                "description": "The database table name.",
                                "example": "posts"
                              },
                              "count": {
                                "type": "number",
                                "description": "Rows exported from the table. A table with 0 rows has no NDJSON file.",
                                "example": 120
                              }
                            },
                            "required": [
                              "table",
                              "count"
                            ]
                          },
                          "description": "Exported row counts per portable table."
                        },
                        "markdownArticleCount": {
                          "type": "number",
                          "description": "Knowledge base articles written as Markdown files under articles/.",
                          "example": 18
                        },
                        "fileCount": {
                          "type": "number",
                          "description": "Attachment files included under files/. This route includes none, so it is 0.",
                          "example": 0
                        }
                      },
                      "required": [
                        "format",
                        "version",
                        "exportedAt",
                        "since",
                        "tables",
                        "markdownArticleCount",
                        "fileCount"
                      ],
                      "description": "A summary of the archive's manifest.json."
                    },
                    "zipBase64": {
                      "type": "string",
                      "description": "The whole .zip archive, base64-encoded.",
                      "example": "UEsDBBQAAAAIAA=="
                    }
                  },
                  "required": [
                    "runId",
                    "fileName",
                    "sizeBytes",
                    "manifest",
                    "zipBase64"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/transfer/export-schedule": {
      "get": {
        "operationId": "getQuillsExportSchedule",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "Get the workspace's scheduled S3/R2 backup configuration",
        "description": "Returns the saved backup schedule without its credentials, or null when none is saved. The schedule is stored, but no job runs scheduled backups yet. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Current backup schedule or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schedule": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The schedule ID, a UUID.",
                          "example": "4f2c9a7e-1b3d-4e5f-8a6b-2c1d0e9f8a7b"
                        },
                        "enabled": {
                          "type": "boolean",
                          "description": "Whether scheduled backups are on.",
                          "example": true
                        },
                        "cadence": {
                          "type": "string",
                          "enum": [
                            "daily",
                            "weekly",
                            "monthly"
                          ],
                          "description": "How often a backup is due: `daily` (every day), `weekly` (every 7 days) or `monthly` (every 30 days).",
                          "example": "weekly"
                        },
                        "destinationEndpoint": {
                          "type": "string",
                          "description": "The S3-compatible endpoint URL of the destination, such as an R2 account endpoint. HTTPS only, with no credentials, query or fragment, and not a loopback, private or cloud metadata address.",
                          "example": "https://0123456789abcdef.r2.cloudflarestorage.com"
                        },
                        "bucket": {
                          "type": "string",
                          "description": "The destination bucket name.",
                          "example": "acme-backups"
                        },
                        "prefix": {
                          "type": "string",
                          "description": "The key prefix that backup objects are written under.",
                          "example": "acme-backups/"
                        },
                        "region": {
                          "type": "string",
                          "description": "The bucket's region. `auto` suits Cloudflare R2.",
                          "example": "auto"
                        },
                        "hasCredentials": {
                          "type": "boolean",
                          "description": "Whether access credentials are stored. The credentials themselves are never returned.",
                          "example": true
                        },
                        "lastRunAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When a scheduled backup last ran. Null when none has run.",
                          "example": null
                        },
                        "nextRunAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the next backup is due: one cadence after the schedule was last saved. Null when the schedule is disabled.",
                          "example": "2026-12-07T14:05:00.000Z"
                        },
                        "lastStatus": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The outcome of the last scheduled backup. Null when none has run.",
                          "example": null
                        },
                        "lastError": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The error of the last scheduled backup. Null when none is recorded.",
                          "example": null
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the schedule was last saved.",
                          "example": "2026-11-30T14:05:00.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "enabled",
                        "cadence",
                        "destinationEndpoint",
                        "bucket",
                        "prefix",
                        "region",
                        "hasCredentials",
                        "lastRunAt",
                        "nextRunAt",
                        "lastStatus",
                        "lastError",
                        "updatedAt"
                      ],
                      "description": "The backup schedule. Null when none is saved."
                    }
                  },
                  "required": [
                    "schedule"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsExportSchedule",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "Configure scheduled S3/R2 workspace exports",
        "description": "Creates or replaces the workspace's backup schedule. Validates the S3/R2 destination URL against HTTPS and SSRF rules (blocks loopback/private/metadata IPs) and encrypts credentials via NOTIFICATION_SECRET_ENCRYPTION_KEY. Credentials are never returned. The schedule is stored, but no job runs scheduled backups yet. Records an `export_schedule.updated` event. Requires an interactive session (API keys are refused) and the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether scheduled backups are on. Default true.",
                    "example": true
                  },
                  "cadence": {
                    "type": "string",
                    "enum": [
                      "daily",
                      "weekly",
                      "monthly"
                    ],
                    "default": "weekly",
                    "description": "How often a backup is due: `daily` (every day), `weekly` (every 7 days) or `monthly` (every 30 days). Default `weekly`.",
                    "example": "weekly"
                  },
                  "destinationEndpoint": {
                    "type": "string",
                    "maxLength": 300,
                    "format": "uri",
                    "description": "The S3-compatible endpoint URL of the destination, such as an R2 account endpoint. HTTPS only, with no credentials, query or fragment, and not a loopback, private or cloud metadata address.",
                    "example": "https://0123456789abcdef.r2.cloudflarestorage.com"
                  },
                  "bucket": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "The destination bucket name.",
                    "example": "acme-backups"
                  },
                  "prefix": {
                    "type": "string",
                    "maxLength": 200,
                    "default": "kaneo-backups/",
                    "description": "The key prefix that backup objects are written under.",
                    "example": "acme-backups/"
                  },
                  "region": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "default": "auto",
                    "description": "The bucket's region. `auto` suits Cloudflare R2. Default `auto`.",
                    "example": "auto"
                  },
                  "accessKey": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 200,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "The access key ID for the bucket, in printable ASCII without spaces. Stored encrypted and never returned.",
                    "example": "AKIAEXAMPLEKEY"
                  },
                  "secretAccessKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 400,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "The secret access key for the bucket, in printable ASCII without spaces. Stored encrypted and never returned.",
                    "example": "exampleSecretAccessKey123"
                  }
                },
                "required": [
                  "destinationEndpoint",
                  "bucket",
                  "accessKey",
                  "secretAccessKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved backup schedule (without plaintext credentials)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schedule": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The schedule ID, a UUID.",
                          "example": "4f2c9a7e-1b3d-4e5f-8a6b-2c1d0e9f8a7b"
                        },
                        "enabled": {
                          "type": "boolean",
                          "description": "Whether scheduled backups are on.",
                          "example": true
                        },
                        "cadence": {
                          "type": "string",
                          "enum": [
                            "daily",
                            "weekly",
                            "monthly"
                          ],
                          "description": "How often a backup is due: `daily` (every day), `weekly` (every 7 days) or `monthly` (every 30 days).",
                          "example": "weekly"
                        },
                        "destinationEndpoint": {
                          "type": "string",
                          "description": "The S3-compatible endpoint URL of the destination, such as an R2 account endpoint. HTTPS only, with no credentials, query or fragment, and not a loopback, private or cloud metadata address.",
                          "example": "https://0123456789abcdef.r2.cloudflarestorage.com"
                        },
                        "bucket": {
                          "type": "string",
                          "description": "The destination bucket name.",
                          "example": "acme-backups"
                        },
                        "prefix": {
                          "type": "string",
                          "description": "The key prefix that backup objects are written under.",
                          "example": "acme-backups/"
                        },
                        "region": {
                          "type": "string",
                          "description": "The bucket's region. `auto` suits Cloudflare R2.",
                          "example": "auto"
                        },
                        "hasCredentials": {
                          "type": "boolean",
                          "description": "Whether access credentials are stored. The credentials themselves are never returned.",
                          "example": true
                        },
                        "lastRunAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When a scheduled backup last ran. Null when none has run.",
                          "example": null
                        },
                        "nextRunAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the next backup is due: one cadence after the schedule was last saved. Null when the schedule is disabled.",
                          "example": "2026-12-07T14:05:00.000Z"
                        },
                        "lastStatus": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The outcome of the last scheduled backup. Null when none has run.",
                          "example": null
                        },
                        "lastError": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The error of the last scheduled backup. Null when none is recorded.",
                          "example": null
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the schedule was last saved.",
                          "example": "2026-11-30T14:05:00.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "enabled",
                        "cadence",
                        "destinationEndpoint",
                        "bucket",
                        "prefix",
                        "region",
                        "hasCredentials",
                        "lastRunAt",
                        "nextRunAt",
                        "lastStatus",
                        "lastError",
                        "updatedAt"
                      ],
                      "description": "The saved schedule."
                    }
                  },
                  "required": [
                    "schedule"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The destination endpoint is not a valid https:// URL, carries credentials, a query or a fragment, or resolves to a disallowed address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY set, so it cannot store the credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsExportSchedule",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "Delete the workspace's scheduled S3/R2 export configuration",
        "description": "Removes the backup schedule and its stored credentials. Deleting when none is saved succeeds with `deleted: false`. Records an `export_schedule.deleted` event when a schedule was removed. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a schedule was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "description": "True when a schedule was removed; false when none was saved.",
                      "example": true
                    }
                  },
                  "required": [
                    "deleted"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/transfer/import-runs/{runId}": {
      "get": {
        "operationId": "getQuillsImportRuns",
        "tags": [
          "Data transfer and jobs"
        ],
        "summary": "Get an import run with its totals and error report",
        "description": "Returns one import run of the workspace with its row counts and error report. Poll it after `createQuillsImport` until `status` is `completed` or `failed`. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The import run ID.",
              "example": "import_run_01m8rxfrbhfzr9r83a29m5ke14"
            },
            "required": true,
            "description": "The import run ID.",
            "name": "runId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Import run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The import run ID.",
                      "example": "import_run_01m8rxfrbhfzr9r83a29m5ke14"
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "csv",
                        "uservoice",
                        "canny",
                        "api"
                      ],
                      "description": "Where the data came from. Runs started with `createQuillsImport` are `csv`; `uservoice`, `canny` and `api` appear on imported history.",
                      "example": "csv"
                    },
                    "fileName": {
                      "type": "string",
                      "description": "The name of the imported file.",
                      "example": "feedback-export.csv"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "dry_run",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "`pending`: queued. `running`: the job is checking and importing rows. `completed`: every valid row was imported. `failed`: nothing was imported; `errorReport` says why. `dry_run` appears only on imported history.",
                      "example": "completed"
                    },
                    "totals": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "rows": {
                          "type": "number",
                          "description": "Data rows in the file.",
                          "example": 250
                        },
                        "created": {
                          "type": "number",
                          "description": "Posts created.",
                          "example": 240
                        },
                        "updated": {
                          "type": "number",
                          "description": "Existing posts updated. CSV imports never update posts, so this is 0.",
                          "example": 0
                        },
                        "skipped": {
                          "type": "number",
                          "description": "Rows skipped because an earlier import already created a post with their `source_id`.",
                          "example": 10
                        },
                        "errors": {
                          "type": "number",
                          "description": "Invalid rows. Any error fails the run and imports nothing.",
                          "example": 0
                        }
                      },
                      "required": [
                        "rows",
                        "created",
                        "updated",
                        "skipped",
                        "errors"
                      ],
                      "description": "Row counts. Null until the job has checked the file."
                    },
                    "errorReport": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "type": "object",
                        "properties": {
                          "row": {
                            "type": "number",
                            "description": "The data row number, starting at 1 for the first row after the header. 0: the error is about the whole file or the target board.",
                            "example": 12
                          },
                          "message": {
                            "type": "string",
                            "description": "What is wrong with the row.",
                            "example": "Unknown status: someday"
                          },
                          "field": {
                            "type": "string",
                            "description": "The column or field at fault, when the error names one.",
                            "example": "status"
                          }
                        },
                        "required": [
                          "row",
                          "message"
                        ]
                      },
                      "description": "The first 100 row errors. Null when there are none or the job has not checked the file yet."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the run was requested.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "finishedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the run completed or failed. Null while it is pending or running.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "source",
                    "fileName",
                    "status",
                    "totals",
                    "errorReport",
                    "createdAt",
                    "finishedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No import run with this ID exists in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/workflows/order": {
      "put": {
        "operationId": "reorderQuillsWorkflows",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Reorder all workflows",
        "description": "Sets the run order of every workflow that is not deleted. Send each workflow ID once, in the new order; runs that one event starts are queued in this order. A partial or stale list changes nothing. Records a `workflow.reordered` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workflowIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `workflow` prefix. Requests also accept the bare UUID.",
                      "example": "workflow_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 200,
                    "description": "Every workflow that is not deleted, first to last, each ID once.",
                    "example": [
                      "workflow_01m8rxfrbhfzr9r837k90wcggm",
                      "workflow_01m8rxfrbhfzr9r83a29m5ke14"
                    ]
                  }
                },
                "required": [
                  "workflowIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workflowIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The workflow IDs in their new run order.",
                      "example": [
                        "workflow_01m8rxfrbhfzr9r837k90wcggm",
                        "workflow_01m8rxfrbhfzr9r83a29m5ke14"
                      ]
                    }
                  },
                  "required": [
                    "workflowIds"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "An ID does not name a workflow of this workspace that is not deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The list leaves out a workflow that is not deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/workflows": {
      "get": {
        "operationId": "listQuillsWorkflows",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "List workflows",
        "description": "Lists the workspace's workflows in run order (`sortOrder`, then creation time), up to 200. Deleted workflows are left out. Not paginated. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The workflows in run order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workflows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The workflow ID.",
                            "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "name": {
                            "type": "string",
                            "description": "The workflow's display name.",
                            "example": "Route billing questions"
                          },
                          "class": {
                            "type": "string",
                            "description": "How the workflow runs. Workflows created through the API are `background`: they change the conversation without messaging the customer. An imported workflow can be `customer_facing`.",
                            "example": "background"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "live",
                              "paused"
                            ],
                            "description": "`draft`: saved but never runs. `live`: runs on its trigger. `paused`: kept but does not run.",
                            "example": "live"
                          },
                          "sortOrder": {
                            "type": "number",
                            "description": "The position in run order, lowest first. Runs that one event starts are queued in this order.",
                            "example": 0
                          },
                          "triggerType": {
                            "type": "string",
                            "description": "The event that starts the workflow, for example `conversation.priority_changed`. An imported workflow can hold a trigger that is not available; it cannot be published.",
                            "example": "message.created"
                          },
                          "graph": {
                            "type": "object",
                            "properties": {
                              "nodes": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                      "example": "assign-billing"
                                    },
                                    "type": {
                                      "type": "string",
                                      "description": "The step kind. `trigger`: the entry step. `action`: applies `action`. `condition`: stops the run unless `condition` holds. `branch`: follows the first path in `branches` whose condition holds.",
                                      "example": "action"
                                    },
                                    "action": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "description": "The action: `assign_agent`, `assign_team`, `add_tag`, `set_priority`, `snooze`, `close` or `reopen`.",
                                          "example": "assign_team"
                                        },
                                        "principalId": {
                                          "type": "string",
                                          "description": "`assign_agent` only. The teammate principal to assign the conversation to. It must be a current member of the workspace.",
                                          "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                                        },
                                        "teamId": {
                                          "type": "string",
                                          "description": "`assign_team` only. The team to assign the conversation to. It must exist and not be deleted.",
                                          "example": "team_01m8rxfrbhfzr9r83a29m5ke14"
                                        },
                                        "tagId": {
                                          "type": "string",
                                          "description": "`add_tag` only. The conversation tag to add. It must exist and not be deleted.",
                                          "example": "conversation_tag_01m8rxfrbhfzr9r83gw2ecw92z"
                                        },
                                        "priority": {
                                          "type": "string",
                                          "description": "`set_priority` only. The priority to set: `none`, `low`, `medium`, `high` or `urgent`.",
                                          "example": "high"
                                        },
                                        "seconds": {
                                          "type": "number",
                                          "description": "`snooze` only. How long to snooze the conversation, in seconds from the moment the run applies the action.",
                                          "example": 3600
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "description": "Action steps only: the action to apply."
                                    },
                                    "condition": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      },
                                      "description": "Condition steps only. A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                    },
                                    "branches": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string",
                                            "description": "The path's key, unique within its branch step. An edge leaving the branch step names it in `branch`.",
                                            "example": "billing"
                                          },
                                          "condition": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    },
                                                    "all": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "field": {
                                                            "type": "string",
                                                            "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                            "example": "message.body"
                                                          },
                                                          "op": {
                                                            "type": "string",
                                                            "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                            "example": "contains_any"
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ],
                                                            "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                            "example": "urgent"
                                                          },
                                                          "values": {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            },
                                                            "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                            "example": [
                                                              "refund"
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "description": "Conditions that must all hold. Missing or empty: no requirement."
                                                    },
                                                    "any": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "field": {
                                                            "type": "string",
                                                            "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                            "example": "message.body"
                                                          },
                                                          "op": {
                                                            "type": "string",
                                                            "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                            "example": "contains_any"
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ],
                                                            "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                            "example": "urgent"
                                                          },
                                                          "values": {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            },
                                                            "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                            "example": [
                                                              "refund"
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    },
                                                    "all": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "field": {
                                                            "type": "string",
                                                            "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                            "example": "message.body"
                                                          },
                                                          "op": {
                                                            "type": "string",
                                                            "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                            "example": "contains_any"
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ],
                                                            "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                            "example": "urgent"
                                                          },
                                                          "values": {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            },
                                                            "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                            "example": [
                                                              "refund"
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "description": "Conditions that must all hold. Missing or empty: no requirement."
                                                    },
                                                    "any": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "object",
                                                        "properties": {
                                                          "field": {
                                                            "type": "string",
                                                            "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                            "example": "message.body"
                                                          },
                                                          "op": {
                                                            "type": "string",
                                                            "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                            "example": "contains_any"
                                                          },
                                                          "value": {
                                                            "anyOf": [
                                                              {
                                                                "type": "string"
                                                              },
                                                              {
                                                                "type": "number"
                                                              },
                                                              {
                                                                "type": "boolean"
                                                              },
                                                              {
                                                                "type": "null"
                                                              }
                                                            ],
                                                            "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                            "example": "urgent"
                                                          },
                                                          "values": {
                                                            "type": "array",
                                                            "items": {
                                                              "type": "string"
                                                            },
                                                            "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                            "example": [
                                                              "refund"
                                                            ]
                                                          }
                                                        }
                                                      },
                                                      "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            },
                                            "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "condition"
                                        ]
                                      },
                                      "description": "Branch steps only. The paths of a branch step, checked in order. The run follows the edge of the first path whose condition holds; when none holds, the run stops."
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type"
                                  ]
                                },
                                "description": "The steps. A run starts at the `trigger` step and follows one edge at a time until no edge leads on or a step stops it. Reaching a step a second time ends the run."
                              },
                              "edges": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "from": {
                                      "type": "string",
                                      "description": "The ID of the step the edge leaves.",
                                      "example": "trigger"
                                    },
                                    "to": {
                                      "type": "string",
                                      "description": "The ID of the step the edge leads to.",
                                      "example": "assign-billing"
                                    },
                                    "branch": {
                                      "type": "string",
                                      "description": "The key of the branch path this edge follows, for an edge that leaves a branch step. Leave it out for every other step.",
                                      "example": "billing"
                                    }
                                  },
                                  "required": [
                                    "from",
                                    "to"
                                  ]
                                },
                                "description": "The connections between steps. A step without an outgoing edge ends the run."
                              }
                            },
                            "required": [
                              "nodes",
                              "edges"
                            ],
                            "description": "The workflow's steps and edges. A stored graph that does not fit this shape, such as an imported one, reads as empty."
                          },
                          "actorPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The teammate principal the workflow acts as when it runs: the author of its newest version. Null when no author is on record, for example after that principal was deleted; a live workflow without one fails each run as denied.",
                            "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the workflow was created.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the workflow's name, trigger, graph or status last changed.",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "class",
                          "status",
                          "sortOrder",
                          "triggerType",
                          "graph",
                          "actorPrincipalId",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "The workflows that are not deleted, in run order (sort order, then creation time), at most 200"
                    }
                  },
                  "required": [
                    "workflows"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsWorkflow",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Create a draft workflow",
        "description": "Creates a `background` workflow in `draft` status at the end of the run order. Every teammate, team and tag that an action names must exist in the workspace. A draft never runs; publish it to make it live. Writes the first version with the caller as its author, so the caller becomes the teammate the workflow acts as. Records a `workflow.created` event. Requires the `manage_settings` and `update` permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "The workflow's display name.",
                    "example": "Route billing questions"
                  },
                  "triggerType": {
                    "type": "string",
                    "enum": [
                      "conversation.status_changed",
                      "conversation.assigned",
                      "conversation.priority_changed",
                      "conversation.attribute_changed",
                      "conversation.tags_changed",
                      "message.created",
                      "message.note_created"
                    ],
                    "description": "The event that starts the workflow. `conversation.status_changed`, `conversation.assigned`, `conversation.priority_changed`, `conversation.attribute_changed` and `conversation.tags_changed`: the conversation's status, assignment, priority, a custom attribute or its tags changed. `message.created`: a new message. `message.note_created`: a new private note. Changes that a workflow run or a scheduled sweep makes never start a run.",
                    "example": "message.created"
                  },
                  "graph": {
                    "type": "object",
                    "properties": {
                      "nodes": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                  "example": "assign-billing"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "trigger"
                                  ],
                                  "description": "The entry step. Every run starts here."
                                }
                              },
                              "required": [
                                "id",
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                  "example": "assign-billing"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "action"
                                  ],
                                  "description": "A step that applies `action` and moves on."
                                },
                                "action": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "assign_agent"
                                          ],
                                          "description": "Assigns the conversation to a teammate."
                                        },
                                        "principalId": {
                                          "type": "string",
                                          "description": "The teammate principal to assign the conversation to. It must be a current member of the workspace.",
                                          "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "principalId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "assign_team"
                                          ],
                                          "description": "Assigns the conversation to a team."
                                        },
                                        "teamId": {
                                          "type": "string",
                                          "description": "The team to assign the conversation to. It must exist and not be deleted.",
                                          "example": "team_01m8rxfrbhfzr9r83a29m5ke14"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "teamId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "add_tag"
                                          ],
                                          "description": "Adds a tag to the conversation."
                                        },
                                        "tagId": {
                                          "type": "string",
                                          "description": "The conversation tag to add. It must exist and not be deleted.",
                                          "example": "conversation_tag_01m8rxfrbhfzr9r83gw2ecw92z"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "tagId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "set_priority"
                                          ],
                                          "description": "Sets the conversation's priority."
                                        },
                                        "priority": {
                                          "type": "string",
                                          "enum": [
                                            "none",
                                            "low",
                                            "medium",
                                            "high",
                                            "urgent"
                                          ],
                                          "description": "The priority to set: `none`, `low`, `medium`, `high` or `urgent`.",
                                          "example": "high"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "priority"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "snooze"
                                          ],
                                          "description": "Snoozes the conversation."
                                        },
                                        "seconds": {
                                          "type": "integer",
                                          "minimum": 60,
                                          "maximum": 7776000,
                                          "description": "How long to snooze the conversation, in seconds from the moment the run applies the action.",
                                          "example": 3600
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "seconds"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "close"
                                          ],
                                          "description": "Closes the conversation. When a required-to-close attribute is empty, the run fails and none of its actions apply."
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "reopen"
                                          ],
                                          "description": "Sets the conversation's status to open."
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ],
                                  "description": "The action to apply."
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "action"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                  "example": "assign-billing"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "condition"
                                  ],
                                  "description": "A step that stops the run unless `condition` holds. Actions already applied stay."
                                },
                                "condition": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "conversation.status",
                                                "conversation.channel",
                                                "conversation.priority",
                                                "conversation.tags",
                                                "conversation.team",
                                                "message.body",
                                                "message.sender"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "maxLength": 200
                                            }
                                          ],
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "enum": [
                                            "eq",
                                            "neq",
                                            "contains",
                                            "not_contains",
                                            "contains_any",
                                            "contains_all",
                                            "gt",
                                            "gte",
                                            "lt",
                                            "lte",
                                            "includes_any",
                                            "excludes_all",
                                            "is_set",
                                            "is_empty"
                                          ],
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "maxLength": 200
                                          },
                                          "maxItems": 50,
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund",
                                            "chargeback"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "field",
                                        "op"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "field": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "conversation.status",
                                                          "conversation.channel",
                                                          "conversation.priority",
                                                          "conversation.tags",
                                                          "conversation.team",
                                                          "message.body",
                                                          "message.sender"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "maxLength": 200
                                                      }
                                                    ],
                                                    "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                    "example": "message.body"
                                                  },
                                                  "op": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "neq",
                                                      "contains",
                                                      "not_contains",
                                                      "contains_any",
                                                      "contains_all",
                                                      "gt",
                                                      "gte",
                                                      "lt",
                                                      "lte",
                                                      "includes_any",
                                                      "excludes_all",
                                                      "is_set",
                                                      "is_empty"
                                                    ],
                                                    "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                    "example": "contains_any"
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ],
                                                    "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                    "example": "urgent"
                                                  },
                                                  "values": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 200
                                                    },
                                                    "maxItems": 50,
                                                    "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                    "example": [
                                                      "refund",
                                                      "chargeback"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "field",
                                                  "op"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "all": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    "maxItems": 10,
                                                    "description": "Conditions that must all hold. Missing or empty: no requirement."
                                                  },
                                                  "any": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    "maxItems": 10,
                                                    "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                                  }
                                                },
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          "maxItems": 10,
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "field": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "conversation.status",
                                                          "conversation.channel",
                                                          "conversation.priority",
                                                          "conversation.tags",
                                                          "conversation.team",
                                                          "message.body",
                                                          "message.sender"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "maxLength": 200
                                                      }
                                                    ],
                                                    "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                    "example": "message.body"
                                                  },
                                                  "op": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "neq",
                                                      "contains",
                                                      "not_contains",
                                                      "contains_any",
                                                      "contains_all",
                                                      "gt",
                                                      "gte",
                                                      "lt",
                                                      "lte",
                                                      "includes_any",
                                                      "excludes_all",
                                                      "is_set",
                                                      "is_empty"
                                                    ],
                                                    "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                    "example": "contains_any"
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ],
                                                    "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                    "example": "urgent"
                                                  },
                                                  "values": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 200
                                                    },
                                                    "maxItems": 50,
                                                    "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                    "example": [
                                                      "refund",
                                                      "chargeback"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "field",
                                                  "op"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "all": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    "maxItems": 10,
                                                    "description": "Conditions that must all hold. Missing or empty: no requirement."
                                                  },
                                                  "any": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    "maxItems": 10,
                                                    "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                                  }
                                                },
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          "maxItems": 10,
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  ],
                                  "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "condition"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                  "example": "assign-billing"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "branch"
                                  ],
                                  "description": "A step that picks one of several paths."
                                },
                                "branches": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64,
                                        "description": "The path's key, unique within its branch step. An edge leaving the branch step names it in `branch`.",
                                        "example": "billing"
                                      },
                                      "condition": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "conversation.status",
                                                      "conversation.channel",
                                                      "conversation.priority",
                                                      "conversation.tags",
                                                      "conversation.team",
                                                      "message.body",
                                                      "message.sender"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "maxLength": 200
                                                  }
                                                ],
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "enum": [
                                                  "eq",
                                                  "neq",
                                                  "contains",
                                                  "not_contains",
                                                  "contains_any",
                                                  "contains_all",
                                                  "gt",
                                                  "gte",
                                                  "lt",
                                                  "lte",
                                                  "includes_any",
                                                  "excludes_all",
                                                  "is_set",
                                                  "is_empty"
                                                ],
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string",
                                                  "maxLength": 200
                                                },
                                                "maxItems": 50,
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund",
                                                  "chargeback"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "field",
                                              "op"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "all": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "field": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "conversation.status",
                                                                      "conversation.channel",
                                                                      "conversation.priority",
                                                                      "conversation.tags",
                                                                      "conversation.team",
                                                                      "message.body",
                                                                      "message.sender"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 200
                                                                  }
                                                                ],
                                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                                "example": "message.body"
                                                              },
                                                              "op": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "neq",
                                                                  "contains",
                                                                  "not_contains",
                                                                  "contains_any",
                                                                  "contains_all",
                                                                  "gt",
                                                                  "gte",
                                                                  "lt",
                                                                  "lte",
                                                                  "includes_any",
                                                                  "excludes_all",
                                                                  "is_set",
                                                                  "is_empty"
                                                                ],
                                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                                "example": "contains_any"
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  },
                                                                  {
                                                                    "type": "number"
                                                                  },
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ],
                                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                                "example": "urgent"
                                                              },
                                                              "values": {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 200
                                                                },
                                                                "maxItems": 50,
                                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                                "example": [
                                                                  "refund",
                                                                  "chargeback"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "field",
                                                              "op"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          "maxItems": 10,
                                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                                        },
                                                        "any": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "field": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "conversation.status",
                                                                      "conversation.channel",
                                                                      "conversation.priority",
                                                                      "conversation.tags",
                                                                      "conversation.team",
                                                                      "message.body",
                                                                      "message.sender"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 200
                                                                  }
                                                                ],
                                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                                "example": "message.body"
                                                              },
                                                              "op": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "neq",
                                                                  "contains",
                                                                  "not_contains",
                                                                  "contains_any",
                                                                  "contains_all",
                                                                  "gt",
                                                                  "gte",
                                                                  "lt",
                                                                  "lte",
                                                                  "includes_any",
                                                                  "excludes_all",
                                                                  "is_set",
                                                                  "is_empty"
                                                                ],
                                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                                "example": "contains_any"
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  },
                                                                  {
                                                                    "type": "number"
                                                                  },
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ],
                                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                                "example": "urgent"
                                                              },
                                                              "values": {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 200
                                                                },
                                                                "maxItems": 50,
                                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                                "example": [
                                                                  "refund",
                                                                  "chargeback"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "field",
                                                              "op"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          "maxItems": 10,
                                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                                        }
                                                      },
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                },
                                                "maxItems": 10,
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "all": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "field": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "conversation.status",
                                                                      "conversation.channel",
                                                                      "conversation.priority",
                                                                      "conversation.tags",
                                                                      "conversation.team",
                                                                      "message.body",
                                                                      "message.sender"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 200
                                                                  }
                                                                ],
                                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                                "example": "message.body"
                                                              },
                                                              "op": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "neq",
                                                                  "contains",
                                                                  "not_contains",
                                                                  "contains_any",
                                                                  "contains_all",
                                                                  "gt",
                                                                  "gte",
                                                                  "lt",
                                                                  "lte",
                                                                  "includes_any",
                                                                  "excludes_all",
                                                                  "is_set",
                                                                  "is_empty"
                                                                ],
                                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                                "example": "contains_any"
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  },
                                                                  {
                                                                    "type": "number"
                                                                  },
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ],
                                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                                "example": "urgent"
                                                              },
                                                              "values": {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 200
                                                                },
                                                                "maxItems": 50,
                                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                                "example": [
                                                                  "refund",
                                                                  "chargeback"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "field",
                                                              "op"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          "maxItems": 10,
                                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                                        },
                                                        "any": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "field": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "conversation.status",
                                                                      "conversation.channel",
                                                                      "conversation.priority",
                                                                      "conversation.tags",
                                                                      "conversation.team",
                                                                      "message.body",
                                                                      "message.sender"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 200
                                                                  }
                                                                ],
                                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                                "example": "message.body"
                                                              },
                                                              "op": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "neq",
                                                                  "contains",
                                                                  "not_contains",
                                                                  "contains_any",
                                                                  "contains_all",
                                                                  "gt",
                                                                  "gte",
                                                                  "lt",
                                                                  "lte",
                                                                  "includes_any",
                                                                  "excludes_all",
                                                                  "is_set",
                                                                  "is_empty"
                                                                ],
                                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                                "example": "contains_any"
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  },
                                                                  {
                                                                    "type": "number"
                                                                  },
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ],
                                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                                "example": "urgent"
                                                              },
                                                              "values": {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 200
                                                                },
                                                                "maxItems": 50,
                                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                                "example": [
                                                                  "refund",
                                                                  "chargeback"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "field",
                                                              "op"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          "maxItems": 10,
                                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                                        }
                                                      },
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                },
                                                "maxItems": 10,
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "condition"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "minItems": 1,
                                  "maxItems": 10,
                                  "description": "The paths of a branch step, checked in order. The run follows the edge of the first path whose condition holds; when none holds, the run stops."
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "branches"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "maxItems": 100,
                        "description": "The steps. A run starts at the `trigger` step and follows one edge at a time until no edge leads on or a step stops it. Reaching a step a second time ends the run."
                      },
                      "edges": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "description": "The ID of the step the edge leaves.",
                              "example": "trigger"
                            },
                            "to": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "description": "The ID of the step the edge leads to.",
                              "example": "assign-billing"
                            },
                            "branch": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "description": "The key of the branch path this edge follows, for an edge that leaves a branch step. Leave it out for every other step.",
                              "example": "billing"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "maxItems": 200,
                        "description": "The connections between steps. A step without an outgoing edge ends the run."
                      }
                    },
                    "default": {
                      "nodes": [],
                      "edges": []
                    },
                    "required": [
                      "nodes",
                      "edges"
                    ],
                    "additionalProperties": false,
                    "description": "The workflow's steps and the edges between them. Default: no steps."
                  }
                },
                "required": [
                  "name",
                  "triggerType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created workflow",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The workflow ID.",
                      "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "name": {
                      "type": "string",
                      "description": "The workflow's display name.",
                      "example": "Route billing questions"
                    },
                    "class": {
                      "type": "string",
                      "description": "How the workflow runs. Workflows created through the API are `background`: they change the conversation without messaging the customer. An imported workflow can be `customer_facing`.",
                      "example": "background"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "live",
                        "paused"
                      ],
                      "description": "`draft`: saved but never runs. `live`: runs on its trigger. `paused`: kept but does not run.",
                      "example": "live"
                    },
                    "sortOrder": {
                      "type": "number",
                      "description": "The position in run order, lowest first. Runs that one event starts are queued in this order.",
                      "example": 0
                    },
                    "triggerType": {
                      "type": "string",
                      "description": "The event that starts the workflow, for example `conversation.priority_changed`. An imported workflow can hold a trigger that is not available; it cannot be published.",
                      "example": "message.created"
                    },
                    "graph": {
                      "type": "object",
                      "properties": {
                        "nodes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                "example": "assign-billing"
                              },
                              "type": {
                                "type": "string",
                                "description": "The step kind. `trigger`: the entry step. `action`: applies `action`. `condition`: stops the run unless `condition` holds. `branch`: follows the first path in `branches` whose condition holds.",
                                "example": "action"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "The action: `assign_agent`, `assign_team`, `add_tag`, `set_priority`, `snooze`, `close` or `reopen`.",
                                    "example": "assign_team"
                                  },
                                  "principalId": {
                                    "type": "string",
                                    "description": "`assign_agent` only. The teammate principal to assign the conversation to. It must be a current member of the workspace.",
                                    "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                                  },
                                  "teamId": {
                                    "type": "string",
                                    "description": "`assign_team` only. The team to assign the conversation to. It must exist and not be deleted.",
                                    "example": "team_01m8rxfrbhfzr9r83a29m5ke14"
                                  },
                                  "tagId": {
                                    "type": "string",
                                    "description": "`add_tag` only. The conversation tag to add. It must exist and not be deleted.",
                                    "example": "conversation_tag_01m8rxfrbhfzr9r83gw2ecw92z"
                                  },
                                  "priority": {
                                    "type": "string",
                                    "description": "`set_priority` only. The priority to set: `none`, `low`, `medium`, `high` or `urgent`.",
                                    "example": "high"
                                  },
                                  "seconds": {
                                    "type": "number",
                                    "description": "`snooze` only. How long to snooze the conversation, in seconds from the moment the run applies the action.",
                                    "example": 3600
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "description": "Action steps only: the action to apply."
                              },
                              "condition": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                    "example": "message.body"
                                  },
                                  "op": {
                                    "type": "string",
                                    "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                    "example": "contains_any"
                                  },
                                  "value": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                    "example": "urgent"
                                  },
                                  "values": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                    "example": [
                                      "refund"
                                    ]
                                  },
                                  "all": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions that must all hold. Missing or empty: no requirement."
                                  },
                                  "any": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                  }
                                },
                                "description": "Condition steps only. A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                              },
                              "branches": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string",
                                      "description": "The path's key, unique within its branch step. An edge leaving the branch step names it in `branch`.",
                                      "example": "billing"
                                    },
                                    "condition": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      },
                                      "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "condition"
                                  ]
                                },
                                "description": "Branch steps only. The paths of a branch step, checked in order. The run follows the edge of the first path whose condition holds; when none holds, the run stops."
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ]
                          },
                          "description": "The steps. A run starts at the `trigger` step and follows one edge at a time until no edge leads on or a step stops it. Reaching a step a second time ends the run."
                        },
                        "edges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "type": "string",
                                "description": "The ID of the step the edge leaves.",
                                "example": "trigger"
                              },
                              "to": {
                                "type": "string",
                                "description": "The ID of the step the edge leads to.",
                                "example": "assign-billing"
                              },
                              "branch": {
                                "type": "string",
                                "description": "The key of the branch path this edge follows, for an edge that leaves a branch step. Leave it out for every other step.",
                                "example": "billing"
                              }
                            },
                            "required": [
                              "from",
                              "to"
                            ]
                          },
                          "description": "The connections between steps. A step without an outgoing edge ends the run."
                        }
                      },
                      "required": [
                        "nodes",
                        "edges"
                      ],
                      "description": "The workflow's steps and edges. A stored graph that does not fit this shape, such as an imported one, reads as empty."
                    },
                    "actorPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The teammate principal the workflow acts as when it runs: the author of its newest version. Null when no author is on record, for example after that principal was deleted; a live workflow without one fails each run as denied.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow was created.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow's name, trigger, graph or status last changed.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "class",
                    "status",
                    "sortOrder",
                    "triggerType",
                    "graph",
                    "actorPrincipalId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A teammate, team or tag that an action names is not in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/workflows/{workflowId}": {
      "get": {
        "operationId": "getQuillsWorkflow",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Get a workflow",
        "description": "Returns one workflow with its graph and the teammate it acts as. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The workflow ID. A deleted workflow is not found.",
              "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The workflow ID. A deleted workflow is not found.",
            "name": "workflowId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The workflow",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The workflow ID.",
                      "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "name": {
                      "type": "string",
                      "description": "The workflow's display name.",
                      "example": "Route billing questions"
                    },
                    "class": {
                      "type": "string",
                      "description": "How the workflow runs. Workflows created through the API are `background`: they change the conversation without messaging the customer. An imported workflow can be `customer_facing`.",
                      "example": "background"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "live",
                        "paused"
                      ],
                      "description": "`draft`: saved but never runs. `live`: runs on its trigger. `paused`: kept but does not run.",
                      "example": "live"
                    },
                    "sortOrder": {
                      "type": "number",
                      "description": "The position in run order, lowest first. Runs that one event starts are queued in this order.",
                      "example": 0
                    },
                    "triggerType": {
                      "type": "string",
                      "description": "The event that starts the workflow, for example `conversation.priority_changed`. An imported workflow can hold a trigger that is not available; it cannot be published.",
                      "example": "message.created"
                    },
                    "graph": {
                      "type": "object",
                      "properties": {
                        "nodes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                "example": "assign-billing"
                              },
                              "type": {
                                "type": "string",
                                "description": "The step kind. `trigger`: the entry step. `action`: applies `action`. `condition`: stops the run unless `condition` holds. `branch`: follows the first path in `branches` whose condition holds.",
                                "example": "action"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "The action: `assign_agent`, `assign_team`, `add_tag`, `set_priority`, `snooze`, `close` or `reopen`.",
                                    "example": "assign_team"
                                  },
                                  "principalId": {
                                    "type": "string",
                                    "description": "`assign_agent` only. The teammate principal to assign the conversation to. It must be a current member of the workspace.",
                                    "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                                  },
                                  "teamId": {
                                    "type": "string",
                                    "description": "`assign_team` only. The team to assign the conversation to. It must exist and not be deleted.",
                                    "example": "team_01m8rxfrbhfzr9r83a29m5ke14"
                                  },
                                  "tagId": {
                                    "type": "string",
                                    "description": "`add_tag` only. The conversation tag to add. It must exist and not be deleted.",
                                    "example": "conversation_tag_01m8rxfrbhfzr9r83gw2ecw92z"
                                  },
                                  "priority": {
                                    "type": "string",
                                    "description": "`set_priority` only. The priority to set: `none`, `low`, `medium`, `high` or `urgent`.",
                                    "example": "high"
                                  },
                                  "seconds": {
                                    "type": "number",
                                    "description": "`snooze` only. How long to snooze the conversation, in seconds from the moment the run applies the action.",
                                    "example": 3600
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "description": "Action steps only: the action to apply."
                              },
                              "condition": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                    "example": "message.body"
                                  },
                                  "op": {
                                    "type": "string",
                                    "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                    "example": "contains_any"
                                  },
                                  "value": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                    "example": "urgent"
                                  },
                                  "values": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                    "example": [
                                      "refund"
                                    ]
                                  },
                                  "all": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions that must all hold. Missing or empty: no requirement."
                                  },
                                  "any": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                  }
                                },
                                "description": "Condition steps only. A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                              },
                              "branches": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string",
                                      "description": "The path's key, unique within its branch step. An edge leaving the branch step names it in `branch`.",
                                      "example": "billing"
                                    },
                                    "condition": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      },
                                      "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "condition"
                                  ]
                                },
                                "description": "Branch steps only. The paths of a branch step, checked in order. The run follows the edge of the first path whose condition holds; when none holds, the run stops."
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ]
                          },
                          "description": "The steps. A run starts at the `trigger` step and follows one edge at a time until no edge leads on or a step stops it. Reaching a step a second time ends the run."
                        },
                        "edges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "type": "string",
                                "description": "The ID of the step the edge leaves.",
                                "example": "trigger"
                              },
                              "to": {
                                "type": "string",
                                "description": "The ID of the step the edge leads to.",
                                "example": "assign-billing"
                              },
                              "branch": {
                                "type": "string",
                                "description": "The key of the branch path this edge follows, for an edge that leaves a branch step. Leave it out for every other step.",
                                "example": "billing"
                              }
                            },
                            "required": [
                              "from",
                              "to"
                            ]
                          },
                          "description": "The connections between steps. A step without an outgoing edge ends the run."
                        }
                      },
                      "required": [
                        "nodes",
                        "edges"
                      ],
                      "description": "The workflow's steps and edges. A stored graph that does not fit this shape, such as an imported one, reads as empty."
                    },
                    "actorPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The teammate principal the workflow acts as when it runs: the author of its newest version. Null when no author is on record, for example after that principal was deleted; a live workflow without one fails each run as denied.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow was created.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow's name, trigger, graph or status last changed.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "class",
                    "status",
                    "sortOrder",
                    "triggerType",
                    "graph",
                    "actorPrincipalId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The workflow does not exist or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsWorkflow",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Update a workflow",
        "description": "Changes the fields sent; the status does not change. A request that changes nothing writes nothing and returns `changed: false`. A change writes a version with the caller as its author, so a live workflow then acts as the caller: an edit never runs with another teammate's permissions. Records a `workflow.updated` event when something changed. Requires the `manage_settings` and `update` permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The workflow ID. A deleted workflow is not found.",
              "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The workflow ID. A deleted workflow is not found.",
            "name": "workflowId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "The workflow's display name. Leave it out to keep the current name.",
                    "example": "Route billing questions"
                  },
                  "triggerType": {
                    "type": "string",
                    "enum": [
                      "conversation.status_changed",
                      "conversation.assigned",
                      "conversation.priority_changed",
                      "conversation.attribute_changed",
                      "conversation.tags_changed",
                      "message.created",
                      "message.note_created"
                    ],
                    "description": "The event that starts the workflow. `conversation.status_changed`, `conversation.assigned`, `conversation.priority_changed`, `conversation.attribute_changed` and `conversation.tags_changed`: the conversation's status, assignment, priority, a custom attribute or its tags changed. `message.created`: a new message. `message.note_created`: a new private note. Changes that a workflow run or a scheduled sweep makes never start a run. Leave it out to keep the current trigger.",
                    "example": "message.created"
                  },
                  "graph": {
                    "type": "object",
                    "properties": {
                      "nodes": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                  "example": "assign-billing"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "trigger"
                                  ],
                                  "description": "The entry step. Every run starts here."
                                }
                              },
                              "required": [
                                "id",
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                  "example": "assign-billing"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "action"
                                  ],
                                  "description": "A step that applies `action` and moves on."
                                },
                                "action": {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "assign_agent"
                                          ],
                                          "description": "Assigns the conversation to a teammate."
                                        },
                                        "principalId": {
                                          "type": "string",
                                          "description": "The teammate principal to assign the conversation to. It must be a current member of the workspace.",
                                          "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "principalId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "assign_team"
                                          ],
                                          "description": "Assigns the conversation to a team."
                                        },
                                        "teamId": {
                                          "type": "string",
                                          "description": "The team to assign the conversation to. It must exist and not be deleted.",
                                          "example": "team_01m8rxfrbhfzr9r83a29m5ke14"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "teamId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "add_tag"
                                          ],
                                          "description": "Adds a tag to the conversation."
                                        },
                                        "tagId": {
                                          "type": "string",
                                          "description": "The conversation tag to add. It must exist and not be deleted.",
                                          "example": "conversation_tag_01m8rxfrbhfzr9r83gw2ecw92z"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "tagId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "set_priority"
                                          ],
                                          "description": "Sets the conversation's priority."
                                        },
                                        "priority": {
                                          "type": "string",
                                          "enum": [
                                            "none",
                                            "low",
                                            "medium",
                                            "high",
                                            "urgent"
                                          ],
                                          "description": "The priority to set: `none`, `low`, `medium`, `high` or `urgent`.",
                                          "example": "high"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "priority"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "snooze"
                                          ],
                                          "description": "Snoozes the conversation."
                                        },
                                        "seconds": {
                                          "type": "integer",
                                          "minimum": 60,
                                          "maximum": 7776000,
                                          "description": "How long to snooze the conversation, in seconds from the moment the run applies the action.",
                                          "example": 3600
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "seconds"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "close"
                                          ],
                                          "description": "Closes the conversation. When a required-to-close attribute is empty, the run fails and none of its actions apply."
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "reopen"
                                          ],
                                          "description": "Sets the conversation's status to open."
                                        }
                                      },
                                      "required": [
                                        "type"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ],
                                  "description": "The action to apply."
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "action"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                  "example": "assign-billing"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "condition"
                                  ],
                                  "description": "A step that stops the run unless `condition` holds. Actions already applied stay."
                                },
                                "condition": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "enum": [
                                                "conversation.status",
                                                "conversation.channel",
                                                "conversation.priority",
                                                "conversation.tags",
                                                "conversation.team",
                                                "message.body",
                                                "message.sender"
                                              ]
                                            },
                                            {
                                              "type": "string",
                                              "maxLength": 200
                                            }
                                          ],
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "enum": [
                                            "eq",
                                            "neq",
                                            "contains",
                                            "not_contains",
                                            "contains_any",
                                            "contains_all",
                                            "gt",
                                            "gte",
                                            "lt",
                                            "lte",
                                            "includes_any",
                                            "excludes_all",
                                            "is_set",
                                            "is_empty"
                                          ],
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string",
                                              "maxLength": 500
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string",
                                            "maxLength": 200
                                          },
                                          "maxItems": 50,
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund",
                                            "chargeback"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "field",
                                        "op"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "field": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "conversation.status",
                                                          "conversation.channel",
                                                          "conversation.priority",
                                                          "conversation.tags",
                                                          "conversation.team",
                                                          "message.body",
                                                          "message.sender"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "maxLength": 200
                                                      }
                                                    ],
                                                    "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                    "example": "message.body"
                                                  },
                                                  "op": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "neq",
                                                      "contains",
                                                      "not_contains",
                                                      "contains_any",
                                                      "contains_all",
                                                      "gt",
                                                      "gte",
                                                      "lt",
                                                      "lte",
                                                      "includes_any",
                                                      "excludes_all",
                                                      "is_set",
                                                      "is_empty"
                                                    ],
                                                    "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                    "example": "contains_any"
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ],
                                                    "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                    "example": "urgent"
                                                  },
                                                  "values": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 200
                                                    },
                                                    "maxItems": 50,
                                                    "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                    "example": [
                                                      "refund",
                                                      "chargeback"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "field",
                                                  "op"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "all": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    "maxItems": 10,
                                                    "description": "Conditions that must all hold. Missing or empty: no requirement."
                                                  },
                                                  "any": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    "maxItems": 10,
                                                    "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                                  }
                                                },
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          "maxItems": 10,
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "field": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "enum": [
                                                          "conversation.status",
                                                          "conversation.channel",
                                                          "conversation.priority",
                                                          "conversation.tags",
                                                          "conversation.team",
                                                          "message.body",
                                                          "message.sender"
                                                        ]
                                                      },
                                                      {
                                                        "type": "string",
                                                        "maxLength": 200
                                                      }
                                                    ],
                                                    "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                    "example": "message.body"
                                                  },
                                                  "op": {
                                                    "type": "string",
                                                    "enum": [
                                                      "eq",
                                                      "neq",
                                                      "contains",
                                                      "not_contains",
                                                      "contains_any",
                                                      "contains_all",
                                                      "gt",
                                                      "gte",
                                                      "lt",
                                                      "lte",
                                                      "includes_any",
                                                      "excludes_all",
                                                      "is_set",
                                                      "is_empty"
                                                    ],
                                                    "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                    "example": "contains_any"
                                                  },
                                                  "value": {
                                                    "anyOf": [
                                                      {
                                                        "type": "string",
                                                        "maxLength": 500
                                                      },
                                                      {
                                                        "type": "number"
                                                      },
                                                      {
                                                        "type": "boolean"
                                                      },
                                                      {
                                                        "type": "null"
                                                      }
                                                    ],
                                                    "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                    "example": "urgent"
                                                  },
                                                  "values": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string",
                                                      "maxLength": 200
                                                    },
                                                    "maxItems": 50,
                                                    "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                    "example": [
                                                      "refund",
                                                      "chargeback"
                                                    ]
                                                  }
                                                },
                                                "required": [
                                                  "field",
                                                  "op"
                                                ],
                                                "additionalProperties": false
                                              },
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "all": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    "maxItems": 10,
                                                    "description": "Conditions that must all hold. Missing or empty: no requirement."
                                                  },
                                                  "any": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    "maxItems": 10,
                                                    "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                                  }
                                                },
                                                "additionalProperties": false
                                              }
                                            ]
                                          },
                                          "maxItems": 10,
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      },
                                      "additionalProperties": false
                                    }
                                  ],
                                  "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "condition"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                  "example": "assign-billing"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "branch"
                                  ],
                                  "description": "A step that picks one of several paths."
                                },
                                "branches": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "key": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 64,
                                        "description": "The path's key, unique within its branch step. An edge leaving the branch step names it in `branch`.",
                                        "example": "billing"
                                      },
                                      "condition": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "enum": [
                                                      "conversation.status",
                                                      "conversation.channel",
                                                      "conversation.priority",
                                                      "conversation.tags",
                                                      "conversation.team",
                                                      "message.body",
                                                      "message.sender"
                                                    ]
                                                  },
                                                  {
                                                    "type": "string",
                                                    "maxLength": 200
                                                  }
                                                ],
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "enum": [
                                                  "eq",
                                                  "neq",
                                                  "contains",
                                                  "not_contains",
                                                  "contains_any",
                                                  "contains_all",
                                                  "gt",
                                                  "gte",
                                                  "lt",
                                                  "lte",
                                                  "includes_any",
                                                  "excludes_all",
                                                  "is_set",
                                                  "is_empty"
                                                ],
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string",
                                                    "maxLength": 500
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string",
                                                  "maxLength": 200
                                                },
                                                "maxItems": 50,
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund",
                                                  "chargeback"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "field",
                                              "op"
                                            ],
                                            "additionalProperties": false
                                          },
                                          {
                                            "type": "object",
                                            "properties": {
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "all": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "field": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "conversation.status",
                                                                      "conversation.channel",
                                                                      "conversation.priority",
                                                                      "conversation.tags",
                                                                      "conversation.team",
                                                                      "message.body",
                                                                      "message.sender"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 200
                                                                  }
                                                                ],
                                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                                "example": "message.body"
                                                              },
                                                              "op": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "neq",
                                                                  "contains",
                                                                  "not_contains",
                                                                  "contains_any",
                                                                  "contains_all",
                                                                  "gt",
                                                                  "gte",
                                                                  "lt",
                                                                  "lte",
                                                                  "includes_any",
                                                                  "excludes_all",
                                                                  "is_set",
                                                                  "is_empty"
                                                                ],
                                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                                "example": "contains_any"
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  },
                                                                  {
                                                                    "type": "number"
                                                                  },
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ],
                                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                                "example": "urgent"
                                                              },
                                                              "values": {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 200
                                                                },
                                                                "maxItems": 50,
                                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                                "example": [
                                                                  "refund",
                                                                  "chargeback"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "field",
                                                              "op"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          "maxItems": 10,
                                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                                        },
                                                        "any": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "field": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "conversation.status",
                                                                      "conversation.channel",
                                                                      "conversation.priority",
                                                                      "conversation.tags",
                                                                      "conversation.team",
                                                                      "message.body",
                                                                      "message.sender"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 200
                                                                  }
                                                                ],
                                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                                "example": "message.body"
                                                              },
                                                              "op": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "neq",
                                                                  "contains",
                                                                  "not_contains",
                                                                  "contains_any",
                                                                  "contains_all",
                                                                  "gt",
                                                                  "gte",
                                                                  "lt",
                                                                  "lte",
                                                                  "includes_any",
                                                                  "excludes_all",
                                                                  "is_set",
                                                                  "is_empty"
                                                                ],
                                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                                "example": "contains_any"
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  },
                                                                  {
                                                                    "type": "number"
                                                                  },
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ],
                                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                                "example": "urgent"
                                                              },
                                                              "values": {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 200
                                                                },
                                                                "maxItems": 50,
                                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                                "example": [
                                                                  "refund",
                                                                  "chargeback"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "field",
                                                              "op"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          "maxItems": 10,
                                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                                        }
                                                      },
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                },
                                                "maxItems": 10,
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "anyOf": [
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "field": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "enum": [
                                                                "conversation.status",
                                                                "conversation.channel",
                                                                "conversation.priority",
                                                                "conversation.tags",
                                                                "conversation.team",
                                                                "message.body",
                                                                "message.sender"
                                                              ]
                                                            },
                                                            {
                                                              "type": "string",
                                                              "maxLength": 200
                                                            }
                                                          ],
                                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                          "example": "message.body"
                                                        },
                                                        "op": {
                                                          "type": "string",
                                                          "enum": [
                                                            "eq",
                                                            "neq",
                                                            "contains",
                                                            "not_contains",
                                                            "contains_any",
                                                            "contains_all",
                                                            "gt",
                                                            "gte",
                                                            "lt",
                                                            "lte",
                                                            "includes_any",
                                                            "excludes_all",
                                                            "is_set",
                                                            "is_empty"
                                                          ],
                                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                          "example": "contains_any"
                                                        },
                                                        "value": {
                                                          "anyOf": [
                                                            {
                                                              "type": "string",
                                                              "maxLength": 500
                                                            },
                                                            {
                                                              "type": "number"
                                                            },
                                                            {
                                                              "type": "boolean"
                                                            },
                                                            {
                                                              "type": "null"
                                                            }
                                                          ],
                                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                          "example": "urgent"
                                                        },
                                                        "values": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "string",
                                                            "maxLength": 200
                                                          },
                                                          "maxItems": 50,
                                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                          "example": [
                                                            "refund",
                                                            "chargeback"
                                                          ]
                                                        }
                                                      },
                                                      "required": [
                                                        "field",
                                                        "op"
                                                      ],
                                                      "additionalProperties": false
                                                    },
                                                    {
                                                      "type": "object",
                                                      "properties": {
                                                        "all": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "field": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "conversation.status",
                                                                      "conversation.channel",
                                                                      "conversation.priority",
                                                                      "conversation.tags",
                                                                      "conversation.team",
                                                                      "message.body",
                                                                      "message.sender"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 200
                                                                  }
                                                                ],
                                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                                "example": "message.body"
                                                              },
                                                              "op": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "neq",
                                                                  "contains",
                                                                  "not_contains",
                                                                  "contains_any",
                                                                  "contains_all",
                                                                  "gt",
                                                                  "gte",
                                                                  "lt",
                                                                  "lte",
                                                                  "includes_any",
                                                                  "excludes_all",
                                                                  "is_set",
                                                                  "is_empty"
                                                                ],
                                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                                "example": "contains_any"
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  },
                                                                  {
                                                                    "type": "number"
                                                                  },
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ],
                                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                                "example": "urgent"
                                                              },
                                                              "values": {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 200
                                                                },
                                                                "maxItems": 50,
                                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                                "example": [
                                                                  "refund",
                                                                  "chargeback"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "field",
                                                              "op"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          "maxItems": 10,
                                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                                        },
                                                        "any": {
                                                          "type": "array",
                                                          "items": {
                                                            "type": "object",
                                                            "properties": {
                                                              "field": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "enum": [
                                                                      "conversation.status",
                                                                      "conversation.channel",
                                                                      "conversation.priority",
                                                                      "conversation.tags",
                                                                      "conversation.team",
                                                                      "message.body",
                                                                      "message.sender"
                                                                    ]
                                                                  },
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 200
                                                                  }
                                                                ],
                                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                                "example": "message.body"
                                                              },
                                                              "op": {
                                                                "type": "string",
                                                                "enum": [
                                                                  "eq",
                                                                  "neq",
                                                                  "contains",
                                                                  "not_contains",
                                                                  "contains_any",
                                                                  "contains_all",
                                                                  "gt",
                                                                  "gte",
                                                                  "lt",
                                                                  "lte",
                                                                  "includes_any",
                                                                  "excludes_all",
                                                                  "is_set",
                                                                  "is_empty"
                                                                ],
                                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                                "example": "contains_any"
                                                              },
                                                              "value": {
                                                                "anyOf": [
                                                                  {
                                                                    "type": "string",
                                                                    "maxLength": 500
                                                                  },
                                                                  {
                                                                    "type": "number"
                                                                  },
                                                                  {
                                                                    "type": "boolean"
                                                                  },
                                                                  {
                                                                    "type": "null"
                                                                  }
                                                                ],
                                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                                "example": "urgent"
                                                              },
                                                              "values": {
                                                                "type": "array",
                                                                "items": {
                                                                  "type": "string",
                                                                  "maxLength": 200
                                                                },
                                                                "maxItems": 50,
                                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                                "example": [
                                                                  "refund",
                                                                  "chargeback"
                                                                ]
                                                              }
                                                            },
                                                            "required": [
                                                              "field",
                                                              "op"
                                                            ],
                                                            "additionalProperties": false
                                                          },
                                                          "maxItems": 10,
                                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                                        }
                                                      },
                                                      "additionalProperties": false
                                                    }
                                                  ]
                                                },
                                                "maxItems": 10,
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            },
                                            "additionalProperties": false
                                          }
                                        ],
                                        "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                      }
                                    },
                                    "required": [
                                      "key",
                                      "condition"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "minItems": 1,
                                  "maxItems": 10,
                                  "description": "The paths of a branch step, checked in order. The run follows the edge of the first path whose condition holds; when none holds, the run stops."
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "branches"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "maxItems": 100,
                        "description": "The steps. A run starts at the `trigger` step and follows one edge at a time until no edge leads on or a step stops it. Reaching a step a second time ends the run."
                      },
                      "edges": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "description": "The ID of the step the edge leaves.",
                              "example": "trigger"
                            },
                            "to": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "description": "The ID of the step the edge leads to.",
                              "example": "assign-billing"
                            },
                            "branch": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "description": "The key of the branch path this edge follows, for an edge that leaves a branch step. Leave it out for every other step.",
                              "example": "billing"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ],
                          "additionalProperties": false
                        },
                        "maxItems": 200,
                        "description": "The connections between steps. A step without an outgoing edge ends the run."
                      }
                    },
                    "required": [
                      "nodes",
                      "edges"
                    ],
                    "additionalProperties": false,
                    "description": "The workflow's steps and the edges between them. Replaces the whole graph. Leave it out to keep the current graph."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The workflow and whether it changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The workflow ID.",
                      "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "name": {
                      "type": "string",
                      "description": "The workflow's display name.",
                      "example": "Route billing questions"
                    },
                    "class": {
                      "type": "string",
                      "description": "How the workflow runs. Workflows created through the API are `background`: they change the conversation without messaging the customer. An imported workflow can be `customer_facing`.",
                      "example": "background"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "live",
                        "paused"
                      ],
                      "description": "`draft`: saved but never runs. `live`: runs on its trigger. `paused`: kept but does not run.",
                      "example": "live"
                    },
                    "sortOrder": {
                      "type": "number",
                      "description": "The position in run order, lowest first. Runs that one event starts are queued in this order.",
                      "example": 0
                    },
                    "triggerType": {
                      "type": "string",
                      "description": "The event that starts the workflow, for example `conversation.priority_changed`. An imported workflow can hold a trigger that is not available; it cannot be published.",
                      "example": "message.created"
                    },
                    "graph": {
                      "type": "object",
                      "properties": {
                        "nodes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                "example": "assign-billing"
                              },
                              "type": {
                                "type": "string",
                                "description": "The step kind. `trigger`: the entry step. `action`: applies `action`. `condition`: stops the run unless `condition` holds. `branch`: follows the first path in `branches` whose condition holds.",
                                "example": "action"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "The action: `assign_agent`, `assign_team`, `add_tag`, `set_priority`, `snooze`, `close` or `reopen`.",
                                    "example": "assign_team"
                                  },
                                  "principalId": {
                                    "type": "string",
                                    "description": "`assign_agent` only. The teammate principal to assign the conversation to. It must be a current member of the workspace.",
                                    "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                                  },
                                  "teamId": {
                                    "type": "string",
                                    "description": "`assign_team` only. The team to assign the conversation to. It must exist and not be deleted.",
                                    "example": "team_01m8rxfrbhfzr9r83a29m5ke14"
                                  },
                                  "tagId": {
                                    "type": "string",
                                    "description": "`add_tag` only. The conversation tag to add. It must exist and not be deleted.",
                                    "example": "conversation_tag_01m8rxfrbhfzr9r83gw2ecw92z"
                                  },
                                  "priority": {
                                    "type": "string",
                                    "description": "`set_priority` only. The priority to set: `none`, `low`, `medium`, `high` or `urgent`.",
                                    "example": "high"
                                  },
                                  "seconds": {
                                    "type": "number",
                                    "description": "`snooze` only. How long to snooze the conversation, in seconds from the moment the run applies the action.",
                                    "example": 3600
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "description": "Action steps only: the action to apply."
                              },
                              "condition": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                    "example": "message.body"
                                  },
                                  "op": {
                                    "type": "string",
                                    "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                    "example": "contains_any"
                                  },
                                  "value": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                    "example": "urgent"
                                  },
                                  "values": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                    "example": [
                                      "refund"
                                    ]
                                  },
                                  "all": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions that must all hold. Missing or empty: no requirement."
                                  },
                                  "any": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                  }
                                },
                                "description": "Condition steps only. A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                              },
                              "branches": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string",
                                      "description": "The path's key, unique within its branch step. An edge leaving the branch step names it in `branch`.",
                                      "example": "billing"
                                    },
                                    "condition": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      },
                                      "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "condition"
                                  ]
                                },
                                "description": "Branch steps only. The paths of a branch step, checked in order. The run follows the edge of the first path whose condition holds; when none holds, the run stops."
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ]
                          },
                          "description": "The steps. A run starts at the `trigger` step and follows one edge at a time until no edge leads on or a step stops it. Reaching a step a second time ends the run."
                        },
                        "edges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "type": "string",
                                "description": "The ID of the step the edge leaves.",
                                "example": "trigger"
                              },
                              "to": {
                                "type": "string",
                                "description": "The ID of the step the edge leads to.",
                                "example": "assign-billing"
                              },
                              "branch": {
                                "type": "string",
                                "description": "The key of the branch path this edge follows, for an edge that leaves a branch step. Leave it out for every other step.",
                                "example": "billing"
                              }
                            },
                            "required": [
                              "from",
                              "to"
                            ]
                          },
                          "description": "The connections between steps. A step without an outgoing edge ends the run."
                        }
                      },
                      "required": [
                        "nodes",
                        "edges"
                      ],
                      "description": "The workflow's steps and edges. A stored graph that does not fit this shape, such as an imported one, reads as empty."
                    },
                    "actorPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The teammate principal the workflow acts as when it runs: the author of its newest version. Null when no author is on record, for example after that principal was deleted; a live workflow without one fails each run as denied.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow was created.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow's name, trigger, graph or status last changed.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the request changed the name, trigger or graph; false when it matched the stored workflow.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "class",
                    "status",
                    "sortOrder",
                    "triggerType",
                    "graph",
                    "actorPrincipalId",
                    "createdAt",
                    "updatedAt",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The workflow does not exist or is deleted, or a teammate, team or tag that an action names is not in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workflow cannot change this way",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsWorkflow",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Delete a workflow",
        "description": "Soft-deletes the workflow: it stops running, leaves the lists and can no longer be read, while its runs and versions stay. Records a `workflow.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The workflow ID. A deleted workflow is not found.",
              "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The workflow ID. A deleted workflow is not found.",
            "name": "workflowId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted workflow",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The deleted workflow's ID.",
                      "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The workflow does not exist or is already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/workflows/{workflowId}/publish": {
      "post": {
        "operationId": "publishQuillsWorkflow",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Publish or re-enable a workflow",
        "description": "Sets the workflow's status to `live`, from `draft` or `paused`, and writes a version with the caller as its author, so the caller becomes the teammate it acts as. The stored trigger must be available, the stored graph must validate, and every teammate, team and tag that an action names must exist. From then on, each matching event queues a run. Each run checks that teammate's current workspace role; a run they may not do fails as denied. Records a `workflow.published` event. Requires the `manage_settings` and `update` permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The workflow ID. A deleted workflow is not found.",
              "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The workflow ID. A deleted workflow is not found.",
            "name": "workflowId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The live workflow",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The workflow ID.",
                      "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "name": {
                      "type": "string",
                      "description": "The workflow's display name.",
                      "example": "Route billing questions"
                    },
                    "class": {
                      "type": "string",
                      "description": "How the workflow runs. Workflows created through the API are `background`: they change the conversation without messaging the customer. An imported workflow can be `customer_facing`.",
                      "example": "background"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "live",
                        "paused"
                      ],
                      "description": "`draft`: saved but never runs. `live`: runs on its trigger. `paused`: kept but does not run.",
                      "example": "live"
                    },
                    "sortOrder": {
                      "type": "number",
                      "description": "The position in run order, lowest first. Runs that one event starts are queued in this order.",
                      "example": 0
                    },
                    "triggerType": {
                      "type": "string",
                      "description": "The event that starts the workflow, for example `conversation.priority_changed`. An imported workflow can hold a trigger that is not available; it cannot be published.",
                      "example": "message.created"
                    },
                    "graph": {
                      "type": "object",
                      "properties": {
                        "nodes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                "example": "assign-billing"
                              },
                              "type": {
                                "type": "string",
                                "description": "The step kind. `trigger`: the entry step. `action`: applies `action`. `condition`: stops the run unless `condition` holds. `branch`: follows the first path in `branches` whose condition holds.",
                                "example": "action"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "The action: `assign_agent`, `assign_team`, `add_tag`, `set_priority`, `snooze`, `close` or `reopen`.",
                                    "example": "assign_team"
                                  },
                                  "principalId": {
                                    "type": "string",
                                    "description": "`assign_agent` only. The teammate principal to assign the conversation to. It must be a current member of the workspace.",
                                    "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                                  },
                                  "teamId": {
                                    "type": "string",
                                    "description": "`assign_team` only. The team to assign the conversation to. It must exist and not be deleted.",
                                    "example": "team_01m8rxfrbhfzr9r83a29m5ke14"
                                  },
                                  "tagId": {
                                    "type": "string",
                                    "description": "`add_tag` only. The conversation tag to add. It must exist and not be deleted.",
                                    "example": "conversation_tag_01m8rxfrbhfzr9r83gw2ecw92z"
                                  },
                                  "priority": {
                                    "type": "string",
                                    "description": "`set_priority` only. The priority to set: `none`, `low`, `medium`, `high` or `urgent`.",
                                    "example": "high"
                                  },
                                  "seconds": {
                                    "type": "number",
                                    "description": "`snooze` only. How long to snooze the conversation, in seconds from the moment the run applies the action.",
                                    "example": 3600
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "description": "Action steps only: the action to apply."
                              },
                              "condition": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                    "example": "message.body"
                                  },
                                  "op": {
                                    "type": "string",
                                    "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                    "example": "contains_any"
                                  },
                                  "value": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                    "example": "urgent"
                                  },
                                  "values": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                    "example": [
                                      "refund"
                                    ]
                                  },
                                  "all": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions that must all hold. Missing or empty: no requirement."
                                  },
                                  "any": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                  }
                                },
                                "description": "Condition steps only. A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                              },
                              "branches": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string",
                                      "description": "The path's key, unique within its branch step. An edge leaving the branch step names it in `branch`.",
                                      "example": "billing"
                                    },
                                    "condition": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      },
                                      "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "condition"
                                  ]
                                },
                                "description": "Branch steps only. The paths of a branch step, checked in order. The run follows the edge of the first path whose condition holds; when none holds, the run stops."
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ]
                          },
                          "description": "The steps. A run starts at the `trigger` step and follows one edge at a time until no edge leads on or a step stops it. Reaching a step a second time ends the run."
                        },
                        "edges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "type": "string",
                                "description": "The ID of the step the edge leaves.",
                                "example": "trigger"
                              },
                              "to": {
                                "type": "string",
                                "description": "The ID of the step the edge leads to.",
                                "example": "assign-billing"
                              },
                              "branch": {
                                "type": "string",
                                "description": "The key of the branch path this edge follows, for an edge that leaves a branch step. Leave it out for every other step.",
                                "example": "billing"
                              }
                            },
                            "required": [
                              "from",
                              "to"
                            ]
                          },
                          "description": "The connections between steps. A step without an outgoing edge ends the run."
                        }
                      },
                      "required": [
                        "nodes",
                        "edges"
                      ],
                      "description": "The workflow's steps and edges. A stored graph that does not fit this shape, such as an imported one, reads as empty."
                    },
                    "actorPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The teammate principal the workflow acts as when it runs: the author of its newest version. Null when no author is on record, for example after that principal was deleted; a live workflow without one fails each run as denied.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow was created.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow's name, trigger, graph or status last changed.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "class",
                    "status",
                    "sortOrder",
                    "triggerType",
                    "graph",
                    "actorPrincipalId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The workflow does not exist or is deleted, or a teammate, team or tag that an action names is not in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workflow's trigger is not available, or its stored graph no longer validates; save the workflow again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/workflows/{workflowId}/pause": {
      "post": {
        "operationId": "pauseQuillsWorkflow",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Pause a live workflow",
        "description": "Sets a `live` workflow's status to `paused`. Queued runs that have not started do nothing once it is paused. A workflow that is not live does not change and returns `changed: false`. Records a `workflow.paused` event when the status changed. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The workflow ID. A deleted workflow is not found.",
              "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The workflow ID. A deleted workflow is not found.",
            "name": "workflowId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The workflow and whether it changed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The workflow ID.",
                      "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "name": {
                      "type": "string",
                      "description": "The workflow's display name.",
                      "example": "Route billing questions"
                    },
                    "class": {
                      "type": "string",
                      "description": "How the workflow runs. Workflows created through the API are `background`: they change the conversation without messaging the customer. An imported workflow can be `customer_facing`.",
                      "example": "background"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "live",
                        "paused"
                      ],
                      "description": "`draft`: saved but never runs. `live`: runs on its trigger. `paused`: kept but does not run.",
                      "example": "live"
                    },
                    "sortOrder": {
                      "type": "number",
                      "description": "The position in run order, lowest first. Runs that one event starts are queued in this order.",
                      "example": 0
                    },
                    "triggerType": {
                      "type": "string",
                      "description": "The event that starts the workflow, for example `conversation.priority_changed`. An imported workflow can hold a trigger that is not available; it cannot be published.",
                      "example": "message.created"
                    },
                    "graph": {
                      "type": "object",
                      "properties": {
                        "nodes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                "example": "assign-billing"
                              },
                              "type": {
                                "type": "string",
                                "description": "The step kind. `trigger`: the entry step. `action`: applies `action`. `condition`: stops the run unless `condition` holds. `branch`: follows the first path in `branches` whose condition holds.",
                                "example": "action"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "The action: `assign_agent`, `assign_team`, `add_tag`, `set_priority`, `snooze`, `close` or `reopen`.",
                                    "example": "assign_team"
                                  },
                                  "principalId": {
                                    "type": "string",
                                    "description": "`assign_agent` only. The teammate principal to assign the conversation to. It must be a current member of the workspace.",
                                    "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                                  },
                                  "teamId": {
                                    "type": "string",
                                    "description": "`assign_team` only. The team to assign the conversation to. It must exist and not be deleted.",
                                    "example": "team_01m8rxfrbhfzr9r83a29m5ke14"
                                  },
                                  "tagId": {
                                    "type": "string",
                                    "description": "`add_tag` only. The conversation tag to add. It must exist and not be deleted.",
                                    "example": "conversation_tag_01m8rxfrbhfzr9r83gw2ecw92z"
                                  },
                                  "priority": {
                                    "type": "string",
                                    "description": "`set_priority` only. The priority to set: `none`, `low`, `medium`, `high` or `urgent`.",
                                    "example": "high"
                                  },
                                  "seconds": {
                                    "type": "number",
                                    "description": "`snooze` only. How long to snooze the conversation, in seconds from the moment the run applies the action.",
                                    "example": 3600
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "description": "Action steps only: the action to apply."
                              },
                              "condition": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                    "example": "message.body"
                                  },
                                  "op": {
                                    "type": "string",
                                    "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                    "example": "contains_any"
                                  },
                                  "value": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                    "example": "urgent"
                                  },
                                  "values": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                    "example": [
                                      "refund"
                                    ]
                                  },
                                  "all": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions that must all hold. Missing or empty: no requirement."
                                  },
                                  "any": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                  }
                                },
                                "description": "Condition steps only. A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                              },
                              "branches": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string",
                                      "description": "The path's key, unique within its branch step. An edge leaving the branch step names it in `branch`.",
                                      "example": "billing"
                                    },
                                    "condition": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      },
                                      "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "condition"
                                  ]
                                },
                                "description": "Branch steps only. The paths of a branch step, checked in order. The run follows the edge of the first path whose condition holds; when none holds, the run stops."
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ]
                          },
                          "description": "The steps. A run starts at the `trigger` step and follows one edge at a time until no edge leads on or a step stops it. Reaching a step a second time ends the run."
                        },
                        "edges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "type": "string",
                                "description": "The ID of the step the edge leaves.",
                                "example": "trigger"
                              },
                              "to": {
                                "type": "string",
                                "description": "The ID of the step the edge leads to.",
                                "example": "assign-billing"
                              },
                              "branch": {
                                "type": "string",
                                "description": "The key of the branch path this edge follows, for an edge that leaves a branch step. Leave it out for every other step.",
                                "example": "billing"
                              }
                            },
                            "required": [
                              "from",
                              "to"
                            ]
                          },
                          "description": "The connections between steps. A step without an outgoing edge ends the run."
                        }
                      },
                      "required": [
                        "nodes",
                        "edges"
                      ],
                      "description": "The workflow's steps and edges. A stored graph that does not fit this shape, such as an imported one, reads as empty."
                    },
                    "actorPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The teammate principal the workflow acts as when it runs: the author of its newest version. Null when no author is on record, for example after that principal was deleted; a live workflow without one fails each run as denied.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow was created.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow's name, trigger, graph or status last changed.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "True when the workflow was live and is now paused; false when it was not live.",
                      "example": true
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "class",
                    "status",
                    "sortOrder",
                    "triggerType",
                    "graph",
                    "actorPrincipalId",
                    "createdAt",
                    "updatedAt",
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The workflow does not exist or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/workflows/{workflowId}/versions": {
      "get": {
        "operationId": "listQuillsWorkflowVersions",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "List a workflow's versions",
        "description": "Lists the workflow's saved versions, newest first. The newest 50 versions of each workflow are kept. Creating, changing, publishing and restoring a workflow each write a version. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The workflow ID. A deleted workflow is not found.",
              "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The workflow ID. A deleted workflow is not found.",
            "name": "workflowId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The versions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "versions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The version ID.",
                            "example": "workflow_version_01m8rxfrbhfzr9r83t8d2n37cb"
                          },
                          "name": {
                            "type": "string",
                            "description": "The workflow's name in this version.",
                            "example": "Route billing questions"
                          },
                          "triggerType": {
                            "type": "string",
                            "description": "The workflow's trigger in this version.",
                            "example": "message.created"
                          },
                          "nodeCount": {
                            "type": "number",
                            "description": "The number of steps in this version's graph.",
                            "example": 4
                          },
                          "edgeCount": {
                            "type": "number",
                            "description": "The number of edges in this version's graph.",
                            "example": 3
                          },
                          "createdBy": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The teammate principal who saved this version. Null when that principal no longer exists.",
                            "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                          },
                          "createdByName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The display name of the teammate who saved this version. Null when unknown.",
                            "example": "Jane Cooper"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the version was saved.",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "triggerType",
                          "nodeCount",
                          "edgeCount",
                          "createdBy",
                          "createdByName",
                          "createdAt"
                        ]
                      },
                      "description": "The versions, newest first."
                    }
                  },
                  "required": [
                    "versions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The workflow does not exist or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/workflows/{workflowId}/versions/{versionId}/restore": {
      "post": {
        "operationId": "restoreQuillsWorkflowVersion",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Restore a workflow version",
        "description": "Copies the version's name, trigger and graph back onto the workflow and writes a new version with the caller as its author, so the caller becomes the teammate the workflow acts as. The status does not change, so a live workflow runs the restored graph from then on. Records a `workflow.version_restored` event. Requires the `manage_settings` and `update` permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The workflow ID. A deleted workflow is not found.",
              "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The workflow ID. A deleted workflow is not found.",
            "name": "workflowId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The ID of a version of this workflow.",
              "example": "workflow_version_01m8rxfrbhfzr9r83t8d2n37cb"
            },
            "required": true,
            "description": "The ID of a version of this workflow.",
            "name": "versionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The restored workflow",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The workflow ID.",
                      "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "name": {
                      "type": "string",
                      "description": "The workflow's display name.",
                      "example": "Route billing questions"
                    },
                    "class": {
                      "type": "string",
                      "description": "How the workflow runs. Workflows created through the API are `background`: they change the conversation without messaging the customer. An imported workflow can be `customer_facing`.",
                      "example": "background"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "live",
                        "paused"
                      ],
                      "description": "`draft`: saved but never runs. `live`: runs on its trigger. `paused`: kept but does not run.",
                      "example": "live"
                    },
                    "sortOrder": {
                      "type": "number",
                      "description": "The position in run order, lowest first. Runs that one event starts are queued in this order.",
                      "example": 0
                    },
                    "triggerType": {
                      "type": "string",
                      "description": "The event that starts the workflow, for example `conversation.priority_changed`. An imported workflow can hold a trigger that is not available; it cannot be published.",
                      "example": "message.created"
                    },
                    "graph": {
                      "type": "object",
                      "properties": {
                        "nodes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The step's ID, unique within the graph. Edges name steps by this ID.",
                                "example": "assign-billing"
                              },
                              "type": {
                                "type": "string",
                                "description": "The step kind. `trigger`: the entry step. `action`: applies `action`. `condition`: stops the run unless `condition` holds. `branch`: follows the first path in `branches` whose condition holds.",
                                "example": "action"
                              },
                              "action": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "description": "The action: `assign_agent`, `assign_team`, `add_tag`, `set_priority`, `snooze`, `close` or `reopen`.",
                                    "example": "assign_team"
                                  },
                                  "principalId": {
                                    "type": "string",
                                    "description": "`assign_agent` only. The teammate principal to assign the conversation to. It must be a current member of the workspace.",
                                    "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                                  },
                                  "teamId": {
                                    "type": "string",
                                    "description": "`assign_team` only. The team to assign the conversation to. It must exist and not be deleted.",
                                    "example": "team_01m8rxfrbhfzr9r83a29m5ke14"
                                  },
                                  "tagId": {
                                    "type": "string",
                                    "description": "`add_tag` only. The conversation tag to add. It must exist and not be deleted.",
                                    "example": "conversation_tag_01m8rxfrbhfzr9r83gw2ecw92z"
                                  },
                                  "priority": {
                                    "type": "string",
                                    "description": "`set_priority` only. The priority to set: `none`, `low`, `medium`, `high` or `urgent`.",
                                    "example": "high"
                                  },
                                  "seconds": {
                                    "type": "number",
                                    "description": "`snooze` only. How long to snooze the conversation, in seconds from the moment the run applies the action.",
                                    "example": 3600
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "description": "Action steps only: the action to apply."
                              },
                              "condition": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                    "example": "message.body"
                                  },
                                  "op": {
                                    "type": "string",
                                    "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                    "example": "contains_any"
                                  },
                                  "value": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                    "example": "urgent"
                                  },
                                  "values": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                    "example": [
                                      "refund"
                                    ]
                                  },
                                  "all": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions that must all hold. Missing or empty: no requirement."
                                  },
                                  "any": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      }
                                    },
                                    "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                  }
                                },
                                "description": "Condition steps only. A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                              },
                              "branches": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string",
                                      "description": "The path's key, unique within its branch step. An edge leaving the branch step names it in `branch`.",
                                      "example": "billing"
                                    },
                                    "condition": {
                                      "type": "object",
                                      "properties": {
                                        "field": {
                                          "type": "string",
                                          "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                          "example": "message.body"
                                        },
                                        "op": {
                                          "type": "string",
                                          "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                          "example": "contains_any"
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "number"
                                            },
                                            {
                                              "type": "boolean"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                          "example": "urgent"
                                        },
                                        "values": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                          "example": [
                                            "refund"
                                          ]
                                        },
                                        "all": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions that must all hold. Missing or empty: no requirement."
                                        },
                                        "any": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "field": {
                                                "type": "string",
                                                "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                "example": "message.body"
                                              },
                                              "op": {
                                                "type": "string",
                                                "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                "example": "contains_any"
                                              },
                                              "value": {
                                                "anyOf": [
                                                  {
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "number"
                                                  },
                                                  {
                                                    "type": "boolean"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                "example": "urgent"
                                              },
                                              "values": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                },
                                                "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                "example": [
                                                  "refund"
                                                ]
                                              },
                                              "all": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions that must all hold. Missing or empty: no requirement."
                                              },
                                              "any": {
                                                "type": "array",
                                                "items": {
                                                  "type": "object",
                                                  "properties": {
                                                    "field": {
                                                      "type": "string",
                                                      "description": "The value the condition reads: `conversation.status`, `conversation.channel`, `conversation.priority`, `conversation.tags` (the conversation's tag IDs), `conversation.team` (the assigned team ID), `message.body` and `message.sender` (the message that triggered the run; null when the event names no message), or `conversation.attr.<key>` for a custom conversation attribute.",
                                                      "example": "message.body"
                                                    },
                                                    "op": {
                                                      "type": "string",
                                                      "description": "The comparison. `eq` and `neq`: equal or not equal (a number and a numeric string compare as numbers). `contains` and `not_contains`: case-insensitive substring of `value`. `contains_any` and `contains_all`: the text contains any or all of the `values` keywords, case-insensitive. `gt`, `gte`, `lt` and `lte`: numeric comparison. `includes_any` and `excludes_all`: a list field such as `conversation.tags` holds any of, or none of, the `values`. `is_set` and `is_empty`: the field has a value, or is null, empty or missing. A field without a value matches only `is_empty`.",
                                                      "example": "contains_any"
                                                    },
                                                    "value": {
                                                      "anyOf": [
                                                        {
                                                          "type": "string"
                                                        },
                                                        {
                                                          "type": "number"
                                                        },
                                                        {
                                                          "type": "boolean"
                                                        },
                                                        {
                                                          "type": "null"
                                                        }
                                                      ],
                                                      "description": "The single value to compare with, for every operator except `contains_any`, `contains_all`, `includes_any` and `excludes_all`. Leave it out for `is_set` and `is_empty`.",
                                                      "example": "urgent"
                                                    },
                                                    "values": {
                                                      "type": "array",
                                                      "items": {
                                                        "type": "string"
                                                      },
                                                      "description": "The list of values to compare with, for `contains_any`, `contains_all`, `includes_any` and `excludes_all` only.",
                                                      "example": [
                                                        "refund"
                                                      ]
                                                    }
                                                  }
                                                },
                                                "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                              }
                                            }
                                          },
                                          "description": "Conditions of which at least one must hold. Missing or empty: no requirement."
                                        }
                                      },
                                      "description": "A condition: one comparison (`field`, `op` and `value` or `values`), or a group of comparisons under `all` and `any`, nested at most two levels. Stored conditions that no longer validate never match."
                                    }
                                  },
                                  "required": [
                                    "key",
                                    "condition"
                                  ]
                                },
                                "description": "Branch steps only. The paths of a branch step, checked in order. The run follows the edge of the first path whose condition holds; when none holds, the run stops."
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ]
                          },
                          "description": "The steps. A run starts at the `trigger` step and follows one edge at a time until no edge leads on or a step stops it. Reaching a step a second time ends the run."
                        },
                        "edges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "from": {
                                "type": "string",
                                "description": "The ID of the step the edge leaves.",
                                "example": "trigger"
                              },
                              "to": {
                                "type": "string",
                                "description": "The ID of the step the edge leads to.",
                                "example": "assign-billing"
                              },
                              "branch": {
                                "type": "string",
                                "description": "The key of the branch path this edge follows, for an edge that leaves a branch step. Leave it out for every other step.",
                                "example": "billing"
                              }
                            },
                            "required": [
                              "from",
                              "to"
                            ]
                          },
                          "description": "The connections between steps. A step without an outgoing edge ends the run."
                        }
                      },
                      "required": [
                        "nodes",
                        "edges"
                      ],
                      "description": "The workflow's steps and edges. A stored graph that does not fit this shape, such as an imported one, reads as empty."
                    },
                    "actorPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The teammate principal the workflow acts as when it runs: the author of its newest version. Null when no author is on record, for example after that principal was deleted; a live workflow without one fails each run as denied.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow was created.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the workflow's name, trigger, graph or status last changed.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "class",
                    "status",
                    "sortOrder",
                    "triggerType",
                    "graph",
                    "actorPrincipalId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The workflow does not exist or is deleted, the version does not belong to it, or a teammate, team or tag that an action names is not in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The version's trigger is not available, or its graph no longer validates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/runnable-workflows": {
      "get": {
        "operationId": "listQuillsRunnableWorkflows",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "List the live workflows a teammate can run on a conversation",
        "description": "Lists the live workflows in run order, up to 200, for a teammate to pick one to run on a conversation with `runQuillsWorkflowManually`. Requires the `update` permission, like the manual run.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The live workflows in run order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workflows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The workflow ID.",
                            "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "name": {
                            "type": "string",
                            "description": "The workflow's display name.",
                            "example": "Route billing questions"
                          },
                          "triggerType": {
                            "type": "string",
                            "description": "The event that starts the workflow on its own. A manual run ignores it.",
                            "example": "message.created"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "triggerType"
                        ]
                      },
                      "description": "The live workflows in run order, at most 200"
                    }
                  },
                  "required": [
                    "workflows"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/workflows/{workflowId}/run": {
      "post": {
        "operationId": "runQuillsWorkflowManually",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Run a live workflow on a conversation",
        "description": "Queues one run of a live workflow on the conversation, whatever the workflow's trigger, by recording a `workflow.run_requested` event. After commit, the worker walks the graph as the teammate the workflow acts as; conditions still apply, and that teammate's current role decides whether the actions may run. The response does not wait for the run: read `listQuillsWorkflowRuns` for its outcome. Each request queues a separate run. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The workflow ID. A deleted workflow is not found.",
              "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The workflow ID. A deleted workflow is not found.",
            "name": "workflowId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationId": {
                    "type": "string",
                    "description": "The conversation to run the workflow on.",
                    "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                  }
                },
                "required": [
                  "conversationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The queued run request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workflowId": {
                      "type": "string",
                      "description": "The workflow ID.",
                      "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "conversationId": {
                      "type": "string",
                      "description": "The conversation the run will act on.",
                      "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                    }
                  },
                  "required": [
                    "workflowId",
                    "conversationId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The workflow does not exist or is deleted, or the conversation does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workflow is a draft or paused, not live",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/workflows/{workflowId}/preview": {
      "get": {
        "operationId": "previewQuillsWorkflow",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Preview a workflow on a conversation",
        "description": "Walks the stored graph on the conversation as it is now and returns the actions a run would apply. There is no triggering message, so `message.body` and `message.sender` read as null. Nothing changes and nothing is recorded. Works for a workflow in any status. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The workflow ID. A deleted workflow is not found.",
              "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The workflow ID. A deleted workflow is not found.",
            "name": "workflowId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The conversation to run the workflow on.",
              "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
            },
            "required": true,
            "description": "The conversation to run the workflow on.",
            "name": "conversationId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The actions a run would take",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "halted"
                      ],
                      "description": "`completed`: the walk reached a step with no outgoing edge. `halted`: a condition that did not hold, a branch with no matching path, or a step that no longer validates stopped it; `actions` lists the actions before that point.",
                      "example": "completed"
                    },
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "The action: `assign_agent`, `assign_team`, `add_tag`, `set_priority`, `snooze`, `close` or `reopen`.",
                            "example": "assign_team"
                          },
                          "principalId": {
                            "type": "string",
                            "description": "`assign_agent` only. The teammate principal to assign the conversation to. It must be a current member of the workspace.",
                            "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                          },
                          "teamId": {
                            "type": "string",
                            "description": "`assign_team` only. The team to assign the conversation to. It must exist and not be deleted.",
                            "example": "team_01m8rxfrbhfzr9r83a29m5ke14"
                          },
                          "tagId": {
                            "type": "string",
                            "description": "`add_tag` only. The conversation tag to add. It must exist and not be deleted.",
                            "example": "conversation_tag_01m8rxfrbhfzr9r83gw2ecw92z"
                          },
                          "priority": {
                            "type": "string",
                            "description": "`set_priority` only. The priority to set: `none`, `low`, `medium`, `high` or `urgent`.",
                            "example": "high"
                          },
                          "seconds": {
                            "type": "number",
                            "description": "`snooze` only. How long to snooze the conversation, in seconds from the moment the run applies the action.",
                            "example": 3600
                          }
                        },
                        "required": [
                          "type"
                        ]
                      },
                      "description": "The actions a run would apply, in order."
                    }
                  },
                  "required": [
                    "status",
                    "actions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The workflow does not exist or is deleted, or the conversation does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/workflows/{workflowId}/runs": {
      "get": {
        "operationId": "listQuillsWorkflowRuns",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "List a workflow's recent runs",
        "description": "Lists the workflow's most recent runs, newest first, up to `limit`. A run that failed or was denied is `interrupted`; its events name why. A run whose walk applied no actions is not recorded. Not paginated. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The workflow ID. A deleted workflow is not found.",
              "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The workflow ID. A deleted workflow is not found.",
            "name": "workflowId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "The maximum number of runs to return. Default 50.",
              "example": 20
            },
            "required": false,
            "description": "The maximum number of runs to return. Default 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The runs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The run ID.",
                            "example": "workflow_run_01m8rxfrbhfzr9r84qkepvgcsq"
                          },
                          "state": {
                            "type": "string",
                            "description": "`done`: the run applied its actions. `interrupted`: the run was denied (the teammate the workflow acts as may not update conversations) or failed; its events say which. An imported run can also be `running` or `waiting`.",
                            "example": "done"
                          },
                          "conversationId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The conversation the run acted on. Null when the run was recorded without one, for example after the conversation was deleted.",
                            "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                          },
                          "startedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the run started.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "endedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the run ended. Null while an imported run has not ended.",
                            "example": "2026-11-30T14:05:01.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "state",
                          "conversationId",
                          "startedAt",
                          "endedAt"
                        ]
                      },
                      "description": "The runs, newest first."
                    }
                  },
                  "required": [
                    "runs"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The workflow does not exist or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/runs/{runId}/events": {
      "get": {
        "operationId": "listQuillsWorkflowRunEvents",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "List a run's events",
        "description": "Lists a run's events, oldest first, up to 200: `started`, then one `action:<type>` (the action changed the conversation) or `unchanged:<type>` (the conversation was already that way) per action, then `completed`, `halted` (a later condition stopped it), `denied` or `failed`. A denied or failed run has only `started` and its outcome. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The run ID.",
              "example": "workflow_run_01m8rxfrbhfzr9r84qkepvgcsq"
            },
            "required": true,
            "description": "The run ID.",
            "name": "runId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The run's events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "description": "What happened: `started`, `action:<type>`, `unchanged:<type>`, `completed`, `halted`, `denied` or `failed`.",
                            "example": "action:assign_team"
                          },
                          "at": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When it happened.",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "kind",
                          "at"
                        ]
                      },
                      "description": "The run's events, oldest first."
                    }
                  },
                  "required": [
                    "events"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The run does not exist in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/effectiveness": {
      "get": {
        "operationId": "getQuillsWorkflowEffectiveness",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Count each workflow's runs by outcome",
        "description": "Counts the runs started in the last `days` days for each workflow that is not deleted, by outcome. Workflows without a recorded run in that window are left out. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 7,
              "description": "The window, in days back from now. Default 7.",
              "example": 30
            },
            "required": false,
            "description": "The window, in days back from now. Default 7.",
            "name": "days",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Run counts per workflow",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workflows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "workflowId": {
                            "type": "string",
                            "description": "The workflow ID.",
                            "example": "workflow_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "started": {
                            "type": "number",
                            "description": "Recorded runs that started in the window.",
                            "example": 42
                          },
                          "completed": {
                            "type": "number",
                            "description": "Of those, runs that applied their actions (state `done`).",
                            "example": 40
                          },
                          "interrupted": {
                            "type": "number",
                            "description": "Of those, runs that were denied or failed.",
                            "example": 2
                          }
                        },
                        "required": [
                          "workflowId",
                          "started",
                          "completed",
                          "interrupted"
                        ]
                      },
                      "description": "One entry per workflow that is not deleted and has at least one run that started in the window"
                    }
                  },
                  "required": [
                    "workflows"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/settings/abandoned-auto-close": {
      "get": {
        "operationId": "getQuillsWorkflowAbandonedAutoClose",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Get the abandoned-journey auto-close setting",
        "description": "Returns the workspace's abandoned-journey auto-close setting. Unset or invalid stored values read as the defaults. The setting is stored and kept through workspace transfers, but no automation acts on it yet. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The setting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether conversations whose customer abandoned the journey close automatically. Default false.",
                      "example": false
                    },
                    "waitMinutes": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 60,
                      "description": "Minutes to wait after the customer leaves before closing. Default 5.",
                      "example": 5
                    },
                    "keepIfEmailCaptured": {
                      "type": "boolean",
                      "description": "Whether to keep the conversation open when the customer left an email address. Default true.",
                      "example": true
                    }
                  },
                  "required": [
                    "enabled",
                    "waitMinutes",
                    "keepIfEmailCaptured"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsWorkflowAbandonedAutoClose",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Set the abandoned-journey auto-close setting",
        "description": "Changes the fields sent; fields left out keep their stored value. The setting is stored, but no automation acts on it yet. Records a `settings.workflow_abandoned_auto_close_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether conversations whose customer abandoned the journey close automatically. Default false.",
                    "example": false
                  },
                  "waitMinutes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60,
                    "description": "Minutes to wait after the customer leaves before closing. Default 5.",
                    "example": 5
                  },
                  "keepIfEmailCaptured": {
                    "type": "boolean",
                    "description": "Whether to keep the conversation open when the customer left an email address. Default true.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The setting after the change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether conversations whose customer abandoned the journey close automatically. Default false.",
                      "example": false
                    },
                    "waitMinutes": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 60,
                      "description": "Minutes to wait after the customer leaves before closing. Default 5.",
                      "example": 5
                    },
                    "keepIfEmailCaptured": {
                      "type": "boolean",
                      "description": "Whether to keep the conversation open when the customer left an email address. Default true.",
                      "example": true
                    }
                  },
                  "required": [
                    "enabled",
                    "waitMinutes",
                    "keepIfEmailCaptured"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/automation/settings/close-spam": {
      "get": {
        "operationId": "getQuillsWorkflowCloseSpam",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Get the close-spam setting",
        "description": "Returns the workspace's close-spam setting. An unset or invalid stored value reads as the default. The setting is stored and kept through workspace transfers, but no automation acts on it yet. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The setting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether conversations classified as spam close automatically. Default false.",
                      "example": false
                    }
                  },
                  "required": [
                    "enabled"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsWorkflowCloseSpam",
        "tags": [
          "Automation and SLAs"
        ],
        "summary": "Set the close-spam setting",
        "description": "Replaces the close-spam setting. The setting is stored, but no automation acts on it yet. Records a `settings.workflow_close_spam_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether conversations classified as spam close automatically. Default false.",
                    "example": false
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The setting after the change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether conversations classified as spam close automatically. Default false.",
                      "example": false
                    }
                  },
                  "required": [
                    "enabled"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/settings": {
      "get": {
        "operationId": "getQuillsAssistantSettings",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get the assistant settings",
        "description": "Returns the assistant's identity, customer-agent voice and knowledge, copilot Q&A and knowledge, and tool rules, with defaults filled in for anything not stored. `aiConfigured` is false when the instance has no AI provider. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The assistant settings and their revision",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revision": {
                      "type": "number",
                      "description": "Settings revision, increased by one on every update. Send it back on update.",
                      "example": 7
                    },
                    "aiConfigured": {
                      "type": "boolean",
                      "description": "Whether the instance has an AI provider configured. False: AI features do not run.",
                      "example": true
                    },
                    "embeddingsConfigured": {
                      "type": "boolean",
                      "description": "Whether the AI provider has an embedding model, which semantic search over knowledge needs",
                      "example": true
                    },
                    "identity": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Name that the assistant uses for itself. Default: Quinn.",
                          "example": "Quinn"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "The assistant's identity"
                    },
                    "agent": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "The customer agent answers widget and portal conversations",
                          "example": true
                        },
                        "productDescription": {
                          "type": "string",
                          "description": "Short description of the product, added to the customer agent's prompt. Empty string: none.",
                          "example": "Acme Cloud is a hosted backup service for small teams."
                        },
                        "voice": {
                          "type": "object",
                          "properties": {
                            "tone": {
                              "type": "string",
                              "enum": [
                                "friendly",
                                "balanced",
                                "formal"
                              ],
                              "description": "Tone that the customer agent writes in",
                              "example": "friendly"
                            },
                            "responseLength": {
                              "type": "string",
                              "enum": [
                                "concise",
                                "balanced",
                                "detailed"
                              ],
                              "description": "How long the customer agent's replies are",
                              "example": "concise"
                            },
                            "additionalInstructions": {
                              "type": "string",
                              "maxLength": 2000,
                              "description": "Extra instructions added to the customer agent's prompt. Empty string: none.",
                              "example": "Always greet the customer by first name."
                            }
                          },
                          "required": [
                            "tone",
                            "responseLength",
                            "additionalInstructions"
                          ],
                          "description": "The customer agent's writing style. Unset values read as balanced, balanced and an empty string."
                        },
                        "knowledge": {
                          "type": "object",
                          "properties": {
                            "helpCenter": {
                              "type": "boolean",
                              "description": "Whether answers may draw on published help center articles",
                              "example": true
                            },
                            "posts": {
                              "type": "boolean",
                              "description": "Whether answers may draw on feedback posts",
                              "example": false
                            },
                            "changelog": {
                              "type": "boolean",
                              "description": "Whether answers may draw on changelog entries",
                              "example": false
                            },
                            "documents": {
                              "type": "boolean",
                              "description": "Whether answers may draw on the assistant's documents and snippets",
                              "example": true
                            },
                            "status": {
                              "type": "boolean",
                              "description": "Whether answers may draw on the status page",
                              "example": false
                            }
                          },
                          "required": [
                            "helpCenter",
                            "posts",
                            "changelog",
                            "documents",
                            "status"
                          ],
                          "description": "Knowledge sources the customer agent may use. A missing or invalid stored flag reads as false."
                        },
                        "toolRules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "string",
                                "enum": [
                                  "search_help_center",
                                  "search_knowledge",
                                  "search_conversations",
                                  "set_conversation_status",
                                  "set_conversation_priority",
                                  "add_conversation_tag",
                                  "assign_conversation_team",
                                  "set_conversation_attribute",
                                  "add_private_note"
                                ],
                                "description": "The built-in assistant tool that the rule applies to",
                                "example": "set_conversation_status"
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "lookup",
                                  "ask",
                                  "auto_write",
                                  "disabled",
                                  "propose",
                                  "off"
                                ],
                                "description": "How the tool may be used. lookup: a read tool runs freely. ask: a write tool proposes a pending action that a teammate approves. auto_write: a write tool applies its change without approval. disabled: the tool is never offered. propose and off are legacy names for ask and disabled.",
                                "example": "ask"
                              }
                            },
                            "required": [
                              "tool",
                              "mode"
                            ]
                          },
                          "maxItems": 9,
                          "description": "Per-tool usage rules. A tool without a rule uses its default: read tools run as lookup, write tools as ask. A disabled rule always wins."
                        }
                      },
                      "required": [
                        "enabled",
                        "productDescription",
                        "voice",
                        "knowledge",
                        "toolRules"
                      ],
                      "description": "The customer-facing agent's settings"
                    },
                    "copilot": {
                      "type": "object",
                      "properties": {
                        "qa": {
                          "type": "boolean",
                          "description": "Whether teammates may ask the copilot questions about a conversation or ticket. Default: true.",
                          "example": true
                        },
                        "knowledge": {
                          "type": "object",
                          "properties": {
                            "helpCenter": {
                              "type": "boolean",
                              "description": "Whether answers may draw on published help center articles",
                              "example": true
                            },
                            "posts": {
                              "type": "boolean",
                              "description": "Whether answers may draw on feedback posts",
                              "example": false
                            },
                            "changelog": {
                              "type": "boolean",
                              "description": "Whether answers may draw on changelog entries",
                              "example": false
                            },
                            "documents": {
                              "type": "boolean",
                              "description": "Whether answers may draw on the assistant's documents and snippets",
                              "example": true
                            },
                            "status": {
                              "type": "boolean",
                              "description": "Whether answers may draw on the status page",
                              "example": false
                            },
                            "pastConversations": {
                              "type": "boolean",
                              "description": "Whether answers may draw on past conversations",
                              "example": false
                            },
                            "internalNotes": {
                              "type": "boolean",
                              "description": "Whether the conversation transcript given to the copilot includes internal notes",
                              "example": true
                            },
                            "tickets": {
                              "type": "boolean",
                              "description": "Whether answers may draw on tickets",
                              "example": false
                            }
                          },
                          "required": [
                            "helpCenter",
                            "posts",
                            "changelog",
                            "documents",
                            "status",
                            "pastConversations",
                            "internalNotes",
                            "tickets"
                          ],
                          "description": "Knowledge sources the teammate copilot may use. A missing or invalid stored flag reads as false."
                        },
                        "toolRules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "string",
                                "enum": [
                                  "search_help_center",
                                  "search_knowledge",
                                  "search_conversations",
                                  "set_conversation_status",
                                  "set_conversation_priority",
                                  "add_conversation_tag",
                                  "assign_conversation_team",
                                  "set_conversation_attribute",
                                  "add_private_note"
                                ],
                                "description": "The built-in assistant tool that the rule applies to",
                                "example": "set_conversation_status"
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "lookup",
                                  "ask",
                                  "auto_write",
                                  "disabled",
                                  "propose",
                                  "off"
                                ],
                                "description": "How the tool may be used. lookup: a read tool runs freely. ask: a write tool proposes a pending action that a teammate approves. auto_write: a write tool applies its change without approval. disabled: the tool is never offered. propose and off are legacy names for ask and disabled.",
                                "example": "ask"
                              }
                            },
                            "required": [
                              "tool",
                              "mode"
                            ]
                          },
                          "maxItems": 9,
                          "description": "Per-tool usage rules. A tool without a rule uses its default: read tools run as lookup, write tools as ask. A disabled rule always wins."
                        }
                      },
                      "required": [
                        "qa",
                        "knowledge",
                        "toolRules"
                      ],
                      "description": "The teammate copilot's settings"
                    }
                  },
                  "required": [
                    "revision",
                    "aiConfigured",
                    "embeddingsConfigured",
                    "identity",
                    "agent",
                    "copilot"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsAssistantSettings",
        "tags": [
          "AI assistant"
        ],
        "summary": "Update the assistant settings",
        "description": "Updates the assistant settings. Send the revision you read; another writer's change since then returns 409, and a successful update increases the revision by one. Each section you send replaces that section; omitted sections keep their current value. Records a `settings.assistant_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647,
                    "description": "The revision from your last read. A different current revision returns 409.",
                    "example": 7
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "New assistant name. Omit to keep the current name.",
                    "example": "Quinn"
                  },
                  "agentEnabled": {
                    "type": "boolean",
                    "description": "Turns the customer agent on or off for widget and portal conversations. Omit to keep.",
                    "example": true
                  },
                  "agentProductDescription": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "New product description for the customer agent's prompt. Empty string clears it; omit to keep.",
                    "example": "Acme Cloud is a hosted backup service for small teams."
                  },
                  "agentVoice": {
                    "type": "object",
                    "properties": {
                      "tone": {
                        "type": "string",
                        "enum": [
                          "friendly",
                          "balanced",
                          "formal"
                        ],
                        "description": "Tone that the customer agent writes in",
                        "example": "friendly"
                      },
                      "responseLength": {
                        "type": "string",
                        "enum": [
                          "concise",
                          "balanced",
                          "detailed"
                        ],
                        "description": "How long the customer agent's replies are",
                        "example": "concise"
                      },
                      "additionalInstructions": {
                        "type": "string",
                        "maxLength": 2000,
                        "description": "Extra instructions added to the customer agent's prompt. Empty string: none.",
                        "example": "Always greet the customer by first name."
                      }
                    },
                    "required": [
                      "tone",
                      "responseLength",
                      "additionalInstructions"
                    ],
                    "description": "Replaces the customer agent's voice. Omit to keep."
                  },
                  "agentKnowledge": {
                    "type": "object",
                    "properties": {
                      "helpCenter": {
                        "type": "boolean",
                        "description": "Whether answers may draw on published help center articles",
                        "example": true
                      },
                      "posts": {
                        "type": "boolean",
                        "description": "Whether answers may draw on feedback posts",
                        "example": false
                      },
                      "changelog": {
                        "type": "boolean",
                        "description": "Whether answers may draw on changelog entries",
                        "example": false
                      },
                      "documents": {
                        "type": "boolean",
                        "description": "Whether answers may draw on the assistant's documents and snippets",
                        "example": true
                      },
                      "status": {
                        "type": "boolean",
                        "description": "Whether answers may draw on the status page",
                        "example": false
                      }
                    },
                    "required": [
                      "helpCenter",
                      "posts",
                      "changelog",
                      "documents",
                      "status"
                    ],
                    "description": "Replaces the customer agent's knowledge sources. Omit to keep."
                  },
                  "agentToolRules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "tool": {
                          "type": "string",
                          "enum": [
                            "search_help_center",
                            "search_knowledge",
                            "search_conversations",
                            "set_conversation_status",
                            "set_conversation_priority",
                            "add_conversation_tag",
                            "assign_conversation_team",
                            "set_conversation_attribute",
                            "add_private_note"
                          ],
                          "description": "The built-in assistant tool that the rule applies to",
                          "example": "set_conversation_status"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "lookup",
                            "ask",
                            "auto_write",
                            "disabled",
                            "propose",
                            "off"
                          ],
                          "description": "How the tool may be used. lookup: a read tool runs freely. ask: a write tool proposes a pending action that a teammate approves. auto_write: a write tool applies its change without approval. disabled: the tool is never offered. propose and off are legacy names for ask and disabled.",
                          "example": "ask"
                        }
                      },
                      "required": [
                        "tool",
                        "mode"
                      ]
                    },
                    "maxItems": 9,
                    "description": "Replaces all of the customer agent's tool rules. Omit to keep."
                  },
                  "copilotQa": {
                    "type": "boolean",
                    "description": "Turns copilot Q&A on or off. Omit to keep.",
                    "example": true
                  },
                  "copilotKnowledge": {
                    "type": "object",
                    "properties": {
                      "helpCenter": {
                        "type": "boolean",
                        "description": "Whether answers may draw on published help center articles",
                        "example": true
                      },
                      "posts": {
                        "type": "boolean",
                        "description": "Whether answers may draw on feedback posts",
                        "example": false
                      },
                      "changelog": {
                        "type": "boolean",
                        "description": "Whether answers may draw on changelog entries",
                        "example": false
                      },
                      "documents": {
                        "type": "boolean",
                        "description": "Whether answers may draw on the assistant's documents and snippets",
                        "example": true
                      },
                      "status": {
                        "type": "boolean",
                        "description": "Whether answers may draw on the status page",
                        "example": false
                      },
                      "pastConversations": {
                        "type": "boolean",
                        "description": "Whether answers may draw on past conversations",
                        "example": false
                      },
                      "internalNotes": {
                        "type": "boolean",
                        "description": "Whether the conversation transcript given to the copilot includes internal notes",
                        "example": true
                      },
                      "tickets": {
                        "type": "boolean",
                        "description": "Whether answers may draw on tickets",
                        "example": false
                      }
                    },
                    "required": [
                      "helpCenter",
                      "posts",
                      "changelog",
                      "documents",
                      "status",
                      "pastConversations",
                      "internalNotes",
                      "tickets"
                    ],
                    "description": "Replaces the copilot's knowledge sources. Omit to keep."
                  },
                  "copilotToolRules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "tool": {
                          "type": "string",
                          "enum": [
                            "search_help_center",
                            "search_knowledge",
                            "search_conversations",
                            "set_conversation_status",
                            "set_conversation_priority",
                            "add_conversation_tag",
                            "assign_conversation_team",
                            "set_conversation_attribute",
                            "add_private_note"
                          ],
                          "description": "The built-in assistant tool that the rule applies to",
                          "example": "set_conversation_status"
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "lookup",
                            "ask",
                            "auto_write",
                            "disabled",
                            "propose",
                            "off"
                          ],
                          "description": "How the tool may be used. lookup: a read tool runs freely. ask: a write tool proposes a pending action that a teammate approves. auto_write: a write tool applies its change without approval. disabled: the tool is never offered. propose and off are legacy names for ask and disabled.",
                          "example": "ask"
                        }
                      },
                      "required": [
                        "tool",
                        "mode"
                      ]
                    },
                    "maxItems": 9,
                    "description": "Replaces all of the copilot's tool rules. Omit to keep."
                  }
                },
                "required": [
                  "revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated assistant settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revision": {
                      "type": "number",
                      "description": "Settings revision, increased by one on every update. Send it back on update.",
                      "example": 7
                    },
                    "aiConfigured": {
                      "type": "boolean",
                      "description": "Whether the instance has an AI provider configured. False: AI features do not run.",
                      "example": true
                    },
                    "embeddingsConfigured": {
                      "type": "boolean",
                      "description": "Whether the AI provider has an embedding model, which semantic search over knowledge needs",
                      "example": true
                    },
                    "identity": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Name that the assistant uses for itself. Default: Quinn.",
                          "example": "Quinn"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "description": "The assistant's identity"
                    },
                    "agent": {
                      "type": "object",
                      "properties": {
                        "enabled": {
                          "type": "boolean",
                          "description": "The customer agent answers widget and portal conversations",
                          "example": true
                        },
                        "productDescription": {
                          "type": "string",
                          "description": "Short description of the product, added to the customer agent's prompt. Empty string: none.",
                          "example": "Acme Cloud is a hosted backup service for small teams."
                        },
                        "voice": {
                          "type": "object",
                          "properties": {
                            "tone": {
                              "type": "string",
                              "enum": [
                                "friendly",
                                "balanced",
                                "formal"
                              ],
                              "description": "Tone that the customer agent writes in",
                              "example": "friendly"
                            },
                            "responseLength": {
                              "type": "string",
                              "enum": [
                                "concise",
                                "balanced",
                                "detailed"
                              ],
                              "description": "How long the customer agent's replies are",
                              "example": "concise"
                            },
                            "additionalInstructions": {
                              "type": "string",
                              "maxLength": 2000,
                              "description": "Extra instructions added to the customer agent's prompt. Empty string: none.",
                              "example": "Always greet the customer by first name."
                            }
                          },
                          "required": [
                            "tone",
                            "responseLength",
                            "additionalInstructions"
                          ],
                          "description": "The customer agent's writing style. Unset values read as balanced, balanced and an empty string."
                        },
                        "knowledge": {
                          "type": "object",
                          "properties": {
                            "helpCenter": {
                              "type": "boolean",
                              "description": "Whether answers may draw on published help center articles",
                              "example": true
                            },
                            "posts": {
                              "type": "boolean",
                              "description": "Whether answers may draw on feedback posts",
                              "example": false
                            },
                            "changelog": {
                              "type": "boolean",
                              "description": "Whether answers may draw on changelog entries",
                              "example": false
                            },
                            "documents": {
                              "type": "boolean",
                              "description": "Whether answers may draw on the assistant's documents and snippets",
                              "example": true
                            },
                            "status": {
                              "type": "boolean",
                              "description": "Whether answers may draw on the status page",
                              "example": false
                            }
                          },
                          "required": [
                            "helpCenter",
                            "posts",
                            "changelog",
                            "documents",
                            "status"
                          ],
                          "description": "Knowledge sources the customer agent may use. A missing or invalid stored flag reads as false."
                        },
                        "toolRules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "string",
                                "enum": [
                                  "search_help_center",
                                  "search_knowledge",
                                  "search_conversations",
                                  "set_conversation_status",
                                  "set_conversation_priority",
                                  "add_conversation_tag",
                                  "assign_conversation_team",
                                  "set_conversation_attribute",
                                  "add_private_note"
                                ],
                                "description": "The built-in assistant tool that the rule applies to",
                                "example": "set_conversation_status"
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "lookup",
                                  "ask",
                                  "auto_write",
                                  "disabled",
                                  "propose",
                                  "off"
                                ],
                                "description": "How the tool may be used. lookup: a read tool runs freely. ask: a write tool proposes a pending action that a teammate approves. auto_write: a write tool applies its change without approval. disabled: the tool is never offered. propose and off are legacy names for ask and disabled.",
                                "example": "ask"
                              }
                            },
                            "required": [
                              "tool",
                              "mode"
                            ]
                          },
                          "maxItems": 9,
                          "description": "Per-tool usage rules. A tool without a rule uses its default: read tools run as lookup, write tools as ask. A disabled rule always wins."
                        }
                      },
                      "required": [
                        "enabled",
                        "productDescription",
                        "voice",
                        "knowledge",
                        "toolRules"
                      ],
                      "description": "The customer-facing agent's settings"
                    },
                    "copilot": {
                      "type": "object",
                      "properties": {
                        "qa": {
                          "type": "boolean",
                          "description": "Whether teammates may ask the copilot questions about a conversation or ticket. Default: true.",
                          "example": true
                        },
                        "knowledge": {
                          "type": "object",
                          "properties": {
                            "helpCenter": {
                              "type": "boolean",
                              "description": "Whether answers may draw on published help center articles",
                              "example": true
                            },
                            "posts": {
                              "type": "boolean",
                              "description": "Whether answers may draw on feedback posts",
                              "example": false
                            },
                            "changelog": {
                              "type": "boolean",
                              "description": "Whether answers may draw on changelog entries",
                              "example": false
                            },
                            "documents": {
                              "type": "boolean",
                              "description": "Whether answers may draw on the assistant's documents and snippets",
                              "example": true
                            },
                            "status": {
                              "type": "boolean",
                              "description": "Whether answers may draw on the status page",
                              "example": false
                            },
                            "pastConversations": {
                              "type": "boolean",
                              "description": "Whether answers may draw on past conversations",
                              "example": false
                            },
                            "internalNotes": {
                              "type": "boolean",
                              "description": "Whether the conversation transcript given to the copilot includes internal notes",
                              "example": true
                            },
                            "tickets": {
                              "type": "boolean",
                              "description": "Whether answers may draw on tickets",
                              "example": false
                            }
                          },
                          "required": [
                            "helpCenter",
                            "posts",
                            "changelog",
                            "documents",
                            "status",
                            "pastConversations",
                            "internalNotes",
                            "tickets"
                          ],
                          "description": "Knowledge sources the teammate copilot may use. A missing or invalid stored flag reads as false."
                        },
                        "toolRules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "tool": {
                                "type": "string",
                                "enum": [
                                  "search_help_center",
                                  "search_knowledge",
                                  "search_conversations",
                                  "set_conversation_status",
                                  "set_conversation_priority",
                                  "add_conversation_tag",
                                  "assign_conversation_team",
                                  "set_conversation_attribute",
                                  "add_private_note"
                                ],
                                "description": "The built-in assistant tool that the rule applies to",
                                "example": "set_conversation_status"
                              },
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "lookup",
                                  "ask",
                                  "auto_write",
                                  "disabled",
                                  "propose",
                                  "off"
                                ],
                                "description": "How the tool may be used. lookup: a read tool runs freely. ask: a write tool proposes a pending action that a teammate approves. auto_write: a write tool applies its change without approval. disabled: the tool is never offered. propose and off are legacy names for ask and disabled.",
                                "example": "ask"
                              }
                            },
                            "required": [
                              "tool",
                              "mode"
                            ]
                          },
                          "maxItems": 9,
                          "description": "Per-tool usage rules. A tool without a rule uses its default: read tools run as lookup, write tools as ask. A disabled rule always wins."
                        }
                      },
                      "required": [
                        "qa",
                        "knowledge",
                        "toolRules"
                      ],
                      "description": "The teammate copilot's settings"
                    }
                  },
                  "required": [
                    "revision",
                    "aiConfigured",
                    "embeddingsConfigured",
                    "identity",
                    "agent",
                    "copilot"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The settings revision changed since you read it; reload and retry",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/budget": {
      "get": {
        "operationId": "getQuillsAssistantBudget",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get AI spend caps, live usage, projected spend and BYOK status",
        "description": "Returns the workspace's AI budget settings, this UTC day's and month's spend and tokens, a month-end spend projection at the current daily rate, spend by feature (top 50) and by conversation (top 20), and the BYOK provider settings. Never returns API keys. Spend uses the provider-reported cost when known, otherwise an estimate. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "AI budget configuration, spend telemetry and BYOK status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "config": {
                      "type": "object",
                      "properties": {
                        "dailyCapUsd": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 1000000,
                          "default": null,
                          "description": "AI spend cap per UTC day, in US dollars. Null: no daily cap.",
                          "example": 5
                        },
                        "monthlyCapUsd": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 1000000,
                          "default": null,
                          "description": "AI spend cap per UTC calendar month, in US dollars. Null: no monthly cost cap.",
                          "example": 100
                        },
                        "monthlyTokenCap": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 1,
                          "maximum": 1000000000000,
                          "default": null,
                          "description": "AI token cap per UTC calendar month (input plus output tokens). When the server also sets a monthly token limit, the lower of the two applies. Null: no workspace token cap. A call that would pass the token cap is refused.",
                          "example": 20000000
                        },
                        "alertThresholdPercent": {
                          "type": "integer",
                          "minimum": 10,
                          "maximum": 100,
                          "default": 80,
                          "description": "Usage percentage of the closest cap at which `alertTriggered` turns true. Defaults to 80.",
                          "example": 80
                        },
                        "degradeBehavior": {
                          "type": "string",
                          "enum": [
                            "pause",
                            "draft_mode",
                            "cheaper_model"
                          ],
                          "default": "draft_mode",
                          "description": "What happens once a cap is reached: `pause` refuses AI calls, and the customer agent hands new conversations to a teammate; `draft_mode` keeps the customer agent running but saves its answers as drafts for a teammate to approve; `cheaper_model` switches the customer agent to `cheaperModel`. Defaults to `draft_mode`.",
                          "example": "draft_mode"
                        },
                        "cheaperModel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 120,
                          "default": null,
                          "description": "Model name that the customer agent uses when `degradeBehavior` is `cheaper_model` and a cap is reached. Null: the provider's configured fast model.",
                          "example": "gpt-4o-mini"
                        }
                      },
                      "description": "The workspace's AI budget settings"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "dailySpendUsd": {
                          "type": "number",
                          "description": "AI spend since the start of the current UTC day, in US dollars, including calls reserved in the last 5 minutes",
                          "example": 1.284512
                        },
                        "monthlySpendUsd": {
                          "type": "number",
                          "description": "AI spend since the start of the current UTC month, in US dollars, including calls reserved in the last 5 minutes",
                          "example": 42.06713
                        },
                        "monthlyTokens": {
                          "type": "number",
                          "description": "Input plus output tokens used since the start of the current UTC month",
                          "example": 8450210
                        },
                        "projectedMonthlySpendUsd": {
                          "type": "number",
                          "description": "Month-end spend in US dollars if the month continues at its average daily rate so far",
                          "example": 97.5
                        },
                        "usagePercent": {
                          "type": "number",
                          "description": "Usage of the closest cap as a percentage (0 to 100 or more), rounded to one decimal. 0 when no cap is set.",
                          "example": 42.1
                        },
                        "alertTriggered": {
                          "type": "boolean",
                          "description": "Whether `usagePercent` reached the configured `alertThresholdPercent`. Always false when no cap is set.",
                          "example": false
                        },
                        "degradedMode": {
                          "type": "string",
                          "enum": [
                            "normal",
                            "pause",
                            "draft_mode",
                            "cheaper_model"
                          ],
                          "description": "The behavior in effect now: `normal` while every cap has room, otherwise the configured `degradeBehavior`",
                          "example": "normal"
                        },
                        "reason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The first cap that was reached: `daily_usd_cap_reached`, `monthly_usd_cap_reached` or `monthly_token_cap_reached`. Null while every cap has room.",
                          "example": null
                        },
                        "byStep": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "step": {
                                "type": "string",
                                "description": "AI feature (pipeline step) that made the calls",
                                "example": "customer_agent"
                              },
                              "calls": {
                                "type": "number",
                                "description": "Calls made this month",
                                "example": 1240
                              },
                              "totalTokens": {
                                "type": "number",
                                "description": "Input plus output tokens used this month",
                                "example": 3200400
                              },
                              "spendUsd": {
                                "type": "number",
                                "description": "Spend this month, in US dollars",
                                "example": 18.42
                              }
                            },
                            "required": [
                              "step",
                              "calls",
                              "totalTokens",
                              "spendUsd"
                            ]
                          },
                          "description": "Spend this UTC month by AI feature, highest spend first, at most 50 entries. Reservations are left out."
                        },
                        "topConversations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "conversationId": {
                                "type": "string",
                                "description": "Conversation that the AI calls served",
                                "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                              },
                              "calls": {
                                "type": "number",
                                "description": "Calls made this month for the conversation",
                                "example": 14
                              },
                              "totalTokens": {
                                "type": "number",
                                "description": "Input plus output tokens used this month",
                                "example": 48200
                              },
                              "spendUsd": {
                                "type": "number",
                                "description": "Spend this month, in US dollars",
                                "example": 0.31
                              }
                            },
                            "required": [
                              "conversationId",
                              "calls",
                              "totalTokens",
                              "spendUsd"
                            ]
                          },
                          "description": "The 20 conversations with the highest AI spend this UTC month, highest first. Reservations are left out."
                        }
                      },
                      "required": [
                        "dailySpendUsd",
                        "monthlySpendUsd",
                        "monthlyTokens",
                        "projectedMonthlySpendUsd",
                        "usagePercent",
                        "alertTriggered",
                        "degradedMode",
                        "reason",
                        "byStep",
                        "topConversations"
                      ],
                      "description": "Live AI usage against the caps"
                    },
                    "provider": {
                      "type": "object",
                      "properties": {
                        "hasCustomKey": {
                          "type": "boolean",
                          "description": "Whether the workspace stores its own (BYOK) provider API key. The key itself is never returned.",
                          "example": true
                        },
                        "providerName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Display name of the BYOK provider. Null when no BYOK credentials are stored.",
                          "example": "OpenAI"
                        },
                        "baseUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "HTTPS base URL of the provider's OpenAI-compatible API. Null: the server's default provider URL.",
                          "example": "https://api.openai.com/v1"
                        },
                        "chatModel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Chat model used with the BYOK key. Null: the server's default model.",
                          "example": "gpt-4o"
                        },
                        "embeddingModel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Embedding model used with the BYOK key. Null: the server's default embedding model.",
                          "example": "text-embedding-3-small"
                        }
                      },
                      "required": [
                        "hasCustomKey",
                        "providerName",
                        "baseUrl",
                        "chatModel",
                        "embeddingModel"
                      ],
                      "description": "The workspace's bring-your-own-key (BYOK) AI provider settings, without the API key"
                    }
                  },
                  "required": [
                    "config",
                    "usage",
                    "provider"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsAssistantBudget",
        "tags": [
          "AI assistant"
        ],
        "summary": "Update AI spend caps and degradation behavior",
        "description": "Changes the fields that the request sends and keeps the others. Send null to remove a cap or the cheaper model. At least one field is required. Records a `settings.ai_budget_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dailyCapUsd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "New AI spend cap per UTC day, in US dollars. Null removes the cap; omit to keep it.",
                    "example": 5
                  },
                  "monthlyCapUsd": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 1000000,
                    "description": "New AI spend cap per UTC month, in US dollars. Null removes the cap; omit to keep it.",
                    "example": 100
                  },
                  "monthlyTokenCap": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 1000000000000,
                    "description": "New token cap per UTC month. Null removes the cap; omit to keep it.",
                    "example": 20000000
                  },
                  "alertThresholdPercent": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 100,
                    "description": "New usage percentage at which the budget alert triggers. Omit to keep it.",
                    "example": 80
                  },
                  "degradeBehavior": {
                    "type": "string",
                    "enum": [
                      "pause",
                      "draft_mode",
                      "cheaper_model"
                    ],
                    "description": "New behavior once a cap is reached: `pause`, `draft_mode` or `cheaper_model`. Omit to keep it.",
                    "example": "cheaper_model"
                  },
                  "cheaperModel": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 120,
                    "description": "New model for `cheaper_model` degradation. Null clears it; omit to keep it.",
                    "example": "gpt-4o-mini"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved AI budget configuration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "config": {
                      "type": "object",
                      "properties": {
                        "dailyCapUsd": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 1000000,
                          "default": null,
                          "description": "AI spend cap per UTC day, in US dollars. Null: no daily cap.",
                          "example": 5
                        },
                        "monthlyCapUsd": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 1000000,
                          "default": null,
                          "description": "AI spend cap per UTC calendar month, in US dollars. Null: no monthly cost cap.",
                          "example": 100
                        },
                        "monthlyTokenCap": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 1,
                          "maximum": 1000000000000,
                          "default": null,
                          "description": "AI token cap per UTC calendar month (input plus output tokens). When the server also sets a monthly token limit, the lower of the two applies. Null: no workspace token cap. A call that would pass the token cap is refused.",
                          "example": 20000000
                        },
                        "alertThresholdPercent": {
                          "type": "integer",
                          "minimum": 10,
                          "maximum": 100,
                          "default": 80,
                          "description": "Usage percentage of the closest cap at which `alertTriggered` turns true. Defaults to 80.",
                          "example": 80
                        },
                        "degradeBehavior": {
                          "type": "string",
                          "enum": [
                            "pause",
                            "draft_mode",
                            "cheaper_model"
                          ],
                          "default": "draft_mode",
                          "description": "What happens once a cap is reached: `pause` refuses AI calls, and the customer agent hands new conversations to a teammate; `draft_mode` keeps the customer agent running but saves its answers as drafts for a teammate to approve; `cheaper_model` switches the customer agent to `cheaperModel`. Defaults to `draft_mode`.",
                          "example": "draft_mode"
                        },
                        "cheaperModel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "maxLength": 120,
                          "default": null,
                          "description": "Model name that the customer agent uses when `degradeBehavior` is `cheaper_model` and a cap is reached. Null: the provider's configured fast model.",
                          "example": "gpt-4o-mini"
                        }
                      },
                      "description": "The saved AI budget settings"
                    }
                  },
                  "required": [
                    "config"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/provider-keys": {
      "put": {
        "operationId": "setQuillsAssistantProviderKeys",
        "tags": [
          "AI assistant"
        ],
        "summary": "Configure workspace BYOK AI provider credentials",
        "description": "Replaces the workspace's bring-your-own-key AI provider settings. The API key is encrypted with the server's NOTIFICATION_SECRET_ENCRYPTION_KEY and only the ciphertext is stored; it is never returned. Once saved, the customer agent uses this key, URL and models instead of the server defaults; a key it cannot decrypt falls back to the server defaults. Records a `settings.ai_provider_keys_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60,
                    "description": "Display name of the provider",
                    "example": "OpenAI"
                  },
                  "baseUrl": {
                    "type": "string",
                    "maxLength": 300,
                    "format": "uri",
                    "description": "Base URL of the provider's OpenAI-compatible API. Must be a public https:// URL without credentials. Omit to use the server's default provider URL.",
                    "example": "https://api.openai.com/v1"
                  },
                  "apiKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 400,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "The provider API key. Write-only; stored encrypted.",
                    "example": "sk-example-0123456789abcdef"
                  },
                  "chatModel": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Chat model to use with this key. Omit to use the server's default model.",
                    "example": "gpt-4o"
                  },
                  "embeddingModel": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Embedding model to use with this key. Omit to use the server's default embedding model.",
                    "example": "text-embedding-3-small"
                  }
                },
                "required": [
                  "providerName",
                  "apiKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved BYOK provider metadata (never includes apiKey)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "provider": {
                      "type": "object",
                      "properties": {
                        "hasCustomKey": {
                          "type": "boolean",
                          "description": "Whether the workspace stores its own (BYOK) provider API key. The key itself is never returned.",
                          "example": true
                        },
                        "providerName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Display name of the BYOK provider. Null when no BYOK credentials are stored.",
                          "example": "OpenAI"
                        },
                        "baseUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "HTTPS base URL of the provider's OpenAI-compatible API. Null: the server's default provider URL.",
                          "example": "https://api.openai.com/v1"
                        },
                        "chatModel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Chat model used with the BYOK key. Null: the server's default model.",
                          "example": "gpt-4o"
                        },
                        "embeddingModel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Embedding model used with the BYOK key. Null: the server's default embedding model.",
                          "example": "text-embedding-3-small"
                        }
                      },
                      "required": [
                        "hasCustomKey",
                        "providerName",
                        "baseUrl",
                        "chatModel",
                        "embeddingModel"
                      ],
                      "description": "The workspace's bring-your-own-key (BYOK) AI provider settings, without the API key"
                    }
                  },
                  "required": [
                    "provider"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "baseUrl is not a clean https:// URL, carries credentials, or points to a private or disallowed address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store BYOK AI credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsAssistantProviderKeys",
        "tags": [
          "AI assistant"
        ],
        "summary": "Remove workspace BYOK AI provider credentials",
        "description": "Deletes the stored BYOK provider settings and encrypted key; the customer agent goes back to the server defaults. Succeeds when nothing is stored. Records a `settings.ai_provider_keys_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The cleared BYOK provider settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "provider": {
                      "type": "object",
                      "properties": {
                        "hasCustomKey": {
                          "type": "boolean",
                          "description": "Whether the workspace stores its own (BYOK) provider API key. The key itself is never returned.",
                          "example": true
                        },
                        "providerName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Display name of the BYOK provider. Null when no BYOK credentials are stored.",
                          "example": "OpenAI"
                        },
                        "baseUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "HTTPS base URL of the provider's OpenAI-compatible API. Null: the server's default provider URL.",
                          "example": "https://api.openai.com/v1"
                        },
                        "chatModel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Chat model used with the BYOK key. Null: the server's default model.",
                          "example": "gpt-4o"
                        },
                        "embeddingModel": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Embedding model used with the BYOK key. Null: the server's default embedding model.",
                          "example": "text-embedding-3-small"
                        }
                      },
                      "required": [
                        "hasCustomKey",
                        "providerName",
                        "baseUrl",
                        "chatModel",
                        "embeddingModel"
                      ],
                      "description": "The workspace's bring-your-own-key (BYOK) AI provider settings, without the API key"
                    }
                  },
                  "required": [
                    "provider"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/guidance-rules": {
      "get": {
        "operationId": "listQuillsGuidanceRules",
        "tags": [
          "AI assistant"
        ],
        "summary": "List the assistant guidance rules",
        "description": "Lists the guidance rules that steer the customer agent and the copilot, in run order (lower priority first, then oldest first), at most 100. Each assistant's prompt carries its first 20 enabled rules. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "agent",
                "copilot"
              ],
              "description": "Only rules for this assistant: `agent` (customer agent) or `copilot`. Omit for both.",
              "example": "copilot"
            },
            "required": false,
            "description": "Only rules for this assistant: `agent` (customer agent) or `copilot`. Omit for both.",
            "name": "agent",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The guidance rules",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the guidance rule",
                            "example": "assistant_guidance_01m8rxzh33enbtnx9e5cnyvav0"
                          },
                          "name": {
                            "type": "string",
                            "description": "Short name, also shown to the model with the instruction",
                            "example": "Tone for billing questions"
                          },
                          "appliesWhen": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Condition, in plain language, under which the model should apply the instruction. Null: the instruction always applies.",
                            "example": "the customer asks about an invoice"
                          },
                          "instruction": {
                            "type": "string",
                            "description": "What the assistant should do, added to its system prompt",
                            "example": "Link the billing settings page and offer to resend the invoice."
                          },
                          "agent": {
                            "type": "string",
                            "enum": [
                              "agent",
                              "copilot"
                            ],
                            "description": "The assistant that follows the rule: `agent` (the customer agent) or `copilot` (the teammate copilot)",
                            "example": "agent"
                          },
                          "enabled": {
                            "type": "boolean",
                            "description": "Whether the rule is added to the assistant's prompt",
                            "example": true
                          },
                          "priority": {
                            "type": "number",
                            "description": "Run order: lower numbers come first. Set by creation order and by reordering.",
                            "example": 0
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the rule was created",
                            "example": "2026-11-02T09:30:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the rule was last changed",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "appliesWhen",
                          "instruction",
                          "agent",
                          "enabled",
                          "priority",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "The rules, in run order"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsGuidanceRule",
        "tags": [
          "AI assistant"
        ],
        "summary": "Create an assistant guidance rule",
        "description": "Creates a guidance rule that is added to the chosen assistant's system prompt from its next answer. A new rule runs last. A workspace has at most 100 rules. Records an `assistant_guidance.created` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Short name, also shown to the model with the instruction",
                    "example": "Tone for billing questions"
                  },
                  "appliesWhen": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 500,
                    "default": null,
                    "description": "Condition, in plain language, under which the model should apply the instruction. Null or omitted: the instruction always applies.",
                    "example": "the customer asks about an invoice"
                  },
                  "instruction": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "What the assistant should do, added to its system prompt",
                    "example": "Link the billing settings page and offer to resend the invoice."
                  },
                  "agent": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "copilot"
                    ],
                    "description": "The assistant that follows the rule: `agent` (the customer agent) or `copilot` (the teammate copilot)",
                    "example": "agent"
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether the rule is added to the assistant's prompt. Defaults to true.",
                    "example": true
                  }
                },
                "required": [
                  "name",
                  "instruction",
                  "agent"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new rule",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the guidance rule",
                      "example": "assistant_guidance_01m8rxzh33enbtnx9e5cnyvav0"
                    },
                    "name": {
                      "type": "string",
                      "description": "Short name, also shown to the model with the instruction",
                      "example": "Tone for billing questions"
                    },
                    "appliesWhen": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Condition, in plain language, under which the model should apply the instruction. Null: the instruction always applies.",
                      "example": "the customer asks about an invoice"
                    },
                    "instruction": {
                      "type": "string",
                      "description": "What the assistant should do, added to its system prompt",
                      "example": "Link the billing settings page and offer to resend the invoice."
                    },
                    "agent": {
                      "type": "string",
                      "enum": [
                        "agent",
                        "copilot"
                      ],
                      "description": "The assistant that follows the rule: `agent` (the customer agent) or `copilot` (the teammate copilot)",
                      "example": "agent"
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the rule is added to the assistant's prompt",
                      "example": true
                    },
                    "priority": {
                      "type": "number",
                      "description": "Run order: lower numbers come first. Set by creation order and by reordering.",
                      "example": 0
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the rule was created",
                      "example": "2026-11-02T09:30:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the rule was last changed",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "appliesWhen",
                    "instruction",
                    "agent",
                    "enabled",
                    "priority",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace already has 100 guidance rules",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/guidance-rules/stats": {
      "get": {
        "operationId": "getQuillsGuidanceRuleStats",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get how often each guidance rule was applied",
        "description": "Counts, for each existing rule, the assistant answers of the last 90 days whose prompt carried the rule, from the AI usage log. Sorted in run order, at most 100. A rule in the prompt was available to the model; the count does not tell whether the model followed it. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "One entry per existing rule",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ruleId": {
                            "type": "string",
                            "description": "ID of the guidance rule",
                            "example": "assistant_guidance_01m8rxzh33enbtnx9e5cnyvav0"
                          },
                          "appliedCount": {
                            "type": "number",
                            "description": "Assistant answers in the last 90 days whose prompt carried the rule",
                            "example": 37
                          },
                          "lastAppliedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the rule was last carried in a prompt, within the last 90 days. Null when it was not.",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "ruleId",
                          "appliedCount",
                          "lastAppliedAt"
                        ]
                      },
                      "description": "One entry per existing rule, in run order"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/guidance-rules/order": {
      "put": {
        "operationId": "reorderQuillsGuidanceRules",
        "tags": [
          "AI assistant"
        ],
        "summary": "Reorder the assistant guidance rules",
        "description": "Sets the run order of all guidance rules, for both assistants. Send every rule's ID once, in run order; the position in the list becomes the priority. A missing, unknown or repeated ID answers 409, 404 or 400 and changes nothing. Records an `assistant_guidance.reordered` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ruleIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `assistant_guidance` prefix. Requests also accept the bare UUID.",
                      "example": "assistant_guidance_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Every guidance rule ID of the workspace, each once, in the new run order",
                    "example": [
                      "assistant_guidance_01m8rxzh33enbtnx9e5cnyvav0",
                      "assistant_guidance_01m8rxfrbhfzr9r85kz3w8x1qa"
                    ]
                  }
                },
                "required": [
                  "ruleIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The rules in their new order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the guidance rule",
                            "example": "assistant_guidance_01m8rxzh33enbtnx9e5cnyvav0"
                          },
                          "name": {
                            "type": "string",
                            "description": "Short name, also shown to the model with the instruction",
                            "example": "Tone for billing questions"
                          },
                          "appliesWhen": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Condition, in plain language, under which the model should apply the instruction. Null: the instruction always applies.",
                            "example": "the customer asks about an invoice"
                          },
                          "instruction": {
                            "type": "string",
                            "description": "What the assistant should do, added to its system prompt",
                            "example": "Link the billing settings page and offer to resend the invoice."
                          },
                          "agent": {
                            "type": "string",
                            "enum": [
                              "agent",
                              "copilot"
                            ],
                            "description": "The assistant that follows the rule: `agent` (the customer agent) or `copilot` (the teammate copilot)",
                            "example": "agent"
                          },
                          "enabled": {
                            "type": "boolean",
                            "description": "Whether the rule is added to the assistant's prompt",
                            "example": true
                          },
                          "priority": {
                            "type": "number",
                            "description": "Run order: lower numbers come first. Set by creation order and by reordering.",
                            "example": 0
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the rule was created",
                            "example": "2026-11-02T09:30:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the rule was last changed",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "appliesWhen",
                          "instruction",
                          "agent",
                          "enabled",
                          "priority",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "The rules, in their new run order"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "An ID does not match a guidance rule of this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The list does not contain every guidance rule of the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/guidance-rules/{ruleId}": {
      "patch": {
        "operationId": "updateQuillsGuidanceRule",
        "tags": [
          "AI assistant"
        ],
        "summary": "Update an assistant guidance rule",
        "description": "Changes the fields that the request sends and keeps the others; the run order does not change. Records an `assistant_guidance.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the guidance rule, as a TypeID or UUID",
              "example": "assistant_guidance_01m8rxzh33enbtnx9e5cnyvav0"
            },
            "required": true,
            "description": "ID of the guidance rule, as a TypeID or UUID",
            "name": "ruleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "New name. Omit to keep it.",
                    "example": "Tone for billing questions"
                  },
                  "appliesWhen": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "New condition. Null makes the instruction always apply; omit to keep the current condition.",
                    "example": "the customer asks about an invoice"
                  },
                  "instruction": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "New instruction. Omit to keep it.",
                    "example": "Link the billing settings page and offer to resend the invoice."
                  },
                  "agent": {
                    "type": "string",
                    "enum": [
                      "agent",
                      "copilot"
                    ],
                    "description": "Move the rule to another assistant: `agent` or `copilot`. Omit to keep it.",
                    "example": "agent"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "false takes the rule out of the prompt. Omit to keep it.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated rule",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the guidance rule",
                      "example": "assistant_guidance_01m8rxzh33enbtnx9e5cnyvav0"
                    },
                    "name": {
                      "type": "string",
                      "description": "Short name, also shown to the model with the instruction",
                      "example": "Tone for billing questions"
                    },
                    "appliesWhen": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Condition, in plain language, under which the model should apply the instruction. Null: the instruction always applies.",
                      "example": "the customer asks about an invoice"
                    },
                    "instruction": {
                      "type": "string",
                      "description": "What the assistant should do, added to its system prompt",
                      "example": "Link the billing settings page and offer to resend the invoice."
                    },
                    "agent": {
                      "type": "string",
                      "enum": [
                        "agent",
                        "copilot"
                      ],
                      "description": "The assistant that follows the rule: `agent` (the customer agent) or `copilot` (the teammate copilot)",
                      "example": "agent"
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the rule is added to the assistant's prompt",
                      "example": true
                    },
                    "priority": {
                      "type": "number",
                      "description": "Run order: lower numbers come first. Set by creation order and by reordering.",
                      "example": 0
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the rule was created",
                      "example": "2026-11-02T09:30:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the rule was last changed",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "appliesWhen",
                    "instruction",
                    "agent",
                    "enabled",
                    "priority",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No guidance rule with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsGuidanceRule",
        "tags": [
          "AI assistant"
        ],
        "summary": "Delete an assistant guidance rule",
        "description": "Permanently deletes a guidance rule. Records an `assistant_guidance.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the guidance rule, as a TypeID or UUID",
              "example": "assistant_guidance_01m8rxzh33enbtnx9e5cnyvav0"
            },
            "required": true,
            "description": "ID of the guidance rule, as a TypeID or UUID",
            "name": "ruleId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted rule's ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted rule",
                      "example": "assistant_guidance_01m8rxzh33enbtnx9e5cnyvav0"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No guidance rule with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/snippets": {
      "get": {
        "operationId": "listQuillsSnippets",
        "tags": [
          "AI assistant"
        ],
        "summary": "List the assistant snippets",
        "description": "Lists the workspace's assistant snippets, newest first, up to 500. Snippets are short facts that the assistant grounds answers on. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "true: only enabled snippets. false: only disabled snippets. Omit for both.",
              "example": "true"
            },
            "required": false,
            "description": "true: only enabled snippets. false: only disabled snippets. Omit for both.",
            "name": "enabled",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The snippets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The snippet's ID",
                            "example": "assistant_snippet_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "title": {
                            "type": "string",
                            "description": "Short title of the fact",
                            "example": "Refund window"
                          },
                          "content": {
                            "type": "string",
                            "description": "The fact that the assistant grounds answers on",
                            "example": "Annual plans can be refunded in full within 30 days of purchase."
                          },
                          "audience": {
                            "type": "string",
                            "enum": [
                              "public",
                              "team",
                              "internal"
                            ],
                            "description": "Who may be answered from the snippet. public: customers (customer agent) and teammates (copilot). team: teammates only. internal: never used in AI answers.",
                            "example": "team"
                          },
                          "enabled": {
                            "type": "boolean",
                            "description": "Whether the assistant uses the snippet. Disabled snippets are kept but ignored.",
                            "example": true
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the snippet was created",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the snippet last changed",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "content",
                          "audience",
                          "enabled",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "The snippets, newest first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsSnippet",
        "tags": [
          "AI assistant"
        ],
        "summary": "Create an assistant snippet",
        "description": "Creates an assistant snippet. A workspace has at most 500 snippets. Records an `assistant_snippet.created` event; when the AI provider has an embedding model, a background job then embeds the title and content for semantic search. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Short title of the fact",
                    "example": "Refund window"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "The fact that the assistant grounds answers on",
                    "example": "Annual plans can be refunded in full within 30 days of purchase."
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "public",
                      "team",
                      "internal"
                    ],
                    "default": "team",
                    "description": "Who may be answered from the snippet. public: customers (customer agent) and teammates (copilot). team: teammates only. internal: never used in AI answers. Default: team.",
                    "example": "team"
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether the assistant uses the snippet",
                    "example": true
                  }
                },
                "required": [
                  "title",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new snippet",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The snippet's ID",
                      "example": "assistant_snippet_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "title": {
                      "type": "string",
                      "description": "Short title of the fact",
                      "example": "Refund window"
                    },
                    "content": {
                      "type": "string",
                      "description": "The fact that the assistant grounds answers on",
                      "example": "Annual plans can be refunded in full within 30 days of purchase."
                    },
                    "audience": {
                      "type": "string",
                      "enum": [
                        "public",
                        "team",
                        "internal"
                      ],
                      "description": "Who may be answered from the snippet. public: customers (customer agent) and teammates (copilot). team: teammates only. internal: never used in AI answers.",
                      "example": "team"
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the assistant uses the snippet. Disabled snippets are kept but ignored.",
                      "example": true
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the snippet was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the snippet last changed",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "audience",
                    "enabled",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace already has 500 snippets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/snippets/{snippetId}": {
      "patch": {
        "operationId": "updateQuillsSnippet",
        "tags": [
          "AI assistant"
        ],
        "summary": "Update an assistant snippet",
        "description": "Changes the fields you send; send at least one. A new title or content clears the stored embedding, and a background job embeds the new text when an embedding model is configured. Records an `assistant_snippet.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The snippet's ID (TypeID or UUID)",
              "example": "assistant_snippet_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The snippet's ID (TypeID or UUID)",
            "name": "snippetId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Short title of the fact",
                    "example": "Refund window"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "The fact that the assistant grounds answers on",
                    "example": "Annual plans can be refunded in full within 30 days of purchase."
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "public",
                      "team",
                      "internal"
                    ],
                    "description": "Who may be answered from the snippet. public: customers (customer agent) and teammates (copilot). team: teammates only. internal: never used in AI answers.",
                    "example": "team"
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether the assistant uses the snippet",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated snippet",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The snippet's ID",
                      "example": "assistant_snippet_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "title": {
                      "type": "string",
                      "description": "Short title of the fact",
                      "example": "Refund window"
                    },
                    "content": {
                      "type": "string",
                      "description": "The fact that the assistant grounds answers on",
                      "example": "Annual plans can be refunded in full within 30 days of purchase."
                    },
                    "audience": {
                      "type": "string",
                      "enum": [
                        "public",
                        "team",
                        "internal"
                      ],
                      "description": "Who may be answered from the snippet. public: customers (customer agent) and teammates (copilot). team: teammates only. internal: never used in AI answers.",
                      "example": "team"
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the assistant uses the snippet. Disabled snippets are kept but ignored.",
                      "example": true
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the snippet was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the snippet last changed",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "audience",
                    "enabled",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No snippet with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsSnippet",
        "tags": [
          "AI assistant"
        ],
        "summary": "Delete an assistant snippet",
        "description": "Deletes the snippet permanently. Records an `assistant_snippet.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The snippet's ID (TypeID or UUID)",
              "example": "assistant_snippet_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The snippet's ID (TypeID or UUID)",
            "name": "snippetId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted snippet's ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The deleted snippet's ID",
                      "example": "assistant_snippet_01m8rxfrbhfzr9r837k90wcggm"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No snippet with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/knowledge-suggestions": {
      "get": {
        "operationId": "listQuillsKnowledgeSuggestions",
        "tags": [
          "AI assistant"
        ],
        "summary": "List the knowledge suggestions",
        "description": "Lists knowledge that the AI found in closed conversations. Open suggestions (waiting for answers, drafting, or with a draft ready) by default: gaps of the customer agent first, then most supporting conversations, then most recently updated. At most 200. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "approved",
                "dismissed"
              ],
              "default": "open",
              "description": "open: awaiting_answer, drafting and draft_ready. approved or dismissed: only that status. Default: open.",
              "example": "open"
            },
            "required": false,
            "description": "open: awaiting_answer, drafting and draft_ready. approved or dismissed: only that status. Default: open.",
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The suggestions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The knowledge suggestion's ID, a UUID",
                            "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "awaiting_answer",
                              "drafting",
                              "draft_ready",
                              "approved",
                              "dismissed"
                            ],
                            "description": "awaiting_answer: the AI's questions are waiting for a teammate. drafting: the AI is writing the draft. draft_ready: the draft can be edited and approved. approved: it became an assistant snippet. dismissed: rejected; the topic is never suggested again.",
                            "example": "awaiting_answer"
                          },
                          "gap": {
                            "type": "boolean",
                            "description": "The customer agent could not answer this; such suggestions rank first.",
                            "example": true
                          },
                          "topic": {
                            "type": "string",
                            "description": "Short label of the knowledge topic",
                            "example": "Refunds on monthly plans"
                          },
                          "candidateTitle": {
                            "type": "string",
                            "description": "The title that the AI first proposed",
                            "example": "Refund window"
                          },
                          "candidateContent": {
                            "type": "string",
                            "description": "The content that the AI first proposed",
                            "example": "Annual plans can be refunded within 30 days of purchase."
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The draft title, once the questions are done.",
                            "example": "Refund window"
                          },
                          "content": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The draft content, once the questions are done.",
                            "example": "Annual plans can be refunded in full within 30 days. Monthly plans are not refunded."
                          },
                          "evidenceCount": {
                            "type": "integer",
                            "description": "Closed conversations that support it.",
                            "example": 4
                          },
                          "questionCount": {
                            "type": "integer",
                            "description": "Number of clarifying questions, at most 3",
                            "example": 2
                          },
                          "stepIndex": {
                            "type": "integer",
                            "description": "Questions answered or skipped so far.",
                            "example": 1
                          },
                          "approvedSnippetId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The snippet created on approval. Null until approved.",
                            "example": null
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the AI created the suggestion",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the suggestion last changed",
                            "example": "2026-11-30T15:20:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "gap",
                          "topic",
                          "candidateTitle",
                          "candidateContent",
                          "title",
                          "content",
                          "evidenceCount",
                          "questionCount",
                          "stepIndex",
                          "approvedSnippetId",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "The suggestions, largest knowledge gap first, then most evidence, then most recently updated"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/knowledge-suggestions/{suggestionId}": {
      "get": {
        "operationId": "getQuillsKnowledgeSuggestion",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get a knowledge suggestion with its questions",
        "description": "Returns one knowledge suggestion and its clarifying questions in order. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The knowledge suggestion's ID, a UUID",
              "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
            },
            "required": true,
            "description": "The knowledge suggestion's ID, a UUID",
            "name": "suggestionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The suggestion and its questions in order",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The knowledge suggestion's ID, a UUID",
                      "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "awaiting_answer",
                        "drafting",
                        "draft_ready",
                        "approved",
                        "dismissed"
                      ],
                      "description": "awaiting_answer: the AI's questions are waiting for a teammate. drafting: the AI is writing the draft. draft_ready: the draft can be edited and approved. approved: it became an assistant snippet. dismissed: rejected; the topic is never suggested again.",
                      "example": "awaiting_answer"
                    },
                    "gap": {
                      "type": "boolean",
                      "description": "The customer agent could not answer this; such suggestions rank first.",
                      "example": true
                    },
                    "topic": {
                      "type": "string",
                      "description": "Short label of the knowledge topic",
                      "example": "Refunds on monthly plans"
                    },
                    "candidateTitle": {
                      "type": "string",
                      "description": "The title that the AI first proposed",
                      "example": "Refund window"
                    },
                    "candidateContent": {
                      "type": "string",
                      "description": "The content that the AI first proposed",
                      "example": "Annual plans can be refunded within 30 days of purchase."
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft title, once the questions are done.",
                      "example": "Refund window"
                    },
                    "content": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft content, once the questions are done.",
                      "example": "Annual plans can be refunded in full within 30 days. Monthly plans are not refunded."
                    },
                    "evidenceCount": {
                      "type": "integer",
                      "description": "Closed conversations that support it.",
                      "example": 4
                    },
                    "questionCount": {
                      "type": "integer",
                      "description": "Number of clarifying questions, at most 3",
                      "example": 2
                    },
                    "stepIndex": {
                      "type": "integer",
                      "description": "Questions answered or skipped so far.",
                      "example": 1
                    },
                    "approvedSnippetId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The snippet created on approval. Null until approved.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the AI created the suggestion",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the suggestion last changed",
                      "example": "2026-11-30T15:20:00.000Z"
                    },
                    "questions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "position": {
                            "type": "integer",
                            "description": "The question's position, starting at 0",
                            "example": 0
                          },
                          "question": {
                            "type": "string",
                            "description": "The AI's clarifying question",
                            "example": "Does the 30-day refund window apply to monthly plans too?"
                          },
                          "suggestedAnswers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Answers that the AI proposes for a quick reply",
                            "example": [
                              "Yes, all plans",
                              "No, annual plans only"
                            ]
                          },
                          "answer": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The teammate's answer. Null when unanswered or skipped.",
                            "example": "No, annual plans only"
                          },
                          "skipped": {
                            "type": "boolean",
                            "description": "Whether a teammate skipped the question",
                            "example": false
                          }
                        },
                        "required": [
                          "position",
                          "question",
                          "suggestedAnswers",
                          "answer",
                          "skipped"
                        ]
                      },
                      "description": "The clarifying questions, by position"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "gap",
                    "topic",
                    "candidateTitle",
                    "candidateContent",
                    "title",
                    "content",
                    "evidenceCount",
                    "questionCount",
                    "stepIndex",
                    "approvedSnippetId",
                    "createdAt",
                    "updatedAt",
                    "questions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No knowledge suggestion with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsKnowledgeSuggestion",
        "tags": [
          "AI assistant"
        ],
        "summary": "Edit the draft of a knowledge suggestion",
        "description": "Changes the draft's title or content; send at least one. Only a suggestion in `draft_ready` can be edited. Records a `knowledge_suggestion.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The knowledge suggestion's ID, a UUID",
              "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
            },
            "required": true,
            "description": "The knowledge suggestion's ID, a UUID",
            "name": "suggestionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "The snippet title",
                    "example": "Refund window"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "The snippet content",
                    "example": "Annual plans can be refunded in full within 30 days. Monthly plans are not refunded."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The edited suggestion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The knowledge suggestion's ID, a UUID",
                      "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "awaiting_answer",
                        "drafting",
                        "draft_ready",
                        "approved",
                        "dismissed"
                      ],
                      "description": "awaiting_answer: the AI's questions are waiting for a teammate. drafting: the AI is writing the draft. draft_ready: the draft can be edited and approved. approved: it became an assistant snippet. dismissed: rejected; the topic is never suggested again.",
                      "example": "awaiting_answer"
                    },
                    "gap": {
                      "type": "boolean",
                      "description": "The customer agent could not answer this; such suggestions rank first.",
                      "example": true
                    },
                    "topic": {
                      "type": "string",
                      "description": "Short label of the knowledge topic",
                      "example": "Refunds on monthly plans"
                    },
                    "candidateTitle": {
                      "type": "string",
                      "description": "The title that the AI first proposed",
                      "example": "Refund window"
                    },
                    "candidateContent": {
                      "type": "string",
                      "description": "The content that the AI first proposed",
                      "example": "Annual plans can be refunded within 30 days of purchase."
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft title, once the questions are done.",
                      "example": "Refund window"
                    },
                    "content": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft content, once the questions are done.",
                      "example": "Annual plans can be refunded in full within 30 days. Monthly plans are not refunded."
                    },
                    "evidenceCount": {
                      "type": "integer",
                      "description": "Closed conversations that support it.",
                      "example": 4
                    },
                    "questionCount": {
                      "type": "integer",
                      "description": "Number of clarifying questions, at most 3",
                      "example": 2
                    },
                    "stepIndex": {
                      "type": "integer",
                      "description": "Questions answered or skipped so far.",
                      "example": 1
                    },
                    "approvedSnippetId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The snippet created on approval. Null until approved.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the AI created the suggestion",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the suggestion last changed",
                      "example": "2026-11-30T15:20:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "gap",
                    "topic",
                    "candidateTitle",
                    "candidateContent",
                    "title",
                    "content",
                    "evidenceCount",
                    "questionCount",
                    "stepIndex",
                    "approvedSnippetId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No knowledge suggestion with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The suggestion is not in the status or step that this action needs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/knowledge-suggestions/{suggestionId}/answer": {
      "post": {
        "operationId": "answerQuillsKnowledgeSuggestion",
        "tags": [
          "AI assistant"
        ],
        "summary": "Answer or skip the next question of a knowledge suggestion",
        "description": "Answers or skips the question at `stepIndex`, which must be the suggestion's current step (409 otherwise, for example when another teammate answered it first). After the last question the suggestion moves to `drafting` and a worker has the AI write the draft. Records `knowledge_suggestion.answered` after the last question, otherwise `knowledge_suggestion.updated`. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The knowledge suggestion's ID, a UUID",
              "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
            },
            "required": true,
            "description": "The knowledge suggestion's ID, a UUID",
            "name": "suggestionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stepIndex": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "The position of the question this answer is for.",
                    "example": 0
                  },
                  "answer": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000,
                    "description": "The answer. Send either answer or skip.",
                    "example": "No, annual plans only"
                  },
                  "skip": {
                    "type": "boolean",
                    "enum": [
                      true
                    ],
                    "description": "true skips the question. Send either answer or skip.",
                    "example": true
                  }
                },
                "required": [
                  "stepIndex"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The suggestion after the answer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The knowledge suggestion's ID, a UUID",
                      "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "awaiting_answer",
                        "drafting",
                        "draft_ready",
                        "approved",
                        "dismissed"
                      ],
                      "description": "awaiting_answer: the AI's questions are waiting for a teammate. drafting: the AI is writing the draft. draft_ready: the draft can be edited and approved. approved: it became an assistant snippet. dismissed: rejected; the topic is never suggested again.",
                      "example": "awaiting_answer"
                    },
                    "gap": {
                      "type": "boolean",
                      "description": "The customer agent could not answer this; such suggestions rank first.",
                      "example": true
                    },
                    "topic": {
                      "type": "string",
                      "description": "Short label of the knowledge topic",
                      "example": "Refunds on monthly plans"
                    },
                    "candidateTitle": {
                      "type": "string",
                      "description": "The title that the AI first proposed",
                      "example": "Refund window"
                    },
                    "candidateContent": {
                      "type": "string",
                      "description": "The content that the AI first proposed",
                      "example": "Annual plans can be refunded within 30 days of purchase."
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft title, once the questions are done.",
                      "example": "Refund window"
                    },
                    "content": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft content, once the questions are done.",
                      "example": "Annual plans can be refunded in full within 30 days. Monthly plans are not refunded."
                    },
                    "evidenceCount": {
                      "type": "integer",
                      "description": "Closed conversations that support it.",
                      "example": 4
                    },
                    "questionCount": {
                      "type": "integer",
                      "description": "Number of clarifying questions, at most 3",
                      "example": 2
                    },
                    "stepIndex": {
                      "type": "integer",
                      "description": "Questions answered or skipped so far.",
                      "example": 1
                    },
                    "approvedSnippetId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The snippet created on approval. Null until approved.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the AI created the suggestion",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the suggestion last changed",
                      "example": "2026-11-30T15:20:00.000Z"
                    },
                    "questions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "position": {
                            "type": "integer",
                            "description": "The question's position, starting at 0",
                            "example": 0
                          },
                          "question": {
                            "type": "string",
                            "description": "The AI's clarifying question",
                            "example": "Does the 30-day refund window apply to monthly plans too?"
                          },
                          "suggestedAnswers": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Answers that the AI proposes for a quick reply",
                            "example": [
                              "Yes, all plans",
                              "No, annual plans only"
                            ]
                          },
                          "answer": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The teammate's answer. Null when unanswered or skipped.",
                            "example": "No, annual plans only"
                          },
                          "skipped": {
                            "type": "boolean",
                            "description": "Whether a teammate skipped the question",
                            "example": false
                          }
                        },
                        "required": [
                          "position",
                          "question",
                          "suggestedAnswers",
                          "answer",
                          "skipped"
                        ]
                      },
                      "description": "The clarifying questions, by position"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "gap",
                    "topic",
                    "candidateTitle",
                    "candidateContent",
                    "title",
                    "content",
                    "evidenceCount",
                    "questionCount",
                    "stepIndex",
                    "approvedSnippetId",
                    "createdAt",
                    "updatedAt",
                    "questions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No knowledge suggestion with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The suggestion is not in the status or step that this action needs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/knowledge-suggestions/{suggestionId}/approve": {
      "post": {
        "operationId": "approveQuillsKnowledgeSuggestion",
        "tags": [
          "AI assistant"
        ],
        "summary": "Approve a knowledge suggestion into an assistant snippet",
        "description": "Creates an assistant snippet from the draft (or the given title and content), with the chosen audience, and marks the suggestion approved. Only a suggestion in `draft_ready` can be approved. With `createDraftArticle`, also creates an unpublished help center article in the first category, linked to a source conversation; no article is created when the help center has no category. Records `knowledge_suggestion.approved` and `assistant_snippet.created` events. A workspace has at most 500 snippets. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The knowledge suggestion's ID, a UUID",
              "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
            },
            "required": true,
            "description": "The knowledge suggestion's ID, a UUID",
            "name": "suggestionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "audience": {
                    "type": "string",
                    "enum": [
                      "public",
                      "team",
                      "internal"
                    ],
                    "description": "`team` keeps the snippet for teammates and the copilot; `public` lets the customer agent use it.",
                    "example": "team"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Snippet title. Omit to use the draft title.",
                    "example": "Refund window"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "Snippet content. Omit to use the draft content.",
                    "example": "Annual plans can be refunded in full within 30 days. Monthly plans are not refunded."
                  },
                  "createDraftArticle": {
                    "type": "boolean",
                    "description": "true also creates an unpublished help center draft article with the same title and content. Default: false.",
                    "example": false
                  }
                },
                "required": [
                  "audience"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The approved suggestion, with the new snippet and optional draft article ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The knowledge suggestion's ID, a UUID",
                      "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "awaiting_answer",
                        "drafting",
                        "draft_ready",
                        "approved",
                        "dismissed"
                      ],
                      "description": "awaiting_answer: the AI's questions are waiting for a teammate. drafting: the AI is writing the draft. draft_ready: the draft can be edited and approved. approved: it became an assistant snippet. dismissed: rejected; the topic is never suggested again.",
                      "example": "awaiting_answer"
                    },
                    "gap": {
                      "type": "boolean",
                      "description": "The customer agent could not answer this; such suggestions rank first.",
                      "example": true
                    },
                    "topic": {
                      "type": "string",
                      "description": "Short label of the knowledge topic",
                      "example": "Refunds on monthly plans"
                    },
                    "candidateTitle": {
                      "type": "string",
                      "description": "The title that the AI first proposed",
                      "example": "Refund window"
                    },
                    "candidateContent": {
                      "type": "string",
                      "description": "The content that the AI first proposed",
                      "example": "Annual plans can be refunded within 30 days of purchase."
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft title, once the questions are done.",
                      "example": "Refund window"
                    },
                    "content": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft content, once the questions are done.",
                      "example": "Annual plans can be refunded in full within 30 days. Monthly plans are not refunded."
                    },
                    "evidenceCount": {
                      "type": "integer",
                      "description": "Closed conversations that support it.",
                      "example": 4
                    },
                    "questionCount": {
                      "type": "integer",
                      "description": "Number of clarifying questions, at most 3",
                      "example": 2
                    },
                    "stepIndex": {
                      "type": "integer",
                      "description": "Questions answered or skipped so far.",
                      "example": 1
                    },
                    "approvedSnippetId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The snippet created on approval. Null until approved.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the AI created the suggestion",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the suggestion last changed",
                      "example": "2026-11-30T15:20:00.000Z"
                    },
                    "draftArticleId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft article created with createDraftArticle. Null when none was created.",
                      "example": "article_01m8rxfrbhfzr9r837k90wcggm"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "gap",
                    "topic",
                    "candidateTitle",
                    "candidateContent",
                    "title",
                    "content",
                    "evidenceCount",
                    "questionCount",
                    "stepIndex",
                    "approvedSnippetId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No knowledge suggestion with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The suggestion is not in draft_ready, or the workspace already has 500 snippets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/knowledge-suggestions/{suggestionId}/dismiss": {
      "post": {
        "operationId": "dismissQuillsKnowledgeSuggestion",
        "tags": [
          "AI assistant"
        ],
        "summary": "Dismiss a knowledge suggestion",
        "description": "Dismisses an open knowledge suggestion. The AI never suggests a dismissed topic again. Records a `knowledge_suggestion.dismissed` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The knowledge suggestion's ID, a UUID",
              "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
            },
            "required": true,
            "description": "The knowledge suggestion's ID, a UUID",
            "name": "suggestionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The dismissed suggestion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The knowledge suggestion's ID, a UUID",
                      "example": "3f6c2a9e-8b1d-4e57-a0c4-6d2f9b7e1a35"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "awaiting_answer",
                        "drafting",
                        "draft_ready",
                        "approved",
                        "dismissed"
                      ],
                      "description": "awaiting_answer: the AI's questions are waiting for a teammate. drafting: the AI is writing the draft. draft_ready: the draft can be edited and approved. approved: it became an assistant snippet. dismissed: rejected; the topic is never suggested again.",
                      "example": "awaiting_answer"
                    },
                    "gap": {
                      "type": "boolean",
                      "description": "The customer agent could not answer this; such suggestions rank first.",
                      "example": true
                    },
                    "topic": {
                      "type": "string",
                      "description": "Short label of the knowledge topic",
                      "example": "Refunds on monthly plans"
                    },
                    "candidateTitle": {
                      "type": "string",
                      "description": "The title that the AI first proposed",
                      "example": "Refund window"
                    },
                    "candidateContent": {
                      "type": "string",
                      "description": "The content that the AI first proposed",
                      "example": "Annual plans can be refunded within 30 days of purchase."
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft title, once the questions are done.",
                      "example": "Refund window"
                    },
                    "content": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The draft content, once the questions are done.",
                      "example": "Annual plans can be refunded in full within 30 days. Monthly plans are not refunded."
                    },
                    "evidenceCount": {
                      "type": "integer",
                      "description": "Closed conversations that support it.",
                      "example": 4
                    },
                    "questionCount": {
                      "type": "integer",
                      "description": "Number of clarifying questions, at most 3",
                      "example": 2
                    },
                    "stepIndex": {
                      "type": "integer",
                      "description": "Questions answered or skipped so far.",
                      "example": 1
                    },
                    "approvedSnippetId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The snippet created on approval. Null until approved.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the AI created the suggestion",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the suggestion last changed",
                      "example": "2026-11-30T15:20:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "gap",
                    "topic",
                    "candidateTitle",
                    "candidateContent",
                    "title",
                    "content",
                    "evidenceCount",
                    "questionCount",
                    "stepIndex",
                    "approvedSnippetId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No knowledge suggestion with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The suggestion is not in the status or step that this action needs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/skills": {
      "get": {
        "operationId": "listQuillsSkills",
        "tags": [
          "AI assistant"
        ],
        "summary": "List the assistant skills",
        "description": "Lists the workspace's assistant skills, sorted by name, up to 100. A skill is a named procedure that an assigned agent reads when it applies; it is instructions, never a tool. Each agent reads at most 10 enabled skills assigned to it, by name. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The skills, by name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The skill's ID",
                            "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "name": {
                            "type": "string",
                            "description": "Skill name, unique in the workspace ignoring case",
                            "example": "Refund requests"
                          },
                          "whenToUse": {
                            "type": "string",
                            "description": "When the skill applies, as the agent's prompt states it",
                            "example": "a customer asks for a refund or a billing correction"
                          },
                          "instructions": {
                            "type": "string",
                            "description": "The procedure that the agent follows. The prompt includes at most the first 2,000 characters.",
                            "example": "Confirm the order number, check the plan, then propose a refund for a teammate to approve."
                          },
                          "assignments": {
                            "type": "object",
                            "properties": {
                              "agent": {
                                "type": "boolean",
                                "description": "Whether the customer agent reads the skill",
                                "example": false
                              },
                              "copilot": {
                                "type": "boolean",
                                "description": "Whether the teammate copilot reads the skill",
                                "example": true
                              }
                            },
                            "required": [
                              "agent",
                              "copilot"
                            ],
                            "description": "Which agents read the skill when it applies"
                          },
                          "allowedTools": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "maxItems": 50,
                            "description": "Write tools that an agent may use while the skill is active. When any active skill lists tools, write tools outside the combined lists are disabled. Empty: no restriction.",
                            "example": [
                              "set_conversation_status",
                              "add_private_note"
                            ]
                          },
                          "enabled": {
                            "type": "boolean",
                            "description": "Whether agents read the skill. Disabled skills are kept but ignored.",
                            "example": true
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the skill was created",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the skill last changed",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "whenToUse",
                          "instructions",
                          "assignments",
                          "allowedTools",
                          "enabled",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "The skills, sorted by name"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsSkill",
        "tags": [
          "AI assistant"
        ],
        "summary": "Create an assistant skill",
        "description": "Creates an assistant skill. Names are unique, ignoring case. A workspace has at most 100 skills. Records an `assistant_skill.created` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Skill name, unique in the workspace ignoring case",
                    "example": "Refund requests"
                  },
                  "whenToUse": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240,
                    "description": "When the skill applies, as the agent's prompt states it",
                    "example": "a customer asks for a refund or a billing correction"
                  },
                  "instructions": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000,
                    "description": "The procedure that the agent follows. The prompt includes at most the first 2,000 characters.",
                    "example": "Confirm the order number, check the plan, then propose a refund for a teammate to approve."
                  },
                  "assignments": {
                    "type": "object",
                    "properties": {
                      "agent": {
                        "type": "boolean",
                        "description": "Whether the customer agent reads the skill",
                        "example": false
                      },
                      "copilot": {
                        "type": "boolean",
                        "description": "Whether the teammate copilot reads the skill",
                        "example": true
                      }
                    },
                    "default": {
                      "agent": false,
                      "copilot": true
                    },
                    "required": [
                      "agent",
                      "copilot"
                    ],
                    "description": "Which agents read the skill. Default: the copilot only."
                  },
                  "allowedTools": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "maxItems": 50,
                    "default": [],
                    "description": "Write tools that an agent may use while the skill is active. When any active skill lists tools, write tools outside the combined lists are disabled. Empty: no restriction.",
                    "example": [
                      "set_conversation_status",
                      "add_private_note"
                    ]
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether agents read the skill",
                    "example": true
                  }
                },
                "required": [
                  "name",
                  "whenToUse",
                  "instructions"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new skill",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The skill's ID",
                      "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "name": {
                      "type": "string",
                      "description": "Skill name, unique in the workspace ignoring case",
                      "example": "Refund requests"
                    },
                    "whenToUse": {
                      "type": "string",
                      "description": "When the skill applies, as the agent's prompt states it",
                      "example": "a customer asks for a refund or a billing correction"
                    },
                    "instructions": {
                      "type": "string",
                      "description": "The procedure that the agent follows. The prompt includes at most the first 2,000 characters.",
                      "example": "Confirm the order number, check the plan, then propose a refund for a teammate to approve."
                    },
                    "assignments": {
                      "type": "object",
                      "properties": {
                        "agent": {
                          "type": "boolean",
                          "description": "Whether the customer agent reads the skill",
                          "example": false
                        },
                        "copilot": {
                          "type": "boolean",
                          "description": "Whether the teammate copilot reads the skill",
                          "example": true
                        }
                      },
                      "required": [
                        "agent",
                        "copilot"
                      ],
                      "description": "Which agents read the skill when it applies"
                    },
                    "allowedTools": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "maxItems": 50,
                      "description": "Write tools that an agent may use while the skill is active. When any active skill lists tools, write tools outside the combined lists are disabled. Empty: no restriction.",
                      "example": [
                        "set_conversation_status",
                        "add_private_note"
                      ]
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether agents read the skill. Disabled skills are kept but ignored.",
                      "example": true
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the skill was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the skill last changed",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "whenToUse",
                    "instructions",
                    "assignments",
                    "allowedTools",
                    "enabled",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another skill in the workspace has this name, ignoring case, or the workspace already has 100 skills",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/skills/{skillId}": {
      "patch": {
        "operationId": "updateQuillsSkill",
        "tags": [
          "AI assistant"
        ],
        "summary": "Update an assistant skill",
        "description": "Changes the fields you send; send at least one. Records an `assistant_skill.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The skill's ID (TypeID or UUID)",
              "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The skill's ID (TypeID or UUID)",
            "name": "skillId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Skill name, unique in the workspace ignoring case",
                    "example": "Refund requests"
                  },
                  "whenToUse": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 240,
                    "description": "When the skill applies, as the agent's prompt states it",
                    "example": "a customer asks for a refund or a billing correction"
                  },
                  "instructions": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000,
                    "description": "The procedure that the agent follows. The prompt includes at most the first 2,000 characters.",
                    "example": "Confirm the order number, check the plan, then propose a refund for a teammate to approve."
                  },
                  "assignments": {
                    "type": "object",
                    "properties": {
                      "agent": {
                        "type": "boolean",
                        "description": "Whether the customer agent reads the skill",
                        "example": false
                      },
                      "copilot": {
                        "type": "boolean",
                        "description": "Whether the teammate copilot reads the skill",
                        "example": true
                      }
                    },
                    "required": [
                      "agent",
                      "copilot"
                    ],
                    "description": "Which agents read the skill when it applies"
                  },
                  "allowedTools": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "maxItems": 50,
                    "description": "Write tools that an agent may use while the skill is active. When any active skill lists tools, write tools outside the combined lists are disabled. Empty: no restriction.",
                    "example": [
                      "set_conversation_status",
                      "add_private_note"
                    ]
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether agents read the skill",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated skill",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The skill's ID",
                      "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "name": {
                      "type": "string",
                      "description": "Skill name, unique in the workspace ignoring case",
                      "example": "Refund requests"
                    },
                    "whenToUse": {
                      "type": "string",
                      "description": "When the skill applies, as the agent's prompt states it",
                      "example": "a customer asks for a refund or a billing correction"
                    },
                    "instructions": {
                      "type": "string",
                      "description": "The procedure that the agent follows. The prompt includes at most the first 2,000 characters.",
                      "example": "Confirm the order number, check the plan, then propose a refund for a teammate to approve."
                    },
                    "assignments": {
                      "type": "object",
                      "properties": {
                        "agent": {
                          "type": "boolean",
                          "description": "Whether the customer agent reads the skill",
                          "example": false
                        },
                        "copilot": {
                          "type": "boolean",
                          "description": "Whether the teammate copilot reads the skill",
                          "example": true
                        }
                      },
                      "required": [
                        "agent",
                        "copilot"
                      ],
                      "description": "Which agents read the skill when it applies"
                    },
                    "allowedTools": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "maxItems": 50,
                      "description": "Write tools that an agent may use while the skill is active. When any active skill lists tools, write tools outside the combined lists are disabled. Empty: no restriction.",
                      "example": [
                        "set_conversation_status",
                        "add_private_note"
                      ]
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether agents read the skill. Disabled skills are kept but ignored.",
                      "example": true
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the skill was created",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the skill last changed",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "whenToUse",
                    "instructions",
                    "assignments",
                    "allowedTools",
                    "enabled",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No skill with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another skill in the workspace has this name, ignoring case",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsSkill",
        "tags": [
          "AI assistant"
        ],
        "summary": "Delete an assistant skill",
        "description": "Deletes the skill permanently. Records an `assistant_skill.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The skill's ID (TypeID or UUID)",
              "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The skill's ID (TypeID or UUID)",
            "name": "skillId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted skill's ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The deleted skill's ID",
                      "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No skill with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/web-sources": {
      "get": {
        "operationId": "listQuillsWebSources",
        "tags": [
          "AI assistant"
        ],
        "summary": "List the assistant web sources",
        "description": "Lists the public web pages that the assistant grounds answers on, newest first, up to 100. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The web sources, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The web source's ID",
                            "example": "assistant_web_source_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "url": {
                            "type": "string",
                            "description": "The page's http(s) URL, without its fragment",
                            "example": "https://docs.example.com/billing/refunds"
                          },
                          "title": {
                            "type": "string",
                            "description": "The page's HTML title after a successful fetch; the URL's hostname until then",
                            "example": "Refunds | Example Docs"
                          },
                          "enabled": {
                            "type": "boolean",
                            "description": "Whether the assistant searches the page's text",
                            "example": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "ready",
                              "failed"
                            ],
                            "description": "Fetch state. pending: not fetched yet. ready: text is stored. failed: the fetch was attempted and no text is stored.",
                            "example": "ready"
                          },
                          "characters": {
                            "type": "number",
                            "description": "Length of the stored page text, in characters. 0 until a fetch succeeds.",
                            "example": 5120
                          },
                          "fetchedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the page was last fetched. Equal to createdAt until the first fetch attempt; a failed refresh leaves it unchanged.",
                            "example": "2026-11-30T14:06:12.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the source was added",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "url",
                          "title",
                          "enabled",
                          "status",
                          "characters",
                          "fetchedAt",
                          "createdAt"
                        ]
                      },
                      "description": "The web sources, newest first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "addQuillsWebSource",
        "tags": [
          "AI assistant"
        ],
        "summary": "Add a public web page as an assistant source",
        "description": "Adds a public web page as an assistant source and returns it as pending. Records an `assistant_web_source.added` event; a worker then fetches the page after commit. A page that resolves to a private address, needs sign-in or is not text fails. A workspace has at most 100 web sources. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri",
                    "description": "Public http or https page URL without credentials. The fragment is dropped.",
                    "example": "https://docs.example.com/billing/refunds"
                  },
                  "crawl": {
                    "type": "boolean",
                    "default": false,
                    "description": "Also add the page's links under its own folder as sources (one level, at most 20, within the workspace limit). Default: false.",
                    "example": false
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new source",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The web source's ID",
                      "example": "assistant_web_source_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "url": {
                      "type": "string",
                      "description": "The page's http(s) URL, without its fragment",
                      "example": "https://docs.example.com/billing/refunds"
                    },
                    "title": {
                      "type": "string",
                      "description": "The page's HTML title after a successful fetch; the URL's hostname until then",
                      "example": "Refunds | Example Docs"
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the assistant searches the page's text",
                      "example": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "ready",
                        "failed"
                      ],
                      "description": "Fetch state. pending: not fetched yet. ready: text is stored. failed: the fetch was attempted and no text is stored.",
                      "example": "ready"
                    },
                    "characters": {
                      "type": "number",
                      "description": "Length of the stored page text, in characters. 0 until a fetch succeeds.",
                      "example": 5120
                    },
                    "fetchedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the page was last fetched. Equal to createdAt until the first fetch attempt; a failed refresh leaves it unchanged.",
                      "example": "2026-11-30T14:06:12.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the source was added",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "url",
                    "title",
                    "enabled",
                    "status",
                    "characters",
                    "fetchedAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "This URL is already a web source, or the workspace already has 100 web sources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/web-sources/{webSourceId}": {
      "patch": {
        "operationId": "setQuillsWebSourceEnabled",
        "tags": [
          "AI assistant"
        ],
        "summary": "Turn an assistant web source on or off",
        "description": "Turns the source on or off; a disabled source keeps its text but is not searched. Records an `assistant_web_source.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The web source's ID (TypeID or UUID)",
              "example": "assistant_web_source_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The web source's ID (TypeID or UUID)",
            "name": "webSourceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "true: the assistant searches the page. false: it does not.",
                    "example": false
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated source",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The web source's ID",
                      "example": "assistant_web_source_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "url": {
                      "type": "string",
                      "description": "The page's http(s) URL, without its fragment",
                      "example": "https://docs.example.com/billing/refunds"
                    },
                    "title": {
                      "type": "string",
                      "description": "The page's HTML title after a successful fetch; the URL's hostname until then",
                      "example": "Refunds | Example Docs"
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the assistant searches the page's text",
                      "example": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "ready",
                        "failed"
                      ],
                      "description": "Fetch state. pending: not fetched yet. ready: text is stored. failed: the fetch was attempted and no text is stored.",
                      "example": "ready"
                    },
                    "characters": {
                      "type": "number",
                      "description": "Length of the stored page text, in characters. 0 until a fetch succeeds.",
                      "example": 5120
                    },
                    "fetchedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the page was last fetched. Equal to createdAt until the first fetch attempt; a failed refresh leaves it unchanged.",
                      "example": "2026-11-30T14:06:12.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the source was added",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "url",
                    "title",
                    "enabled",
                    "status",
                    "characters",
                    "fetchedAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No web source with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsWebSource",
        "tags": [
          "AI assistant"
        ],
        "summary": "Delete an assistant web source",
        "description": "Deletes the source and its stored text. Records an `assistant_web_source.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The web source's ID (TypeID or UUID)",
              "example": "assistant_web_source_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The web source's ID (TypeID or UUID)",
            "name": "webSourceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted source's ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The deleted source's ID",
                      "example": "assistant_web_source_01m8rxfrbhfzr9r837k90wcggm"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No web source with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/web-sources/{webSourceId}/refresh": {
      "post": {
        "operationId": "refreshQuillsWebSource",
        "tags": [
          "AI assistant"
        ],
        "summary": "Fetch an assistant web source again",
        "description": "Queues a new fetch of the page and returns the source as it is now. Records an `assistant_web_source.updated` event; a worker fetches the page again after commit. A failed fetch keeps the text from the last successful one. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The web source's ID (TypeID or UUID)",
              "example": "assistant_web_source_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The web source's ID (TypeID or UUID)",
            "name": "webSourceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The source, before the new fetch",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The web source's ID",
                      "example": "assistant_web_source_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "url": {
                      "type": "string",
                      "description": "The page's http(s) URL, without its fragment",
                      "example": "https://docs.example.com/billing/refunds"
                    },
                    "title": {
                      "type": "string",
                      "description": "The page's HTML title after a successful fetch; the URL's hostname until then",
                      "example": "Refunds | Example Docs"
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the assistant searches the page's text",
                      "example": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "ready",
                        "failed"
                      ],
                      "description": "Fetch state. pending: not fetched yet. ready: text is stored. failed: the fetch was attempted and no text is stored.",
                      "example": "ready"
                    },
                    "characters": {
                      "type": "number",
                      "description": "Length of the stored page text, in characters. 0 until a fetch succeeds.",
                      "example": 5120
                    },
                    "fetchedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the page was last fetched. Equal to createdAt until the first fetch attempt; a failed refresh leaves it unchanged.",
                      "example": "2026-11-30T14:06:12.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the source was added",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "url",
                    "title",
                    "enabled",
                    "status",
                    "characters",
                    "fetchedAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No web source with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/documents": {
      "get": {
        "operationId": "listQuillsAssistantDocuments",
        "tags": [
          "AI assistant"
        ],
        "summary": "List the assistant knowledge documents",
        "description": "Lists the knowledge documents that the assistant grounds answers on, newest first, without their text. Deleted documents are left out. Returns at most 200, the most a workspace can hold. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The documents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the knowledge document",
                            "example": "assistant_document_01m8rxfrbhfzr9r85dq4zv7n2c"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title that the assistant sees with the text",
                            "example": "Refund policy"
                          },
                          "fileName": {
                            "type": "string",
                            "description": "File name given when the document was added, for display",
                            "example": "refund-policy.md"
                          },
                          "mimeType": {
                            "type": "string",
                            "description": "Type of the source: `text/plain`, `text/markdown`, or `application/pdf` for a document made from a PDF's text layer",
                            "example": "text/markdown"
                          },
                          "characters": {
                            "type": "number",
                            "description": "Length of the stored text, in characters",
                            "example": 5240
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the document was added",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "fileName",
                          "mimeType",
                          "characters",
                          "createdAt"
                        ]
                      },
                      "description": "The documents, newest first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "uploadQuillsAssistantDocument",
        "tags": [
          "AI assistant"
        ],
        "summary": "Add a knowledge document",
        "description": "Adds a plain text or Markdown knowledge document. The copilot reads it when its documents knowledge setting is on, and so does the customer agent for its own setting. After commit, a background job embeds the document's title and start for retrieval when an embedding model is configured, and may suggest FAQ snippets from it (AI usage). A workspace has at most 200 documents. Records an `assistant_document.created` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Title that the assistant sees with the text",
                    "example": "Refund policy"
                  },
                  "fileName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "File name for display; no file is stored",
                    "example": "refund-policy.md"
                  },
                  "mimeType": {
                    "type": "string",
                    "enum": [
                      "text/plain",
                      "text/markdown"
                    ],
                    "description": "Format of `content`: `text/plain` or `text/markdown`",
                    "example": "text/markdown"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "The document's text, stored as sent after trimming",
                    "example": "# Refunds\n\nWe refund annual plans within 30 days of purchase."
                  }
                },
                "required": [
                  "title",
                  "fileName",
                  "mimeType",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the knowledge document",
                      "example": "assistant_document_01m8rxfrbhfzr9r85dq4zv7n2c"
                    },
                    "title": {
                      "type": "string",
                      "description": "Title that the assistant sees with the text",
                      "example": "Refund policy"
                    },
                    "fileName": {
                      "type": "string",
                      "description": "File name given when the document was added, for display",
                      "example": "refund-policy.md"
                    },
                    "mimeType": {
                      "type": "string",
                      "description": "Type of the source: `text/plain`, `text/markdown`, or `application/pdf` for a document made from a PDF's text layer",
                      "example": "text/markdown"
                    },
                    "characters": {
                      "type": "number",
                      "description": "Length of the stored text, in characters",
                      "example": 5240
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the document was added",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "fileName",
                    "mimeType",
                    "characters",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace already has 200 knowledge documents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/documents/pdf": {
      "post": {
        "operationId": "uploadQuillsAssistantPdfDocument",
        "tags": [
          "AI assistant"
        ],
        "summary": "Add a knowledge document from a PDF",
        "description": "Adds a knowledge document from the text layer of an uploaded PDF. Upload the PDF with POST /files/uploads (purpose `file`, at most 10 MB) and send the uploaded object here. The PDF's text (the first 100,000 characters) becomes the document; the PDF itself is not kept, and its stored object is queued for deletion. A scanned PDF without a text layer is refused. As with a text document, a background job embeds it and may suggest FAQ snippets. A workspace has at most 200 documents. Records an `assistant_document.created` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "The key from the upload response."
                  },
                  "contentType": {
                    "type": "string",
                    "maxLength": 100,
                    "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$",
                    "description": "MIME type of the file, for example image/png. The upload must send the same Content-Type.",
                    "example": "image/png"
                  },
                  "size": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 1073741824,
                    "description": "Size of the file in bytes. The upload may not send more. A server limit on file size also applies.",
                    "example": 48213
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Title that the assistant sees with the text",
                    "example": "Product handbook"
                  },
                  "fileName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "The PDF's file name, for display",
                    "example": "handbook.pdf"
                  }
                },
                "required": [
                  "key",
                  "contentType",
                  "size",
                  "title",
                  "fileName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the knowledge document",
                      "example": "assistant_document_01m8rxfrbhfzr9r85dq4zv7n2c"
                    },
                    "title": {
                      "type": "string",
                      "description": "Title that the assistant sees with the text",
                      "example": "Refund policy"
                    },
                    "fileName": {
                      "type": "string",
                      "description": "File name given when the document was added, for display",
                      "example": "refund-policy.md"
                    },
                    "mimeType": {
                      "type": "string",
                      "description": "Type of the source: `text/plain`, `text/markdown`, or `application/pdf` for a document made from a PDF's text layer",
                      "example": "text/markdown"
                    },
                    "characters": {
                      "type": "number",
                      "description": "Length of the stored text, in characters",
                      "example": 5240
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the document was added",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "fileName",
                    "mimeType",
                    "characters",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The upload is not `application/pdf`, is larger than 10 MB, cannot be parsed, or has no text layer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The key is not a `file` upload of this workspace, or no object was uploaded under it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace already has 200 knowledge documents, or the uploaded object is already used by another file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/documents/{documentId}": {
      "delete": {
        "operationId": "deleteQuillsAssistantDocument",
        "tags": [
          "AI assistant"
        ],
        "summary": "Delete a knowledge document",
        "description": "Soft-deletes a knowledge document and clears its embedding, so the assistants stop using it. Records an `assistant_document.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the knowledge document, as a TypeID or UUID",
              "example": "assistant_document_01m8rxfrbhfzr9r85dq4zv7n2c"
            },
            "required": true,
            "description": "ID of the knowledge document, as a TypeID or UUID",
            "name": "documentId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted document's ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted document",
                      "example": "assistant_document_01m8rxfrbhfzr9r85dq4zv7n2c"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No document with this ID exists, or it was already deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/connectors": {
      "get": {
        "operationId": "listQuillsConnectors",
        "tags": [
          "AI assistant"
        ],
        "summary": "List the assistant connectors",
        "description": "Lists the workspace's remote MCP connectors, sorted by name, at most 100. Never returns credentials. An assistant calls the tools of a connector that is enabled, connected and assigned to it. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The connectors, by name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the connector",
                            "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
                          },
                          "name": {
                            "type": "string",
                            "description": "Display name, unique in the workspace ignoring case",
                            "example": "Linear"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Tool namespace derived from the name, at most 20 characters. The assistant sees the connector's tools under this prefix.",
                            "example": "linear"
                          },
                          "url": {
                            "type": "string",
                            "description": "HTTPS URL of the remote MCP server",
                            "example": "https://mcp.example.com/mcp"
                          },
                          "authMode": {
                            "type": "string",
                            "enum": [
                              "none",
                              "bearer",
                              "oauth"
                            ],
                            "description": "How the server authenticates requests: `none`, `bearer` (a stored bearer token) or `oauth` (OAuth tokens from the connector's authorization)",
                            "example": "oauth"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "connected",
                              "error",
                              "disabled"
                            ],
                            "description": "`connected` when the last tool discovery succeeded; `error` when it failed, the URL changed, or authorization is needed (see `lastError`); `disabled` offers no tools. Only a `connected` connector that is `enabled` offers tools.",
                            "example": "connected"
                          },
                          "toolCount": {
                            "type": "number",
                            "description": "Number of tools stored from the last successful discovery",
                            "example": 12
                          },
                          "lastError": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Fixed message for the last failure, such as `Authorization required`. The server's own error text is never stored. Null after a successful discovery.",
                            "example": null
                          },
                          "updatedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the connector was last changed or refreshed",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug",
                          "url",
                          "authMode",
                          "status",
                          "toolCount",
                          "lastError",
                          "updatedAt"
                        ]
                      },
                      "description": "The connectors, sorted by name"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsConnector",
        "tags": [
          "AI assistant"
        ],
        "summary": "Add an assistant connector",
        "description": "Adds a remote MCP connector: connects to the server, discovers its tools and stores them. With authMode oauth, or when a server without a bearer token asks for authorization, the connector is stored as an `oauth` connector with status error; call `POST /assistant/connectors/{connectorId}/oauth` next. Names are unique, ignoring case. A workspace has at most 100 connectors. A bearer token is stored encrypted and never returned. Records an `assistant_connector.created` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Display name, unique in the workspace ignoring case",
                    "example": "Linear"
                  },
                  "url": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "HTTPS URL of the remote MCP server",
                    "example": "https://mcp.example.com/mcp"
                  },
                  "authMode": {
                    "type": "string",
                    "enum": [
                      "none",
                      "bearer",
                      "oauth"
                    ],
                    "default": "none",
                    "description": "How the server authenticates requests: `none`, `bearer` (send `bearerToken`) or `oauth`. Defaults to `none`.",
                    "example": "bearer"
                  },
                  "bearerToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "Bearer token for the server. Required when `authMode` is `bearer` and not allowed otherwise. Stored encrypted and never returned.",
                    "example": "mcp-token-0123456789abcdef"
                  },
                  "assignments": {
                    "type": "object",
                    "properties": {
                      "agent": {
                        "type": "boolean",
                        "description": "Whether the customer agent may use the connector. It only gets read tools whose own policy is set to `always`.",
                        "example": false
                      },
                      "copilot": {
                        "type": "boolean",
                        "description": "Whether the teammate copilot may use the connector",
                        "example": true
                      }
                    },
                    "default": {
                      "agent": false,
                      "copilot": true
                    },
                    "required": [
                      "agent",
                      "copilot"
                    ],
                    "description": "Which assistants may call the connector's tools. Defaults to the copilot only."
                  }
                },
                "required": [
                  "name",
                  "url"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new connector",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the connector",
                      "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name, unique in the workspace ignoring case",
                      "example": "Linear"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Tool namespace derived from the name, at most 20 characters. The assistant sees the connector's tools under this prefix.",
                      "example": "linear"
                    },
                    "url": {
                      "type": "string",
                      "description": "HTTPS URL of the remote MCP server",
                      "example": "https://mcp.example.com/mcp"
                    },
                    "authMode": {
                      "type": "string",
                      "enum": [
                        "none",
                        "bearer",
                        "oauth"
                      ],
                      "description": "How the server authenticates requests: `none`, `bearer` (a stored bearer token) or `oauth` (OAuth tokens from the connector's authorization)",
                      "example": "oauth"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "error",
                        "disabled"
                      ],
                      "description": "`connected` when the last tool discovery succeeded; `error` when it failed, the URL changed, or authorization is needed (see `lastError`); `disabled` offers no tools. Only a `connected` connector that is `enabled` offers tools.",
                      "example": "connected"
                    },
                    "toolCount": {
                      "type": "number",
                      "description": "Number of tools stored from the last successful discovery",
                      "example": 12
                    },
                    "lastError": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Fixed message for the last failure, such as `Authorization required`. The server's own error text is never stored. Null after a successful discovery.",
                      "example": null
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the connector was last changed or refreshed",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "hasSecret": {
                      "type": "boolean",
                      "description": "Whether a credential (bearer token or OAuth tokens) is stored. The credential itself is never returned.",
                      "example": true
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the connector is on. A disabled connector offers no tools.",
                      "example": true
                    },
                    "assignments": {
                      "type": "object",
                      "properties": {
                        "agent": {
                          "type": "boolean",
                          "description": "Whether the customer agent may use the connector. It only gets read tools whose own policy is set to `always`.",
                          "example": false
                        },
                        "copilot": {
                          "type": "boolean",
                          "description": "Whether the teammate copilot may use the connector",
                          "example": true
                        }
                      },
                      "required": [
                        "agent",
                        "copilot"
                      ],
                      "description": "Which assistants may call the connector's tools"
                    },
                    "toolPolicies": {
                      "type": "object",
                      "properties": {
                        "groupDefaults": {
                          "type": "object",
                          "properties": {
                            "read": {
                              "type": "string",
                              "enum": [
                                "always",
                                "approval",
                                "never"
                              ],
                              "description": "Policy for read-only tools without their own policy. Defaults to `always`.",
                              "example": "always"
                            },
                            "write": {
                              "type": "string",
                              "enum": [
                                "always",
                                "approval",
                                "never"
                              ],
                              "description": "Policy for other tools without their own policy. Defaults to `approval`.",
                              "example": "approval"
                            }
                          },
                          "required": [
                            "read",
                            "write"
                          ],
                          "description": "The policy of each tool group"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128,
                                "description": "Tool name, as the MCP server lists it",
                                "example": "create_issue"
                              },
                              "policy": {
                                "type": "string",
                                "enum": [
                                  "always",
                                  "approval",
                                  "never"
                                ],
                                "description": "When the assistant may call the tool: `always` (runs without approval), `approval` (the call is proposed for a teammate to approve) or `never` (the tool is not offered)",
                                "example": "approval"
                              }
                            },
                            "required": [
                              "name",
                              "policy"
                            ]
                          },
                          "maxItems": 100,
                          "description": "Per-tool policies that override the group default. Overrides for tools that the server no longer lists are dropped on the next refresh."
                        }
                      },
                      "required": [
                        "groupDefaults",
                        "tools"
                      ],
                      "description": "Tool policies: group defaults and per-tool overrides"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Tool name, as the MCP server lists it",
                            "example": "create_issue"
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Human-readable title from the server. Null when the server gives none.",
                            "example": "Create issue"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Description from the server. Null when the server gives none.",
                            "example": "Creates an issue in a team."
                          },
                          "group": {
                            "type": "string",
                            "enum": [
                              "read",
                              "write"
                            ],
                            "description": "`read` when the server marks the tool read-only; `write` otherwise",
                            "example": "write"
                          },
                          "destructive": {
                            "type": "boolean",
                            "description": "Whether the server marks the tool as destructive",
                            "example": false
                          },
                          "policy": {
                            "type": "string",
                            "enum": [
                              "always",
                              "approval",
                              "never"
                            ],
                            "description": "The tool's effective policy: its own override, or else its group's default",
                            "example": "approval"
                          }
                        },
                        "required": [
                          "name",
                          "title",
                          "description",
                          "group",
                          "destructive",
                          "policy"
                        ]
                      },
                      "description": "The tools from the last successful discovery, in the server's order"
                    },
                    "lastSyncedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the tools were last discovered successfully. Null: never.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "lastCallAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the assistant last called one of the tools. Null: never.",
                      "example": "2026-11-30T15:20:00.000Z"
                    },
                    "lastErrorAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When `lastError` was recorded. Null when there is no current error.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the connector was added",
                      "example": "2026-11-02T09:30:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "url",
                    "authMode",
                    "status",
                    "toolCount",
                    "lastError",
                    "updatedAt",
                    "hasSecret",
                    "enabled",
                    "assignments",
                    "toolPolicies",
                    "tools",
                    "lastSyncedAt",
                    "lastCallAt",
                    "lastErrorAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The URL points to an address that this workspace cannot reach (for example a private network), or the server refused the bearer token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another connector has a similar name, the workspace already has 100 connectors, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY to seal the token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The MCP server could not be reached, or it did not answer as an MCP server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/connectors/{connectorId}": {
      "delete": {
        "operationId": "deleteQuillsConnector",
        "tags": [
          "AI assistant"
        ],
        "summary": "Delete an assistant connector",
        "description": "Deletes a connector and its stored credentials; the assistants stop offering its tools. Records an `assistant_connector.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the connector, as a TypeID or UUID",
              "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
            },
            "required": true,
            "description": "ID of the connector, as a TypeID or UUID",
            "name": "connectorId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted connector's ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted connector",
                      "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No connector with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "getQuillsConnector",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get an assistant connector",
        "description": "Returns a connector with its tools, their effective policies and its assignments. Never returns credentials. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the connector, as a TypeID or UUID",
              "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
            },
            "required": true,
            "description": "ID of the connector, as a TypeID or UUID",
            "name": "connectorId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The connector",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the connector",
                      "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name, unique in the workspace ignoring case",
                      "example": "Linear"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Tool namespace derived from the name, at most 20 characters. The assistant sees the connector's tools under this prefix.",
                      "example": "linear"
                    },
                    "url": {
                      "type": "string",
                      "description": "HTTPS URL of the remote MCP server",
                      "example": "https://mcp.example.com/mcp"
                    },
                    "authMode": {
                      "type": "string",
                      "enum": [
                        "none",
                        "bearer",
                        "oauth"
                      ],
                      "description": "How the server authenticates requests: `none`, `bearer` (a stored bearer token) or `oauth` (OAuth tokens from the connector's authorization)",
                      "example": "oauth"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "error",
                        "disabled"
                      ],
                      "description": "`connected` when the last tool discovery succeeded; `error` when it failed, the URL changed, or authorization is needed (see `lastError`); `disabled` offers no tools. Only a `connected` connector that is `enabled` offers tools.",
                      "example": "connected"
                    },
                    "toolCount": {
                      "type": "number",
                      "description": "Number of tools stored from the last successful discovery",
                      "example": 12
                    },
                    "lastError": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Fixed message for the last failure, such as `Authorization required`. The server's own error text is never stored. Null after a successful discovery.",
                      "example": null
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the connector was last changed or refreshed",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "hasSecret": {
                      "type": "boolean",
                      "description": "Whether a credential (bearer token or OAuth tokens) is stored. The credential itself is never returned.",
                      "example": true
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the connector is on. A disabled connector offers no tools.",
                      "example": true
                    },
                    "assignments": {
                      "type": "object",
                      "properties": {
                        "agent": {
                          "type": "boolean",
                          "description": "Whether the customer agent may use the connector. It only gets read tools whose own policy is set to `always`.",
                          "example": false
                        },
                        "copilot": {
                          "type": "boolean",
                          "description": "Whether the teammate copilot may use the connector",
                          "example": true
                        }
                      },
                      "required": [
                        "agent",
                        "copilot"
                      ],
                      "description": "Which assistants may call the connector's tools"
                    },
                    "toolPolicies": {
                      "type": "object",
                      "properties": {
                        "groupDefaults": {
                          "type": "object",
                          "properties": {
                            "read": {
                              "type": "string",
                              "enum": [
                                "always",
                                "approval",
                                "never"
                              ],
                              "description": "Policy for read-only tools without their own policy. Defaults to `always`.",
                              "example": "always"
                            },
                            "write": {
                              "type": "string",
                              "enum": [
                                "always",
                                "approval",
                                "never"
                              ],
                              "description": "Policy for other tools without their own policy. Defaults to `approval`.",
                              "example": "approval"
                            }
                          },
                          "required": [
                            "read",
                            "write"
                          ],
                          "description": "The policy of each tool group"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128,
                                "description": "Tool name, as the MCP server lists it",
                                "example": "create_issue"
                              },
                              "policy": {
                                "type": "string",
                                "enum": [
                                  "always",
                                  "approval",
                                  "never"
                                ],
                                "description": "When the assistant may call the tool: `always` (runs without approval), `approval` (the call is proposed for a teammate to approve) or `never` (the tool is not offered)",
                                "example": "approval"
                              }
                            },
                            "required": [
                              "name",
                              "policy"
                            ]
                          },
                          "maxItems": 100,
                          "description": "Per-tool policies that override the group default. Overrides for tools that the server no longer lists are dropped on the next refresh."
                        }
                      },
                      "required": [
                        "groupDefaults",
                        "tools"
                      ],
                      "description": "Tool policies: group defaults and per-tool overrides"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Tool name, as the MCP server lists it",
                            "example": "create_issue"
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Human-readable title from the server. Null when the server gives none.",
                            "example": "Create issue"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Description from the server. Null when the server gives none.",
                            "example": "Creates an issue in a team."
                          },
                          "group": {
                            "type": "string",
                            "enum": [
                              "read",
                              "write"
                            ],
                            "description": "`read` when the server marks the tool read-only; `write` otherwise",
                            "example": "write"
                          },
                          "destructive": {
                            "type": "boolean",
                            "description": "Whether the server marks the tool as destructive",
                            "example": false
                          },
                          "policy": {
                            "type": "string",
                            "enum": [
                              "always",
                              "approval",
                              "never"
                            ],
                            "description": "The tool's effective policy: its own override, or else its group's default",
                            "example": "approval"
                          }
                        },
                        "required": [
                          "name",
                          "title",
                          "description",
                          "group",
                          "destructive",
                          "policy"
                        ]
                      },
                      "description": "The tools from the last successful discovery, in the server's order"
                    },
                    "lastSyncedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the tools were last discovered successfully. Null: never.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "lastCallAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the assistant last called one of the tools. Null: never.",
                      "example": "2026-11-30T15:20:00.000Z"
                    },
                    "lastErrorAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When `lastError` was recorded. Null when there is no current error.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the connector was added",
                      "example": "2026-11-02T09:30:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "url",
                    "authMode",
                    "status",
                    "toolCount",
                    "lastError",
                    "updatedAt",
                    "hasSecret",
                    "enabled",
                    "assignments",
                    "toolPolicies",
                    "tools",
                    "lastSyncedAt",
                    "lastCallAt",
                    "lastErrorAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No connector with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsConnector",
        "tags": [
          "AI assistant"
        ],
        "summary": "Update an assistant connector",
        "description": "Changes the fields that the request sends and keeps the others. Does not contact the server; call `POST /assistant/connectors/{connectorId}/refresh` after a change. A new URL removes the stored credentials, except a bearer token sent in the same request, and sets status error until the next refresh. A new name also changes the slug. Records an `assistant_connector.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the connector, as a TypeID or UUID",
              "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
            },
            "required": true,
            "description": "ID of the connector, as a TypeID or UUID",
            "name": "connectorId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "New display name; the slug follows it. Omit to keep it.",
                    "example": "Linear"
                  },
                  "url": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "New MCP server URL. Removes the stored credentials and sets status error. Omit to keep it.",
                    "example": "https://mcp.example.com/mcp"
                  },
                  "authMode": {
                    "type": "string",
                    "enum": [
                      "none",
                      "bearer",
                      "oauth"
                    ],
                    "description": "New auth mode: `none`, `bearer` or `oauth`. Omit to keep it.",
                    "example": "bearer"
                  },
                  "bearerToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "New bearer token, replacing the stored one. Stored encrypted and never returned. Omit to keep it.",
                    "example": "mcp-token-0123456789abcdef"
                  },
                  "clearBearerToken": {
                    "type": "boolean",
                    "description": "true removes the stored bearer token. Other stored credentials stay.",
                    "example": false
                  },
                  "assignments": {
                    "type": "object",
                    "properties": {
                      "agent": {
                        "type": "boolean",
                        "description": "Whether the customer agent may use the connector. It only gets read tools whose own policy is set to `always`.",
                        "example": false
                      },
                      "copilot": {
                        "type": "boolean",
                        "description": "Whether the teammate copilot may use the connector",
                        "example": true
                      }
                    },
                    "required": [
                      "agent",
                      "copilot"
                    ],
                    "description": "New assistant assignments. Omit to keep them."
                  },
                  "toolPolicies": {
                    "type": "object",
                    "properties": {
                      "groupDefaults": {
                        "type": "object",
                        "properties": {
                          "read": {
                            "type": "string",
                            "enum": [
                              "always",
                              "approval",
                              "never"
                            ],
                            "description": "Policy for read-only tools without their own policy. Defaults to `always`.",
                            "example": "always"
                          },
                          "write": {
                            "type": "string",
                            "enum": [
                              "always",
                              "approval",
                              "never"
                            ],
                            "description": "Policy for other tools without their own policy. Defaults to `approval`.",
                            "example": "approval"
                          }
                        },
                        "required": [
                          "read",
                          "write"
                        ],
                        "description": "The policy of each tool group"
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128,
                              "description": "Tool name, as the MCP server lists it",
                              "example": "create_issue"
                            },
                            "policy": {
                              "type": "string",
                              "enum": [
                                "always",
                                "approval",
                                "never"
                              ],
                              "description": "When the assistant may call the tool: `always` (runs without approval), `approval` (the call is proposed for a teammate to approve) or `never` (the tool is not offered)",
                              "example": "approval"
                            }
                          },
                          "required": [
                            "name",
                            "policy"
                          ]
                        },
                        "maxItems": 100,
                        "description": "Per-tool policies that override the group default. Overrides for tools that the server no longer lists are dropped on the next refresh."
                      }
                    },
                    "required": [
                      "groupDefaults",
                      "tools"
                    ],
                    "description": "New tool policies, replacing the group defaults and every per-tool override. Omit to keep them."
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "false turns the connector off; true turns it back on. Omit to keep it.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated connector",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the connector",
                      "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name, unique in the workspace ignoring case",
                      "example": "Linear"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Tool namespace derived from the name, at most 20 characters. The assistant sees the connector's tools under this prefix.",
                      "example": "linear"
                    },
                    "url": {
                      "type": "string",
                      "description": "HTTPS URL of the remote MCP server",
                      "example": "https://mcp.example.com/mcp"
                    },
                    "authMode": {
                      "type": "string",
                      "enum": [
                        "none",
                        "bearer",
                        "oauth"
                      ],
                      "description": "How the server authenticates requests: `none`, `bearer` (a stored bearer token) or `oauth` (OAuth tokens from the connector's authorization)",
                      "example": "oauth"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "error",
                        "disabled"
                      ],
                      "description": "`connected` when the last tool discovery succeeded; `error` when it failed, the URL changed, or authorization is needed (see `lastError`); `disabled` offers no tools. Only a `connected` connector that is `enabled` offers tools.",
                      "example": "connected"
                    },
                    "toolCount": {
                      "type": "number",
                      "description": "Number of tools stored from the last successful discovery",
                      "example": 12
                    },
                    "lastError": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Fixed message for the last failure, such as `Authorization required`. The server's own error text is never stored. Null after a successful discovery.",
                      "example": null
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the connector was last changed or refreshed",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "hasSecret": {
                      "type": "boolean",
                      "description": "Whether a credential (bearer token or OAuth tokens) is stored. The credential itself is never returned.",
                      "example": true
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the connector is on. A disabled connector offers no tools.",
                      "example": true
                    },
                    "assignments": {
                      "type": "object",
                      "properties": {
                        "agent": {
                          "type": "boolean",
                          "description": "Whether the customer agent may use the connector. It only gets read tools whose own policy is set to `always`.",
                          "example": false
                        },
                        "copilot": {
                          "type": "boolean",
                          "description": "Whether the teammate copilot may use the connector",
                          "example": true
                        }
                      },
                      "required": [
                        "agent",
                        "copilot"
                      ],
                      "description": "Which assistants may call the connector's tools"
                    },
                    "toolPolicies": {
                      "type": "object",
                      "properties": {
                        "groupDefaults": {
                          "type": "object",
                          "properties": {
                            "read": {
                              "type": "string",
                              "enum": [
                                "always",
                                "approval",
                                "never"
                              ],
                              "description": "Policy for read-only tools without their own policy. Defaults to `always`.",
                              "example": "always"
                            },
                            "write": {
                              "type": "string",
                              "enum": [
                                "always",
                                "approval",
                                "never"
                              ],
                              "description": "Policy for other tools without their own policy. Defaults to `approval`.",
                              "example": "approval"
                            }
                          },
                          "required": [
                            "read",
                            "write"
                          ],
                          "description": "The policy of each tool group"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128,
                                "description": "Tool name, as the MCP server lists it",
                                "example": "create_issue"
                              },
                              "policy": {
                                "type": "string",
                                "enum": [
                                  "always",
                                  "approval",
                                  "never"
                                ],
                                "description": "When the assistant may call the tool: `always` (runs without approval), `approval` (the call is proposed for a teammate to approve) or `never` (the tool is not offered)",
                                "example": "approval"
                              }
                            },
                            "required": [
                              "name",
                              "policy"
                            ]
                          },
                          "maxItems": 100,
                          "description": "Per-tool policies that override the group default. Overrides for tools that the server no longer lists are dropped on the next refresh."
                        }
                      },
                      "required": [
                        "groupDefaults",
                        "tools"
                      ],
                      "description": "Tool policies: group defaults and per-tool overrides"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Tool name, as the MCP server lists it",
                            "example": "create_issue"
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Human-readable title from the server. Null when the server gives none.",
                            "example": "Create issue"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Description from the server. Null when the server gives none.",
                            "example": "Creates an issue in a team."
                          },
                          "group": {
                            "type": "string",
                            "enum": [
                              "read",
                              "write"
                            ],
                            "description": "`read` when the server marks the tool read-only; `write` otherwise",
                            "example": "write"
                          },
                          "destructive": {
                            "type": "boolean",
                            "description": "Whether the server marks the tool as destructive",
                            "example": false
                          },
                          "policy": {
                            "type": "string",
                            "enum": [
                              "always",
                              "approval",
                              "never"
                            ],
                            "description": "The tool's effective policy: its own override, or else its group's default",
                            "example": "approval"
                          }
                        },
                        "required": [
                          "name",
                          "title",
                          "description",
                          "group",
                          "destructive",
                          "policy"
                        ]
                      },
                      "description": "The tools from the last successful discovery, in the server's order"
                    },
                    "lastSyncedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the tools were last discovered successfully. Null: never.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "lastCallAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the assistant last called one of the tools. Null: never.",
                      "example": "2026-11-30T15:20:00.000Z"
                    },
                    "lastErrorAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When `lastError` was recorded. Null when there is no current error.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the connector was added",
                      "example": "2026-11-02T09:30:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "url",
                    "authMode",
                    "status",
                    "toolCount",
                    "lastError",
                    "updatedAt",
                    "hasSecret",
                    "enabled",
                    "assignments",
                    "toolPolicies",
                    "tools",
                    "lastSyncedAt",
                    "lastCallAt",
                    "lastErrorAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No connector with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another connector has a similar name, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY to seal the token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/tools": {
      "get": {
        "operationId": "listQuillsAssistantTools",
        "tags": [
          "AI assistant"
        ],
        "summary": "List the assistant's built-in tools",
        "description": "Lists the assistant's built-in tools. A read tool runs with the asking teammate's access. A write tool only proposes an action; it runs when a teammate holding the `requires` permission approves it. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The built-in tools",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Tool name, as the model calls it",
                            "example": "search_knowledge"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "read",
                              "write"
                            ],
                            "description": "`read` runs directly with the teammate's access; `write` proposes an action for approval",
                            "example": "read"
                          },
                          "description": {
                            "type": "string",
                            "description": "What the tool does, as the model reads it",
                            "example": "Search the knowledge base for articles that answer a question."
                          },
                          "requires": {
                            "type": "string",
                            "enum": [
                              "read",
                              "create",
                              "update"
                            ],
                            "description": "Permission needed to run the tool, or for a write tool, to approve it",
                            "example": "read"
                          }
                        },
                        "required": [
                          "name",
                          "kind",
                          "description",
                          "requires"
                        ]
                      },
                      "description": "The built-in assistant tools"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/connectors/{connectorId}/refresh": {
      "post": {
        "operationId": "refreshQuillsConnector",
        "tags": [
          "AI assistant"
        ],
        "summary": "Refresh an assistant connector's tools",
        "description": "Connects to the MCP server, discovers its tools and stores them, keeping per-tool policies for tools that still exist. A failure is stored as status error with a fixed message in `lastError`, and the request still succeeds. OAuth tokens refreshed during the call are kept. Records an `assistant_connector.refreshed` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the connector, as a TypeID or UUID",
              "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
            },
            "required": true,
            "description": "ID of the connector, as a TypeID or UUID",
            "name": "connectorId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The connector after the refresh",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the connector",
                      "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
                    },
                    "name": {
                      "type": "string",
                      "description": "Display name, unique in the workspace ignoring case",
                      "example": "Linear"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Tool namespace derived from the name, at most 20 characters. The assistant sees the connector's tools under this prefix.",
                      "example": "linear"
                    },
                    "url": {
                      "type": "string",
                      "description": "HTTPS URL of the remote MCP server",
                      "example": "https://mcp.example.com/mcp"
                    },
                    "authMode": {
                      "type": "string",
                      "enum": [
                        "none",
                        "bearer",
                        "oauth"
                      ],
                      "description": "How the server authenticates requests: `none`, `bearer` (a stored bearer token) or `oauth` (OAuth tokens from the connector's authorization)",
                      "example": "oauth"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "connected",
                        "error",
                        "disabled"
                      ],
                      "description": "`connected` when the last tool discovery succeeded; `error` when it failed, the URL changed, or authorization is needed (see `lastError`); `disabled` offers no tools. Only a `connected` connector that is `enabled` offers tools.",
                      "example": "connected"
                    },
                    "toolCount": {
                      "type": "number",
                      "description": "Number of tools stored from the last successful discovery",
                      "example": 12
                    },
                    "lastError": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Fixed message for the last failure, such as `Authorization required`. The server's own error text is never stored. Null after a successful discovery.",
                      "example": null
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the connector was last changed or refreshed",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "hasSecret": {
                      "type": "boolean",
                      "description": "Whether a credential (bearer token or OAuth tokens) is stored. The credential itself is never returned.",
                      "example": true
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the connector is on. A disabled connector offers no tools.",
                      "example": true
                    },
                    "assignments": {
                      "type": "object",
                      "properties": {
                        "agent": {
                          "type": "boolean",
                          "description": "Whether the customer agent may use the connector. It only gets read tools whose own policy is set to `always`.",
                          "example": false
                        },
                        "copilot": {
                          "type": "boolean",
                          "description": "Whether the teammate copilot may use the connector",
                          "example": true
                        }
                      },
                      "required": [
                        "agent",
                        "copilot"
                      ],
                      "description": "Which assistants may call the connector's tools"
                    },
                    "toolPolicies": {
                      "type": "object",
                      "properties": {
                        "groupDefaults": {
                          "type": "object",
                          "properties": {
                            "read": {
                              "type": "string",
                              "enum": [
                                "always",
                                "approval",
                                "never"
                              ],
                              "description": "Policy for read-only tools without their own policy. Defaults to `always`.",
                              "example": "always"
                            },
                            "write": {
                              "type": "string",
                              "enum": [
                                "always",
                                "approval",
                                "never"
                              ],
                              "description": "Policy for other tools without their own policy. Defaults to `approval`.",
                              "example": "approval"
                            }
                          },
                          "required": [
                            "read",
                            "write"
                          ],
                          "description": "The policy of each tool group"
                        },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128,
                                "description": "Tool name, as the MCP server lists it",
                                "example": "create_issue"
                              },
                              "policy": {
                                "type": "string",
                                "enum": [
                                  "always",
                                  "approval",
                                  "never"
                                ],
                                "description": "When the assistant may call the tool: `always` (runs without approval), `approval` (the call is proposed for a teammate to approve) or `never` (the tool is not offered)",
                                "example": "approval"
                              }
                            },
                            "required": [
                              "name",
                              "policy"
                            ]
                          },
                          "maxItems": 100,
                          "description": "Per-tool policies that override the group default. Overrides for tools that the server no longer lists are dropped on the next refresh."
                        }
                      },
                      "required": [
                        "groupDefaults",
                        "tools"
                      ],
                      "description": "Tool policies: group defaults and per-tool overrides"
                    },
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Tool name, as the MCP server lists it",
                            "example": "create_issue"
                          },
                          "title": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Human-readable title from the server. Null when the server gives none.",
                            "example": "Create issue"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Description from the server. Null when the server gives none.",
                            "example": "Creates an issue in a team."
                          },
                          "group": {
                            "type": "string",
                            "enum": [
                              "read",
                              "write"
                            ],
                            "description": "`read` when the server marks the tool read-only; `write` otherwise",
                            "example": "write"
                          },
                          "destructive": {
                            "type": "boolean",
                            "description": "Whether the server marks the tool as destructive",
                            "example": false
                          },
                          "policy": {
                            "type": "string",
                            "enum": [
                              "always",
                              "approval",
                              "never"
                            ],
                            "description": "The tool's effective policy: its own override, or else its group's default",
                            "example": "approval"
                          }
                        },
                        "required": [
                          "name",
                          "title",
                          "description",
                          "group",
                          "destructive",
                          "policy"
                        ]
                      },
                      "description": "The tools from the last successful discovery, in the server's order"
                    },
                    "lastSyncedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the tools were last discovered successfully. Null: never.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "lastCallAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the assistant last called one of the tools. Null: never.",
                      "example": "2026-11-30T15:20:00.000Z"
                    },
                    "lastErrorAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When `lastError` was recorded. Null when there is no current error.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the connector was added",
                      "example": "2026-11-02T09:30:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "url",
                    "authMode",
                    "status",
                    "toolCount",
                    "lastError",
                    "updatedAt",
                    "hasSecret",
                    "enabled",
                    "assignments",
                    "toolPolicies",
                    "tools",
                    "lastSyncedAt",
                    "lastCallAt",
                    "lastErrorAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No connector with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The connector's URL, auth mode or credentials changed during the request, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY to seal credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/connectors/{connectorId}/oauth": {
      "post": {
        "operationId": "startQuillsConnectorOAuth",
        "tags": [
          "AI assistant"
        ],
        "summary": "Start a connector's OAuth authorization",
        "description": "Starts the OAuth authorization of an `oauth` connector: registers this server as a client with the MCP server's authorization server when needed and returns the authorization URL. Open it in the same browser session: the state expires after ten minutes, is bound to the caller, this workspace and the connector, and works once. Stored tokens stay until the callback replaces them. Records an `assistant_connector.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the connector, as a TypeID or UUID",
              "example": "connector_01m8rxfrbhfzr9r84wtdjjzmgm"
            },
            "required": true,
            "description": "ID of the connector, as a TypeID or UUID",
            "name": "connectorId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The authorization URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "authorizationUrl": {
                      "type": "string",
                      "description": "The authorization server's URL to open in the browser. It redirects back to the connector's OAuth callback.",
                      "example": "https://auth.example.com/authorize?response_type=code&client_id=abc123&state=xyz"
                    }
                  },
                  "required": [
                    "authorizationUrl"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The server or authorization server address cannot be reached from this workspace, or the authorization server refused the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No connector with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The connector's authMode is not `oauth`, the connector changed during the request, or the server has no NOTIFICATION_SECRET_ENCRYPTION_KEY to seal credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The MCP server could not be reached, or it did not answer as an MCP server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/copilot": {
      "post": {
        "operationId": "createQuillsAdminAssistantCopilot",
        "tags": [
          "AI assistant"
        ],
        "summary": "Ask the copilot about a conversation or ticket",
        "description": "Starts a copilot run that answers a teammate's question about one conversation or ticket, and returns it in pending status. After the request commits, a worker answers with the asking teammate's access; a write tool only proposes a pending action for a teammate to approve. Poll `GET /assistant/runs/{runId}`, or reload on the workspace change stream. Records an `assistant_run.requested` event; the AI call and its usage happen in the worker. Requires the `read` permission. Answers 409 when no AI provider is configured or copilot Q&A is turned off.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationId": {
                    "type": "string",
                    "description": "Conversation that the request is about, as a TypeID or UUID. Send exactly one of `conversationId` and `ticketId`.",
                    "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                  },
                  "ticketId": {
                    "type": "string",
                    "description": "Ticket that the request is about, as a TypeID or UUID. Send exactly one of `conversationId` and `ticketId`. A deleted ticket answers 404.",
                    "example": "ticket_01m8rxfrbhfzr9r83t8d2n37cb"
                  },
                  "question": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "The teammate's question, in plain text",
                    "example": "What has the customer already tried?"
                  },
                  "history": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "teammate",
                            "assistant"
                          ],
                          "description": "Who wrote the turn: `teammate` (a question) or `assistant` (a copilot answer)",
                          "example": "teammate"
                        },
                        "content": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4000,
                          "description": "Text of the turn",
                          "example": "Summarize the issue."
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ]
                    },
                    "maxItems": 20,
                    "default": [],
                    "description": "Earlier turns of this copilot thread, oldest first, so the answer can follow up. Defaults to an empty list."
                  }
                },
                "required": [
                  "question"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new run, in pending status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The run's ID, a UUID. A run is kept for 24 hours; read it again by this ID until it finishes.",
                      "example": "8c1f4b2e-5d7a-4e93-b6c0-2a9f7e1d3b58"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "copilot",
                        "translate_message",
                        "attribute_preview",
                        "ticket_fields",
                        "kb_ask",
                        "reply_suggestion"
                      ],
                      "description": "What the run does. copilot: a teammate's copilot question. translate_message: a message translation. attribute_preview: an attribute detection preview. ticket_fields: ticket field suggestions. kb_ask: a help center question from the widget. reply_suggestion: a draft reply to the customer.",
                      "example": "reply_suggestion"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "succeeded",
                        "failed"
                      ],
                      "description": "pending: a worker has not answered yet. succeeded: output is set. failed: error is set; a run still pending after 30 minutes reads as failed.",
                      "example": "pending"
                    },
                    "output": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The answer, translation or draft reply text. Null for runs that return values instead.",
                          "example": "You can request a refund within 30 days from Billing > Invoices."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "article",
                                  "snippet",
                                  "document",
                                  "webpage",
                                  "post"
                                ],
                                "description": "The source's kind: a help center article, an assistant snippet, an assistant document, a web source page or a feedback post",
                                "example": "article"
                              },
                              "id": {
                                "type": "string",
                                "description": "The source's ID",
                                "example": "article_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The source's title",
                                "example": "How refunds work"
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title"
                            ]
                          },
                          "description": "The knowledge sources that the answer used. Empty when none."
                        },
                        "proposedActionIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Pending actions that a copilot run proposed for a teammate's approval. Empty for other kinds.",
                          "example": [
                            "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "The attribute or ticket field key that the value is for",
                                "example": "plan"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The suggested value. Null: the AI found no value.",
                                "example": "enterprise"
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The AI's short reason for the value. Null when none was given.",
                                "example": "The customer mentions their enterprise contract."
                              }
                            },
                            "required": [
                              "key",
                              "value",
                              "reason"
                            ]
                          },
                          "description": "Detected attribute values (attribute_preview) or suggested ticket field values (ticket_fields). Empty for other kinds."
                        }
                      },
                      "required": [
                        "text",
                        "citations",
                        "proposedActionIds",
                        "values"
                      ],
                      "description": "The run's result. Null until the run succeeds."
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the run failed. Null unless status is failed.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "When the run was created, as an ISO 8601 timestamp",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "finishedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the worker finished the run, as an ISO 8601 timestamp. Null while pending.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "output",
                    "error",
                    "createdAt",
                    "finishedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation or ticket does not exist in this workspace, or the ticket is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No AI provider is configured, or copilot Q&A is turned off in the assistant settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/runs/{runId}": {
      "get": {
        "operationId": "getQuillsAssistantRun",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get one of your assistant runs",
        "description": "Returns a copilot or other assistant run that the caller started, with its answer once the worker finishes. Only the teammate who started a run can read it; anyone else gets 404. A run is kept for 24 hours after it starts, then answers 404. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "ID of the run, a UUID returned when the run started",
              "example": "0192f3c4-5b6a-7d8e-9f01-23456789abcd"
            },
            "required": true,
            "description": "ID of the run, a UUID returned when the run started",
            "name": "runId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The run and, once finished, its answer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The run's ID, a UUID. A run is kept for 24 hours; read it again by this ID until it finishes.",
                      "example": "8c1f4b2e-5d7a-4e93-b6c0-2a9f7e1d3b58"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "copilot",
                        "translate_message",
                        "attribute_preview",
                        "ticket_fields",
                        "kb_ask",
                        "reply_suggestion"
                      ],
                      "description": "What the run does. copilot: a teammate's copilot question. translate_message: a message translation. attribute_preview: an attribute detection preview. ticket_fields: ticket field suggestions. kb_ask: a help center question from the widget. reply_suggestion: a draft reply to the customer.",
                      "example": "reply_suggestion"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "succeeded",
                        "failed"
                      ],
                      "description": "pending: a worker has not answered yet. succeeded: output is set. failed: error is set; a run still pending after 30 minutes reads as failed.",
                      "example": "pending"
                    },
                    "output": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The answer, translation or draft reply text. Null for runs that return values instead.",
                          "example": "You can request a refund within 30 days from Billing > Invoices."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "article",
                                  "snippet",
                                  "document",
                                  "webpage",
                                  "post"
                                ],
                                "description": "The source's kind: a help center article, an assistant snippet, an assistant document, a web source page or a feedback post",
                                "example": "article"
                              },
                              "id": {
                                "type": "string",
                                "description": "The source's ID",
                                "example": "article_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The source's title",
                                "example": "How refunds work"
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title"
                            ]
                          },
                          "description": "The knowledge sources that the answer used. Empty when none."
                        },
                        "proposedActionIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Pending actions that a copilot run proposed for a teammate's approval. Empty for other kinds.",
                          "example": [
                            "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "The attribute or ticket field key that the value is for",
                                "example": "plan"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The suggested value. Null: the AI found no value.",
                                "example": "enterprise"
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The AI's short reason for the value. Null when none was given.",
                                "example": "The customer mentions their enterprise contract."
                              }
                            },
                            "required": [
                              "key",
                              "value",
                              "reason"
                            ]
                          },
                          "description": "Detected attribute values (attribute_preview) or suggested ticket field values (ticket_fields). Empty for other kinds."
                        }
                      },
                      "required": [
                        "text",
                        "citations",
                        "proposedActionIds",
                        "values"
                      ],
                      "description": "The run's result. Null until the run succeeds."
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the run failed. Null unless status is failed.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "When the run was created, as an ISO 8601 timestamp",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "finishedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the worker finished the run, as an ISO 8601 timestamp. Null while pending.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "output",
                    "error",
                    "createdAt",
                    "finishedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The run does not exist, expired after 24 hours, or another teammate started it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/transform": {
      "post": {
        "operationId": "createQuillsAdminAssistantTransform",
        "tags": [
          "AI assistant"
        ],
        "summary": "Rewrite a text with AI",
        "description": "Rewrites text that the teammate already has (tone, length, grammar or translation) and returns the result. Nothing is saved except an AI usage log row for the `copilot_transform` step. Requires the `read` permission. Answers 409 when no AI provider is configured and 502 when the provider call fails.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "more_friendly",
                      "more_formal",
                      "more_concise",
                      "expand",
                      "rephrase",
                      "fix_grammar",
                      "translate"
                    ],
                    "description": "The rewrite: `more_friendly` (warmer tone), `more_formal` (professional tone), `more_concise` (shorter, same facts), `expand` (more detail, consistent with the text), `rephrase` (new words, same meaning), `fix_grammar` (grammar, spelling and punctuation only) or `translate` (into `language`)",
                    "example": "more_friendly"
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8000,
                    "description": "The text to rewrite",
                    "example": "We fixed it. Try again."
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 60,
                    "description": "Target language for `translate`, as a name or code that the model understands. Required when `kind` is `translate`; ignored otherwise.",
                    "example": "Spanish"
                  }
                },
                "required": [
                  "kind",
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The rewritten text",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "description": "The rewritten text",
                      "example": "Good news: we fixed the issue. Could you try again?"
                    }
                  },
                  "required": [
                    "text"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No AI provider is configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/copilot-events": {
      "post": {
        "operationId": "recordQuillsCopilotEvent",
        "tags": [
          "AI assistant"
        ],
        "summary": "Record how a teammate used a copilot answer",
        "description": "Records copilot telemetry for the copilot usage report: a teammate inserted copilot output into a reply or note, or rated it thumbs up or down. Writes one append-only event row and no outbox event. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationId": {
                    "type": "string",
                    "description": "Conversation that the request is about, as a TypeID or UUID. Send exactly one of `conversationId` and `ticketId`.",
                    "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                  },
                  "ticketId": {
                    "type": "string",
                    "description": "Ticket that the request is about, as a TypeID or UUID. Send exactly one of `conversationId` and `ticketId`. A deleted ticket answers 404.",
                    "example": "ticket_01m8rxfrbhfzr9r83t8d2n37cb"
                  },
                  "eventType": {
                    "type": "string",
                    "enum": [
                      "answer_inserted",
                      "transform_inserted",
                      "summary_inserted",
                      "feedback"
                    ],
                    "description": "What happened: `answer_inserted` (a copilot answer), `transform_inserted` (a rewrite) or `summary_inserted` (a summary) was inserted, or `feedback` (the teammate rated copilot output)",
                    "example": "answer_inserted"
                  },
                  "destination": {
                    "type": "string",
                    "enum": [
                      "reply",
                      "note"
                    ],
                    "description": "Where the output was inserted: `reply` (a customer reply) or `note` (a private note). Required for the inserted events; not allowed with `feedback`.",
                    "example": "reply"
                  },
                  "rating": {
                    "type": "string",
                    "enum": [
                      "up",
                      "down"
                    ],
                    "description": "Thumbs rating. Required with `feedback`; not allowed with the inserted events.",
                    "example": "up"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Optional free-text reason for the event, such as why a rating was down",
                    "example": "The answer cited an outdated article."
                  }
                },
                "required": [
                  "eventType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The recorded event's ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the recorded event",
                      "example": "assistant_event_01m8rxfrbhfzr9r85b3k7q2wde"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation or ticket does not exist in this workspace, or the ticket is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/pending-actions": {
      "get": {
        "operationId": "listQuillsAssistantPendingActions",
        "tags": [
          "AI assistant"
        ],
        "summary": "List the actions the assistant proposed",
        "description": "Lists actions that the assistant proposed, newest first. Filters combine with AND. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "proposed",
                "approved",
                "rejected",
                "expired",
                "executed",
                "failed"
              ],
              "description": "Only actions in this status. Omit for every status.",
              "example": "proposed"
            },
            "required": false,
            "description": "Only actions in this status. Omit for every status.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only actions on this conversation (TypeID or UUID)",
              "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
            },
            "required": false,
            "description": "Only actions on this conversation (TypeID or UUID)",
            "name": "conversationId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Only actions on this ticket (TypeID or UUID)",
              "example": "ticket_01m8rxfrbhfzr9r83t8d2n37cb"
            },
            "required": false,
            "description": "Only actions on this ticket (TypeID or UUID)",
            "name": "ticketId",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of actions to return. Default: 50.",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of actions to return. Default: 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The actions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The proposed action's ID",
                            "example": "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "toolName": {
                            "type": "string",
                            "description": "The write tool or connector tool that the action runs",
                            "example": "set_conversation_status"
                          },
                          "summary": {
                            "type": "string",
                            "description": "One-line description of the action, written when it was proposed",
                            "example": "Close the conversation"
                          },
                          "previewDiff": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "targetType": {
                                "type": "string",
                                "enum": [
                                  "conversation",
                                  "ticket",
                                  "connector"
                                ],
                                "description": "The kind of record that the action changes",
                                "example": "conversation"
                              },
                              "targetId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The changed record's ID. Null when the tool names none.",
                                "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                              },
                              "fields": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "field": {
                                      "type": "string",
                                      "description": "The field that changes",
                                      "example": "status"
                                    },
                                    "before": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "The field's value now. Null: empty or unknown.",
                                      "example": "open"
                                    },
                                    "after": {
                                      "anyOf": [
                                        {
                                          "type": "string"
                                        },
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "boolean"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "The value that the action would set. Null: cleared.",
                                      "example": "closed"
                                    }
                                  },
                                  "required": [
                                    "field",
                                    "before",
                                    "after"
                                  ]
                                },
                                "description": "Field-by-field changes the action would make"
                              },
                              "recordCount": {
                                "type": "integer",
                                "description": "How many records the action changes",
                                "example": 1
                              }
                            },
                            "required": [
                              "targetType",
                              "targetId",
                              "fields",
                              "recordCount"
                            ],
                            "description": "Preview of what the action would change, for the approver. Null when the tool provides no preview."
                          },
                          "procedureId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The skill whose tool allowlist was in force when the action was proposed. Null: none.",
                            "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "originRole": {
                            "type": "string",
                            "description": "The assistant role that proposed the action, for example customer_support, copilot_qa or workspace_assistant",
                            "example": "copilot_qa"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "proposed",
                              "approved",
                              "rejected",
                              "expired",
                              "executed",
                              "failed"
                            ],
                            "description": "proposed: awaiting a decision. approved: approved connector action that a worker runs next. rejected: a teammate rejected it. expired: no decision before expiresAt. executed: the change was made. failed: the worker's connector call failed.",
                            "example": "proposed"
                          },
                          "conversationId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The conversation that the action belongs to. Exactly one of conversationId and ticketId is set.",
                            "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                          },
                          "ticketId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The ticket that the action belongs to. Exactly one of conversationId and ticketId is set.",
                            "example": null
                          },
                          "requestedById": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The principal that filed the proposal: an API key's service principal, the assistant, or the teammate asking in the app. Null when not recorded.",
                            "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                          },
                          "decidedById": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The principal that approved or rejected the action. Null until decided.",
                            "example": null
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Why a run failed. Null unless the action failed.",
                            "example": null
                          },
                          "proposedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the assistant proposed the action",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "expiresAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the proposal expires if nobody decides it",
                            "example": "2026-11-30T14:20:00.000Z"
                          },
                          "decidedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the action was approved or rejected. Null until decided.",
                            "example": null
                          },
                          "executedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the change was made. Null until executed.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "toolName",
                          "summary",
                          "previewDiff",
                          "procedureId",
                          "originRole",
                          "status",
                          "conversationId",
                          "ticketId",
                          "requestedById",
                          "decidedById",
                          "error",
                          "proposedAt",
                          "expiresAt",
                          "decidedAt",
                          "executedAt"
                        ]
                      },
                      "description": "The matching actions, most recently proposed first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/pending-actions/{actionId}": {
      "get": {
        "operationId": "getQuillsAssistantPendingAction",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get one proposed action",
        "description": "Returns one action that the assistant proposed, with its preview and status. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The proposed action's ID (TypeID or UUID)",
              "example": "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The proposed action's ID (TypeID or UUID)",
            "name": "actionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The proposed action's ID",
                      "example": "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "toolName": {
                      "type": "string",
                      "description": "The write tool or connector tool that the action runs",
                      "example": "set_conversation_status"
                    },
                    "summary": {
                      "type": "string",
                      "description": "One-line description of the action, written when it was proposed",
                      "example": "Close the conversation"
                    },
                    "previewDiff": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "targetType": {
                          "type": "string",
                          "enum": [
                            "conversation",
                            "ticket",
                            "connector"
                          ],
                          "description": "The kind of record that the action changes",
                          "example": "conversation"
                        },
                        "targetId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The changed record's ID. Null when the tool names none.",
                          "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "description": "The field that changes",
                                "example": "status"
                              },
                              "before": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The field's value now. Null: empty or unknown.",
                                "example": "open"
                              },
                              "after": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The value that the action would set. Null: cleared.",
                                "example": "closed"
                              }
                            },
                            "required": [
                              "field",
                              "before",
                              "after"
                            ]
                          },
                          "description": "Field-by-field changes the action would make"
                        },
                        "recordCount": {
                          "type": "integer",
                          "description": "How many records the action changes",
                          "example": 1
                        }
                      },
                      "required": [
                        "targetType",
                        "targetId",
                        "fields",
                        "recordCount"
                      ],
                      "description": "Preview of what the action would change, for the approver. Null when the tool provides no preview."
                    },
                    "procedureId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The skill whose tool allowlist was in force when the action was proposed. Null: none.",
                      "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "originRole": {
                      "type": "string",
                      "description": "The assistant role that proposed the action, for example customer_support, copilot_qa or workspace_assistant",
                      "example": "copilot_qa"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "proposed",
                        "approved",
                        "rejected",
                        "expired",
                        "executed",
                        "failed"
                      ],
                      "description": "proposed: awaiting a decision. approved: approved connector action that a worker runs next. rejected: a teammate rejected it. expired: no decision before expiresAt. executed: the change was made. failed: the worker's connector call failed.",
                      "example": "proposed"
                    },
                    "conversationId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The conversation that the action belongs to. Exactly one of conversationId and ticketId is set.",
                      "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                    },
                    "ticketId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The ticket that the action belongs to. Exactly one of conversationId and ticketId is set.",
                      "example": null
                    },
                    "requestedById": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The principal that filed the proposal: an API key's service principal, the assistant, or the teammate asking in the app. Null when not recorded.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "decidedById": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The principal that approved or rejected the action. Null until decided.",
                      "example": null
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why a run failed. Null unless the action failed.",
                      "example": null
                    },
                    "proposedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the assistant proposed the action",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the proposal expires if nobody decides it",
                      "example": "2026-11-30T14:20:00.000Z"
                    },
                    "decidedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the action was approved or rejected. Null until decided.",
                      "example": null
                    },
                    "executedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the change was made. Null until executed.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "toolName",
                    "summary",
                    "previewDiff",
                    "procedureId",
                    "originRole",
                    "status",
                    "conversationId",
                    "ticketId",
                    "requestedById",
                    "decidedById",
                    "error",
                    "proposedAt",
                    "expiresAt",
                    "decidedAt",
                    "executedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No proposed action with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/pending-actions/{actionId}/approve": {
      "post": {
        "operationId": "approveQuillsAssistantAction",
        "tags": [
          "AI assistant"
        ],
        "summary": "Approve and run a proposed action",
        "description": "Approves a proposed action. Requires the `update` permission, the permission of every write tool. A built-in tool runs now, in this request, through the same domain checks as the teammate's own route; its change event names the approver. A failed check (for example a missing required attribute) leaves the action proposed. A connector tool's action becomes `approved` here when its connector still offers the tool and the arguments fit its schema; a worker then calls the tool once and sets the action `executed` or `failed`. Records the tool's change event (with `assistantActionId` in its payload) or, when nothing changed or for a connector action, an `assistant_action.approved` event. A decided or expired action returns 409, so a repeated approval never runs twice. An action that has an approval token must be approved through the decision route.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The proposed action's ID (TypeID or UUID)",
              "example": "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The proposed action's ID (TypeID or UUID)",
            "name": "actionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The executed action and the change it made, or an approved connector action that a worker runs next",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The proposed action's ID",
                          "example": "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                        },
                        "toolName": {
                          "type": "string",
                          "description": "The write tool or connector tool that the action runs",
                          "example": "set_conversation_status"
                        },
                        "summary": {
                          "type": "string",
                          "description": "One-line description of the action, written when it was proposed",
                          "example": "Close the conversation"
                        },
                        "previewDiff": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "targetType": {
                              "type": "string",
                              "enum": [
                                "conversation",
                                "ticket",
                                "connector"
                              ],
                              "description": "The kind of record that the action changes",
                              "example": "conversation"
                            },
                            "targetId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The changed record's ID. Null when the tool names none.",
                              "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                            },
                            "fields": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "description": "The field that changes",
                                    "example": "status"
                                  },
                                  "before": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The field's value now. Null: empty or unknown.",
                                    "example": "open"
                                  },
                                  "after": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The value that the action would set. Null: cleared.",
                                    "example": "closed"
                                  }
                                },
                                "required": [
                                  "field",
                                  "before",
                                  "after"
                                ]
                              },
                              "description": "Field-by-field changes the action would make"
                            },
                            "recordCount": {
                              "type": "integer",
                              "description": "How many records the action changes",
                              "example": 1
                            }
                          },
                          "required": [
                            "targetType",
                            "targetId",
                            "fields",
                            "recordCount"
                          ],
                          "description": "Preview of what the action would change, for the approver. Null when the tool provides no preview."
                        },
                        "procedureId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The skill whose tool allowlist was in force when the action was proposed. Null: none.",
                          "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
                        },
                        "originRole": {
                          "type": "string",
                          "description": "The assistant role that proposed the action, for example customer_support, copilot_qa or workspace_assistant",
                          "example": "copilot_qa"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "proposed",
                            "approved",
                            "rejected",
                            "expired",
                            "executed",
                            "failed"
                          ],
                          "description": "proposed: awaiting a decision. approved: approved connector action that a worker runs next. rejected: a teammate rejected it. expired: no decision before expiresAt. executed: the change was made. failed: the worker's connector call failed.",
                          "example": "proposed"
                        },
                        "conversationId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The conversation that the action belongs to. Exactly one of conversationId and ticketId is set.",
                          "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                        },
                        "ticketId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The ticket that the action belongs to. Exactly one of conversationId and ticketId is set.",
                          "example": null
                        },
                        "requestedById": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The principal that filed the proposal: an API key's service principal, the assistant, or the teammate asking in the app. Null when not recorded.",
                          "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                        },
                        "decidedById": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The principal that approved or rejected the action. Null until decided.",
                          "example": null
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Why a run failed. Null unless the action failed.",
                          "example": null
                        },
                        "proposedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the assistant proposed the action",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the proposal expires if nobody decides it",
                          "example": "2026-11-30T14:20:00.000Z"
                        },
                        "decidedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the action was approved or rejected. Null until decided.",
                          "example": null
                        },
                        "executedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the change was made. Null until executed.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "toolName",
                        "summary",
                        "previewDiff",
                        "procedureId",
                        "originRole",
                        "status",
                        "conversationId",
                        "ticketId",
                        "requestedById",
                        "decidedById",
                        "error",
                        "proposedAt",
                        "expiresAt",
                        "decidedAt",
                        "executedAt"
                      ],
                      "description": "The action after the approval"
                    },
                    "change": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "board.project_linked",
                            "board.project_unlinked",
                            "post.task_linked",
                            "post.task_unlinked",
                            "post.task_create_failed",
                            "post.update_sent",
                            "team.bound",
                            "team.unbound",
                            "workspace.imported",
                            "user.created",
                            "user.identified",
                            "user.contact_email_code_requested",
                            "user.updated",
                            "user.deleted",
                            "user.lead_merged",
                            "user.merged",
                            "user.merge_undone",
                            "contact_identity.added",
                            "contact_identity.removed",
                            "user.tagged",
                            "user.untagged",
                            "user.blocked",
                            "conversation.ip_blocked",
                            "conversation.ip_unblocked",
                            "spam_block.created",
                            "spam_block.deleted",
                            "conversation.requester_changed",
                            "conversation.breach_update_sent",
                            "conversation.solution_offered",
                            "request_link.revoked",
                            "settings.reopen_policy_updated",
                            "settings.csat_updated",
                            "settings.notification_defaults_updated",
                            "csat.low",
                            "webhook.failing",
                            "webhook.replay_requested",
                            "brand.created",
                            "brand.updated",
                            "brand.deleted",
                            "email_template.updated",
                            "notification.digest_sent",
                            "user.unblocked",
                            "user.company_set",
                            "user.company_removed",
                            "company.created",
                            "company.updated",
                            "company.deleted",
                            "company.imported",
                            "user_attribute.created",
                            "user_attribute.updated",
                            "user_attribute.deleted",
                            "company_attribute.created",
                            "company_attribute.updated",
                            "company_attribute.deleted",
                            "segment.created",
                            "segment.updated",
                            "segment.deleted",
                            "segment.members_added",
                            "segment.members_removed",
                            "segment.evaluated",
                            "segment.evaluated_all",
                            "team.updated",
                            "team.deleted",
                            "settings.portal_updated",
                            "settings.branding_updated",
                            "settings.widget_updated",
                            "settings.widget_secret_rotated",
                            "settings.widget_install_code_minted",
                            "settings.developer_updated",
                            "settings.labs_updated",
                            "file.created",
                            "file.deleted",
                            "settings.logo_updated",
                            "settings.logo_removed",
                            "settings.favicon_updated",
                            "settings.favicon_removed",
                            "settings.header_logo_updated",
                            "settings.header_logo_removed",
                            "board.created",
                            "board.updated",
                            "board.deleted",
                            "post.created",
                            "post.updated",
                            "post.status_changed",
                            "post.moved",
                            "post.owner_changed",
                            "post.tags_changed",
                            "post.deleted",
                            "post.restored",
                            "post.voted",
                            "post.unvoted",
                            "comment.created",
                            "comment.updated",
                            "comment.deleted",
                            "comment.restored",
                            "comment.pinned",
                            "comment.unpinned",
                            "comment.reacted",
                            "comment.unreacted",
                            "webhook.created",
                            "webhook.updated",
                            "webhook.deleted",
                            "webhook.secret_rotated",
                            "post.subscription_changed",
                            "changelog.subscription_changed",
                            "changelog.subscribers_imported",
                            "tag.created",
                            "tag.updated",
                            "tag.deleted",
                            "status.created",
                            "status.updated",
                            "status.deleted",
                            "status.reordered",
                            "roadmap.created",
                            "roadmap.updated",
                            "roadmap.deleted",
                            "roadmap.reordered",
                            "roadmap.column_created",
                            "roadmap.column_updated",
                            "roadmap.column_deleted",
                            "changelog.created",
                            "changelog.updated",
                            "changelog.published",
                            "changelog.deleted",
                            "changelog.translation_saved",
                            "changelog.translation_deleted",
                            "changelog.category_created",
                            "changelog.category_updated",
                            "changelog.category_deleted",
                            "changelog.category_reordered",
                            "settings.changelog_updated",
                            "settings.moderation_updated",
                            "post.approved",
                            "post.rejected",
                            "comment.approved",
                            "comment.rejected",
                            "post.merged",
                            "post.unmerged",
                            "post_view.created",
                            "post_view.deleted",
                            "settings.portal_access_updated",
                            "settings.portal_sign_in_updated",
                            "settings.widget_install_code_redeemed",
                            "portal.access_denied",
                            "customer.profile_updated",
                            "customer.profile_unlinked",
                            "help_center.category_created",
                            "help_center.category_updated",
                            "help_center.category_deleted",
                            "help_center.category_restored",
                            "help_center.categories_reordered",
                            "help_center.category_translation_saved",
                            "help_center.category_translation_deleted",
                            "help_center.article_created",
                            "help_center.article_updated",
                            "help_center.article_published",
                            "help_center.article_unpublished",
                            "help_center.article_deleted",
                            "help_center.article_restored",
                            "help_center.articles_reordered",
                            "help_center.article_feedback_recorded",
                            "help_center.article_feedback_reason_added",
                            "help_center.article_translation_saved",
                            "help_center.article_translation_status_changed",
                            "help_center.article_translation_deleted",
                            "help_center.redirect_rule_created",
                            "help_center.redirect_rule_deleted",
                            "settings.help_center_updated",
                            "settings.status_updated",
                            "status.component_created",
                            "status.component_updated",
                            "status.component_changed",
                            "status.component_deleted",
                            "status.components_reordered",
                            "status.group_created",
                            "status.group_updated",
                            "status.group_deleted",
                            "status.groups_reordered",
                            "status.history_cleared",
                            "status.incident_published",
                            "status.incident_created",
                            "status.incident_updated",
                            "status.incident_update_posted",
                            "status.incident_resolved",
                            "status.incident_deleted",
                            "status.maintenance_started",
                            "status.template_created",
                            "status.template_updated",
                            "status.template_deleted",
                            "status.subscriber_added",
                            "status.subscribers_imported",
                            "status.subscriber_removed",
                            "status.subscribed",
                            "status.unsubscribed",
                            "integration.connected",
                            "integration.updated",
                            "integration.deleted",
                            "integration.channel_added",
                            "integration.channel_updated",
                            "integration.channel_removed",
                            "integration_sync.recovered",
                            "post.integration_sync_requested",
                            "custom_domain.set",
                            "custom_domain.removed",
                            "custom_domain.verification_requested",
                            "settings.powered_by_updated",
                            "custom_domain.checked",
                            "workspace.wipe_requested",
                            "workspace.wiped",
                            "ticket.created",
                            "ticket.status_changed",
                            "ticket.priority_changed",
                            "ticket.assigned",
                            "ticket.bulk_updated",
                            "ticket.note_added",
                            "ticket.replied",
                            "ticket.watcher_added",
                            "ticket.watcher_removed",
                            "ticket.tracker_linked",
                            "ticket.tracker_unlinked",
                            "ticket.conversation_linked",
                            "ticket.external_linked",
                            "ticket.external_unlinked",
                            "ticket.issue_requested",
                            "ticket_status.created",
                            "ticket_status.updated",
                            "ticket_status.deleted",
                            "ticket_status.reordered",
                            "ticket_type.created",
                            "ticket_type.updated",
                            "ticket_type.archived",
                            "ticket_type.restored",
                            "macro.created",
                            "macro.updated",
                            "macro.deleted",
                            "macro.applied",
                            "sla_policy.created",
                            "sla_policy.updated",
                            "sla_policy.archived",
                            "sla_policy.restored",
                            "settings.ticket_stage_labels_updated",
                            "settings.default_sla_policy_updated",
                            "settings.office_hours_updated",
                            "settings.conversation_routing_updated",
                            "settings.email_auto_ack_updated",
                            "settings.away_reply_updated",
                            "settings.spam_filter_updated",
                            "settings.undo_send_updated",
                            "channel_account.inbound_updated",
                            "channel_account.sending_address_saved",
                            "channel_account.smtp_updated",
                            "channel_account.deleted",
                            "sending_domain.deleted",
                            "sending_domain.checks_restarted",
                            "conversation.status_changed",
                            "conversation.assigned",
                            "conversation.priority_changed",
                            "conversation.attribute_changed",
                            "conversation.tags_changed",
                            "conversation.read",
                            "conversation.updated",
                            "conversation.participant_added",
                            "conversation.participant_removed",
                            "conversation.bulk_updated",
                            "conversation.merged",
                            "conversation.merge_undone",
                            "conversation.deleted",
                            "ticket.merged",
                            "ticket.merge_undone",
                            "message.created",
                            "message.send_scheduled",
                            "message.send_recalled",
                            "message.note_created",
                            "message.updated",
                            "message.note_updated",
                            "message.deleted",
                            "message.note_deleted",
                            "message.reacted",
                            "message.unreacted",
                            "conversation_tag.created",
                            "conversation_tag.updated",
                            "conversation_tag.archived",
                            "conversation_tag.restored",
                            "conversation_tag.deleted",
                            "conversation_attribute.created",
                            "conversation_attribute.updated",
                            "conversation_attribute.archived",
                            "conversation_attribute.restored",
                            "conversation_view.created",
                            "conversation_view.updated",
                            "conversation_view.deleted",
                            "agent.availability_changed",
                            "portal.invite_sent",
                            "portal.invite_resent",
                            "portal.invite_canceled",
                            "portal.invite_link_created",
                            "portal.invite_accepted",
                            "settings.widget_hero_image_updated",
                            "settings.widget_hero_image_removed",
                            "export.requested",
                            "export.finished",
                            "import.requested",
                            "import.finished",
                            "workflow.created",
                            "workflow.updated",
                            "workflow.deleted",
                            "workflow.reordered",
                            "workflow.published",
                            "workflow.paused",
                            "workflow.version_restored",
                            "workflow.run_requested",
                            "settings.workflow_abandoned_auto_close_updated",
                            "settings.workflow_close_spam_updated",
                            "settings.assistant_updated",
                            "assistant_guidance.created",
                            "assistant_guidance.updated",
                            "assistant_guidance.deleted",
                            "assistant_guidance.reordered",
                            "assistant_snippet.created",
                            "assistant_snippet.updated",
                            "assistant_snippet.deleted",
                            "assistant_skill.created",
                            "assistant_skill.updated",
                            "assistant_skill.deleted",
                            "assistant_web_source.added",
                            "assistant_web_source.updated",
                            "assistant_web_source.deleted",
                            "assistant_web_source.fetched",
                            "assistant_document.created",
                            "assistant_document.deleted",
                            "assistant_connector.deleted",
                            "assistant_run.requested",
                            "assistant_run.completed",
                            "assistant_action.proposed",
                            "assistant_action.approved",
                            "assistant_action.rejected",
                            "assistant_action.completed",
                            "assistant.embeddings_requested",
                            "merge_suggestion.dismissed",
                            "merge_suggestion.restored",
                            "knowledge_suggestion.created",
                            "knowledge_suggestion.attached",
                            "knowledge_suggestion.answered",
                            "knowledge_suggestion.drafted",
                            "knowledge_suggestion.updated",
                            "knowledge_suggestion.approved",
                            "knowledge_suggestion.dismissed",
                            "post.merge_check_requested",
                            "post.sentiment_requested",
                            "post.tags_backfill_requested",
                            "conversation.summary_requested",
                            "conversation.summarized",
                            "conversation.post_unlinked",
                            "ticket.summary_requested",
                            "ticket.summarized",
                            "help_center.article_translation_requested",
                            "conversation.created",
                            "conversation.csat_submitted",
                            "integration.platform_credentials_saved",
                            "integration.platform_credentials_deleted",
                            "integration.status_sync_enabled",
                            "integration.status_sync_disabled",
                            "integration.status_mappings_updated",
                            "conversation.email_received",
                            "assistant_connector.created",
                            "assistant_connector.updated",
                            "assistant_connector.refreshed",
                            "assistant_connector.connected",
                            "slack_agent.settings_updated",
                            "github_inbox.settings_updated",
                            "github_inbox.message_retried",
                            "integration.hook_received",
                            "conversation.agent_started",
                            "app.post_linked",
                            "app.post_unlinked",
                            "app.post_created",
                            "app.registered",
                            "app.updated",
                            "branding.auto_started",
                            "branding.offer_accepted",
                            "branding.offer_declined",
                            "branding.auto_undone",
                            "settings.undone",
                            "conversation.test_deleted",
                            "signal.created",
                            "signal.accepted",
                            "signal.dismissed",
                            "signal.restored",
                            "survey.created",
                            "survey.updated",
                            "survey.closed",
                            "survey.responded",
                            "post.scored",
                            "settings.scoring_updated",
                            "post.vote_importance_set",
                            "changelog.reacted",
                            "changelog.unreacted",
                            "board.settings_updated",
                            "survey.deleted",
                            "settings.ai_budget_updated",
                            "settings.ai_provider_keys_updated",
                            "assistant.resolution_feedback_recorded",
                            "help_center.article_freshness_updated",
                            "help_center.article_reviewed",
                            "help_center.article_stale_flagged",
                            "help_center.search_synonym_created",
                            "help_center.search_synonym_deleted",
                            "export_schedule.updated",
                            "export_schedule.deleted",
                            "settings.preset_applied",
                            "settings.setup_state_updated",
                            "privacy.customer_erased",
                            "privacy.access_requested",
                            "privacy.access_completed",
                            "privacy.retention_updated",
                            "message.redacted",
                            "assistant_decline_topic.created",
                            "assistant_decline_topic.updated",
                            "assistant_decline_topic.deleted",
                            "assistant_eval.recorded",
                            "assistant_draft.created",
                            "assistant_draft.sent",
                            "assistant_draft.dismissed",
                            "conversation.handed_off",
                            "release.verified",
                            "release.shipped",
                            "ticket.post_linked"
                          ],
                          "description": "The change event recorded for the approved action",
                          "example": "conversation.status_changed"
                        },
                        "entityType": {
                          "type": "string",
                          "enum": [
                            "conversation",
                            "conversation_message"
                          ],
                          "description": "The kind of record that changed",
                          "example": "conversation"
                        },
                        "entityId": {
                          "type": "string",
                          "description": "The changed record's ID",
                          "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                        },
                        "payload": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "Payload key",
                                "example": "status"
                              },
                              "value": {
                                "type": "string",
                                "description": "Payload value, as a string",
                                "example": "closed"
                              }
                            },
                            "required": [
                              "key",
                              "value"
                            ]
                          },
                          "description": "The change event's payload, as key/value pairs"
                        }
                      },
                      "required": [
                        "type",
                        "entityType",
                        "entityId",
                        "payload"
                      ],
                      "description": "The change that a built-in tool made. Null for a connector action, a rejection, or a tool that found nothing to change."
                    }
                  },
                  "required": [
                    "action",
                    "change"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No proposed action with this ID in the workspace, or its conversation no longer exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The action was already decided or expired, the approval token is missing, invalid or used, or the tool can no longer run (unknown tool, invalid arguments, or a connector that no longer offers it)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/pending-actions/{actionId}/reject": {
      "post": {
        "operationId": "rejectQuillsAssistantAction",
        "tags": [
          "AI assistant"
        ],
        "summary": "Reject a proposed action",
        "description": "Rejects a proposed action; it never runs. Requires the `update` permission, as an approval does. Records an `assistant_action.rejected` event. An action that has an approval token must be decided through the decision route.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The proposed action's ID (TypeID or UUID)",
              "example": "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The proposed action's ID (TypeID or UUID)",
            "name": "actionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The rejected action",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The proposed action's ID",
                      "example": "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "toolName": {
                      "type": "string",
                      "description": "The write tool or connector tool that the action runs",
                      "example": "set_conversation_status"
                    },
                    "summary": {
                      "type": "string",
                      "description": "One-line description of the action, written when it was proposed",
                      "example": "Close the conversation"
                    },
                    "previewDiff": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "targetType": {
                          "type": "string",
                          "enum": [
                            "conversation",
                            "ticket",
                            "connector"
                          ],
                          "description": "The kind of record that the action changes",
                          "example": "conversation"
                        },
                        "targetId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The changed record's ID. Null when the tool names none.",
                          "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                        },
                        "fields": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "field": {
                                "type": "string",
                                "description": "The field that changes",
                                "example": "status"
                              },
                              "before": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The field's value now. Null: empty or unknown.",
                                "example": "open"
                              },
                              "after": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The value that the action would set. Null: cleared.",
                                "example": "closed"
                              }
                            },
                            "required": [
                              "field",
                              "before",
                              "after"
                            ]
                          },
                          "description": "Field-by-field changes the action would make"
                        },
                        "recordCount": {
                          "type": "integer",
                          "description": "How many records the action changes",
                          "example": 1
                        }
                      },
                      "required": [
                        "targetType",
                        "targetId",
                        "fields",
                        "recordCount"
                      ],
                      "description": "Preview of what the action would change, for the approver. Null when the tool provides no preview."
                    },
                    "procedureId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The skill whose tool allowlist was in force when the action was proposed. Null: none.",
                      "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "originRole": {
                      "type": "string",
                      "description": "The assistant role that proposed the action, for example customer_support, copilot_qa or workspace_assistant",
                      "example": "copilot_qa"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "proposed",
                        "approved",
                        "rejected",
                        "expired",
                        "executed",
                        "failed"
                      ],
                      "description": "proposed: awaiting a decision. approved: approved connector action that a worker runs next. rejected: a teammate rejected it. expired: no decision before expiresAt. executed: the change was made. failed: the worker's connector call failed.",
                      "example": "proposed"
                    },
                    "conversationId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The conversation that the action belongs to. Exactly one of conversationId and ticketId is set.",
                      "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                    },
                    "ticketId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The ticket that the action belongs to. Exactly one of conversationId and ticketId is set.",
                      "example": null
                    },
                    "requestedById": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The principal that filed the proposal: an API key's service principal, the assistant, or the teammate asking in the app. Null when not recorded.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "decidedById": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The principal that approved or rejected the action. Null until decided.",
                      "example": null
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why a run failed. Null unless the action failed.",
                      "example": null
                    },
                    "proposedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the assistant proposed the action",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the proposal expires if nobody decides it",
                      "example": "2026-11-30T14:20:00.000Z"
                    },
                    "decidedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the action was approved or rejected. Null until decided.",
                      "example": null
                    },
                    "executedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the change was made. Null until executed.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "toolName",
                    "summary",
                    "previewDiff",
                    "procedureId",
                    "originRole",
                    "status",
                    "conversationId",
                    "ticketId",
                    "requestedById",
                    "decidedById",
                    "error",
                    "proposedAt",
                    "expiresAt",
                    "decidedAt",
                    "executedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No proposed action with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The action was already decided or expired, or it needs an approval token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/pending-actions/{actionId}/decision": {
      "post": {
        "operationId": "decideQuillsAssistantAction",
        "tags": [
          "AI assistant"
        ],
        "summary": "Approve or reject a proposed action with optional single-use token",
        "description": "Approves or rejects a proposed action in one call. An action created with an approval token requires that token, and the token works once; an action without one rejects any token. A proposal expires 15 minutes after it is made. Approval behaves like the approve route: a built-in tool runs in this request and a connector action becomes `approved` for a worker. Records the tool's change event, `assistant_action.approved` or `assistant_action.rejected`. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The proposed action's ID (TypeID or UUID)",
              "example": "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The proposed action's ID (TypeID or UUID)",
            "name": "actionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "decision": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "reject"
                    ],
                    "description": "approve: run the action. reject: discard it.",
                    "example": "approve"
                  },
                  "approvalToken": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256,
                    "description": "Single-use approval token issued with the proposal. Required when the action has one; must be omitted when it has none.",
                    "example": "9f2c4e1ab07d5f3e8c6b2a194d0e7f5a3c8b1d6e2f9a4c07"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Why the action was rejected, stored with a rejection. Ignored on approval.",
                    "example": "The customer already confirmed the fix."
                  }
                },
                "required": [
                  "decision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The decided action and any resulting domain change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The proposed action's ID",
                          "example": "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                        },
                        "toolName": {
                          "type": "string",
                          "description": "The write tool or connector tool that the action runs",
                          "example": "set_conversation_status"
                        },
                        "summary": {
                          "type": "string",
                          "description": "One-line description of the action, written when it was proposed",
                          "example": "Close the conversation"
                        },
                        "previewDiff": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "targetType": {
                              "type": "string",
                              "enum": [
                                "conversation",
                                "ticket",
                                "connector"
                              ],
                              "description": "The kind of record that the action changes",
                              "example": "conversation"
                            },
                            "targetId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The changed record's ID. Null when the tool names none.",
                              "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                            },
                            "fields": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string",
                                    "description": "The field that changes",
                                    "example": "status"
                                  },
                                  "before": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The field's value now. Null: empty or unknown.",
                                    "example": "open"
                                  },
                                  "after": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "description": "The value that the action would set. Null: cleared.",
                                    "example": "closed"
                                  }
                                },
                                "required": [
                                  "field",
                                  "before",
                                  "after"
                                ]
                              },
                              "description": "Field-by-field changes the action would make"
                            },
                            "recordCount": {
                              "type": "integer",
                              "description": "How many records the action changes",
                              "example": 1
                            }
                          },
                          "required": [
                            "targetType",
                            "targetId",
                            "fields",
                            "recordCount"
                          ],
                          "description": "Preview of what the action would change, for the approver. Null when the tool provides no preview."
                        },
                        "procedureId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The skill whose tool allowlist was in force when the action was proposed. Null: none.",
                          "example": "skill_01m8rxfrbhfzr9r837k90wcggm"
                        },
                        "originRole": {
                          "type": "string",
                          "description": "The assistant role that proposed the action, for example customer_support, copilot_qa or workspace_assistant",
                          "example": "copilot_qa"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "proposed",
                            "approved",
                            "rejected",
                            "expired",
                            "executed",
                            "failed"
                          ],
                          "description": "proposed: awaiting a decision. approved: approved connector action that a worker runs next. rejected: a teammate rejected it. expired: no decision before expiresAt. executed: the change was made. failed: the worker's connector call failed.",
                          "example": "proposed"
                        },
                        "conversationId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The conversation that the action belongs to. Exactly one of conversationId and ticketId is set.",
                          "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                        },
                        "ticketId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The ticket that the action belongs to. Exactly one of conversationId and ticketId is set.",
                          "example": null
                        },
                        "requestedById": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The principal that filed the proposal: an API key's service principal, the assistant, or the teammate asking in the app. Null when not recorded.",
                          "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                        },
                        "decidedById": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The principal that approved or rejected the action. Null until decided.",
                          "example": null
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Why a run failed. Null unless the action failed.",
                          "example": null
                        },
                        "proposedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the assistant proposed the action",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the proposal expires if nobody decides it",
                          "example": "2026-11-30T14:20:00.000Z"
                        },
                        "decidedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the action was approved or rejected. Null until decided.",
                          "example": null
                        },
                        "executedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the change was made. Null until executed.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "toolName",
                        "summary",
                        "previewDiff",
                        "procedureId",
                        "originRole",
                        "status",
                        "conversationId",
                        "ticketId",
                        "requestedById",
                        "decidedById",
                        "error",
                        "proposedAt",
                        "expiresAt",
                        "decidedAt",
                        "executedAt"
                      ],
                      "description": "The action after the decision"
                    },
                    "change": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "board.project_linked",
                            "board.project_unlinked",
                            "post.task_linked",
                            "post.task_unlinked",
                            "post.task_create_failed",
                            "post.update_sent",
                            "team.bound",
                            "team.unbound",
                            "workspace.imported",
                            "user.created",
                            "user.identified",
                            "user.contact_email_code_requested",
                            "user.updated",
                            "user.deleted",
                            "user.lead_merged",
                            "user.merged",
                            "user.merge_undone",
                            "contact_identity.added",
                            "contact_identity.removed",
                            "user.tagged",
                            "user.untagged",
                            "user.blocked",
                            "conversation.ip_blocked",
                            "conversation.ip_unblocked",
                            "spam_block.created",
                            "spam_block.deleted",
                            "conversation.requester_changed",
                            "conversation.breach_update_sent",
                            "conversation.solution_offered",
                            "request_link.revoked",
                            "settings.reopen_policy_updated",
                            "settings.csat_updated",
                            "settings.notification_defaults_updated",
                            "csat.low",
                            "webhook.failing",
                            "webhook.replay_requested",
                            "brand.created",
                            "brand.updated",
                            "brand.deleted",
                            "email_template.updated",
                            "notification.digest_sent",
                            "user.unblocked",
                            "user.company_set",
                            "user.company_removed",
                            "company.created",
                            "company.updated",
                            "company.deleted",
                            "company.imported",
                            "user_attribute.created",
                            "user_attribute.updated",
                            "user_attribute.deleted",
                            "company_attribute.created",
                            "company_attribute.updated",
                            "company_attribute.deleted",
                            "segment.created",
                            "segment.updated",
                            "segment.deleted",
                            "segment.members_added",
                            "segment.members_removed",
                            "segment.evaluated",
                            "segment.evaluated_all",
                            "team.updated",
                            "team.deleted",
                            "settings.portal_updated",
                            "settings.branding_updated",
                            "settings.widget_updated",
                            "settings.widget_secret_rotated",
                            "settings.widget_install_code_minted",
                            "settings.developer_updated",
                            "settings.labs_updated",
                            "file.created",
                            "file.deleted",
                            "settings.logo_updated",
                            "settings.logo_removed",
                            "settings.favicon_updated",
                            "settings.favicon_removed",
                            "settings.header_logo_updated",
                            "settings.header_logo_removed",
                            "board.created",
                            "board.updated",
                            "board.deleted",
                            "post.created",
                            "post.updated",
                            "post.status_changed",
                            "post.moved",
                            "post.owner_changed",
                            "post.tags_changed",
                            "post.deleted",
                            "post.restored",
                            "post.voted",
                            "post.unvoted",
                            "comment.created",
                            "comment.updated",
                            "comment.deleted",
                            "comment.restored",
                            "comment.pinned",
                            "comment.unpinned",
                            "comment.reacted",
                            "comment.unreacted",
                            "webhook.created",
                            "webhook.updated",
                            "webhook.deleted",
                            "webhook.secret_rotated",
                            "post.subscription_changed",
                            "changelog.subscription_changed",
                            "changelog.subscribers_imported",
                            "tag.created",
                            "tag.updated",
                            "tag.deleted",
                            "status.created",
                            "status.updated",
                            "status.deleted",
                            "status.reordered",
                            "roadmap.created",
                            "roadmap.updated",
                            "roadmap.deleted",
                            "roadmap.reordered",
                            "roadmap.column_created",
                            "roadmap.column_updated",
                            "roadmap.column_deleted",
                            "changelog.created",
                            "changelog.updated",
                            "changelog.published",
                            "changelog.deleted",
                            "changelog.translation_saved",
                            "changelog.translation_deleted",
                            "changelog.category_created",
                            "changelog.category_updated",
                            "changelog.category_deleted",
                            "changelog.category_reordered",
                            "settings.changelog_updated",
                            "settings.moderation_updated",
                            "post.approved",
                            "post.rejected",
                            "comment.approved",
                            "comment.rejected",
                            "post.merged",
                            "post.unmerged",
                            "post_view.created",
                            "post_view.deleted",
                            "settings.portal_access_updated",
                            "settings.portal_sign_in_updated",
                            "settings.widget_install_code_redeemed",
                            "portal.access_denied",
                            "customer.profile_updated",
                            "customer.profile_unlinked",
                            "help_center.category_created",
                            "help_center.category_updated",
                            "help_center.category_deleted",
                            "help_center.category_restored",
                            "help_center.categories_reordered",
                            "help_center.category_translation_saved",
                            "help_center.category_translation_deleted",
                            "help_center.article_created",
                            "help_center.article_updated",
                            "help_center.article_published",
                            "help_center.article_unpublished",
                            "help_center.article_deleted",
                            "help_center.article_restored",
                            "help_center.articles_reordered",
                            "help_center.article_feedback_recorded",
                            "help_center.article_feedback_reason_added",
                            "help_center.article_translation_saved",
                            "help_center.article_translation_status_changed",
                            "help_center.article_translation_deleted",
                            "help_center.redirect_rule_created",
                            "help_center.redirect_rule_deleted",
                            "settings.help_center_updated",
                            "settings.status_updated",
                            "status.component_created",
                            "status.component_updated",
                            "status.component_changed",
                            "status.component_deleted",
                            "status.components_reordered",
                            "status.group_created",
                            "status.group_updated",
                            "status.group_deleted",
                            "status.groups_reordered",
                            "status.history_cleared",
                            "status.incident_published",
                            "status.incident_created",
                            "status.incident_updated",
                            "status.incident_update_posted",
                            "status.incident_resolved",
                            "status.incident_deleted",
                            "status.maintenance_started",
                            "status.template_created",
                            "status.template_updated",
                            "status.template_deleted",
                            "status.subscriber_added",
                            "status.subscribers_imported",
                            "status.subscriber_removed",
                            "status.subscribed",
                            "status.unsubscribed",
                            "integration.connected",
                            "integration.updated",
                            "integration.deleted",
                            "integration.channel_added",
                            "integration.channel_updated",
                            "integration.channel_removed",
                            "integration_sync.recovered",
                            "post.integration_sync_requested",
                            "custom_domain.set",
                            "custom_domain.removed",
                            "custom_domain.verification_requested",
                            "settings.powered_by_updated",
                            "custom_domain.checked",
                            "workspace.wipe_requested",
                            "workspace.wiped",
                            "ticket.created",
                            "ticket.status_changed",
                            "ticket.priority_changed",
                            "ticket.assigned",
                            "ticket.bulk_updated",
                            "ticket.note_added",
                            "ticket.replied",
                            "ticket.watcher_added",
                            "ticket.watcher_removed",
                            "ticket.tracker_linked",
                            "ticket.tracker_unlinked",
                            "ticket.conversation_linked",
                            "ticket.external_linked",
                            "ticket.external_unlinked",
                            "ticket.issue_requested",
                            "ticket_status.created",
                            "ticket_status.updated",
                            "ticket_status.deleted",
                            "ticket_status.reordered",
                            "ticket_type.created",
                            "ticket_type.updated",
                            "ticket_type.archived",
                            "ticket_type.restored",
                            "macro.created",
                            "macro.updated",
                            "macro.deleted",
                            "macro.applied",
                            "sla_policy.created",
                            "sla_policy.updated",
                            "sla_policy.archived",
                            "sla_policy.restored",
                            "settings.ticket_stage_labels_updated",
                            "settings.default_sla_policy_updated",
                            "settings.office_hours_updated",
                            "settings.conversation_routing_updated",
                            "settings.email_auto_ack_updated",
                            "settings.away_reply_updated",
                            "settings.spam_filter_updated",
                            "settings.undo_send_updated",
                            "channel_account.inbound_updated",
                            "channel_account.sending_address_saved",
                            "channel_account.smtp_updated",
                            "channel_account.deleted",
                            "sending_domain.deleted",
                            "sending_domain.checks_restarted",
                            "conversation.status_changed",
                            "conversation.assigned",
                            "conversation.priority_changed",
                            "conversation.attribute_changed",
                            "conversation.tags_changed",
                            "conversation.read",
                            "conversation.updated",
                            "conversation.participant_added",
                            "conversation.participant_removed",
                            "conversation.bulk_updated",
                            "conversation.merged",
                            "conversation.merge_undone",
                            "conversation.deleted",
                            "ticket.merged",
                            "ticket.merge_undone",
                            "message.created",
                            "message.send_scheduled",
                            "message.send_recalled",
                            "message.note_created",
                            "message.updated",
                            "message.note_updated",
                            "message.deleted",
                            "message.note_deleted",
                            "message.reacted",
                            "message.unreacted",
                            "conversation_tag.created",
                            "conversation_tag.updated",
                            "conversation_tag.archived",
                            "conversation_tag.restored",
                            "conversation_tag.deleted",
                            "conversation_attribute.created",
                            "conversation_attribute.updated",
                            "conversation_attribute.archived",
                            "conversation_attribute.restored",
                            "conversation_view.created",
                            "conversation_view.updated",
                            "conversation_view.deleted",
                            "agent.availability_changed",
                            "portal.invite_sent",
                            "portal.invite_resent",
                            "portal.invite_canceled",
                            "portal.invite_link_created",
                            "portal.invite_accepted",
                            "settings.widget_hero_image_updated",
                            "settings.widget_hero_image_removed",
                            "export.requested",
                            "export.finished",
                            "import.requested",
                            "import.finished",
                            "workflow.created",
                            "workflow.updated",
                            "workflow.deleted",
                            "workflow.reordered",
                            "workflow.published",
                            "workflow.paused",
                            "workflow.version_restored",
                            "workflow.run_requested",
                            "settings.workflow_abandoned_auto_close_updated",
                            "settings.workflow_close_spam_updated",
                            "settings.assistant_updated",
                            "assistant_guidance.created",
                            "assistant_guidance.updated",
                            "assistant_guidance.deleted",
                            "assistant_guidance.reordered",
                            "assistant_snippet.created",
                            "assistant_snippet.updated",
                            "assistant_snippet.deleted",
                            "assistant_skill.created",
                            "assistant_skill.updated",
                            "assistant_skill.deleted",
                            "assistant_web_source.added",
                            "assistant_web_source.updated",
                            "assistant_web_source.deleted",
                            "assistant_web_source.fetched",
                            "assistant_document.created",
                            "assistant_document.deleted",
                            "assistant_connector.deleted",
                            "assistant_run.requested",
                            "assistant_run.completed",
                            "assistant_action.proposed",
                            "assistant_action.approved",
                            "assistant_action.rejected",
                            "assistant_action.completed",
                            "assistant.embeddings_requested",
                            "merge_suggestion.dismissed",
                            "merge_suggestion.restored",
                            "knowledge_suggestion.created",
                            "knowledge_suggestion.attached",
                            "knowledge_suggestion.answered",
                            "knowledge_suggestion.drafted",
                            "knowledge_suggestion.updated",
                            "knowledge_suggestion.approved",
                            "knowledge_suggestion.dismissed",
                            "post.merge_check_requested",
                            "post.sentiment_requested",
                            "post.tags_backfill_requested",
                            "conversation.summary_requested",
                            "conversation.summarized",
                            "conversation.post_unlinked",
                            "ticket.summary_requested",
                            "ticket.summarized",
                            "help_center.article_translation_requested",
                            "conversation.created",
                            "conversation.csat_submitted",
                            "integration.platform_credentials_saved",
                            "integration.platform_credentials_deleted",
                            "integration.status_sync_enabled",
                            "integration.status_sync_disabled",
                            "integration.status_mappings_updated",
                            "conversation.email_received",
                            "assistant_connector.created",
                            "assistant_connector.updated",
                            "assistant_connector.refreshed",
                            "assistant_connector.connected",
                            "slack_agent.settings_updated",
                            "github_inbox.settings_updated",
                            "github_inbox.message_retried",
                            "integration.hook_received",
                            "conversation.agent_started",
                            "app.post_linked",
                            "app.post_unlinked",
                            "app.post_created",
                            "app.registered",
                            "app.updated",
                            "branding.auto_started",
                            "branding.offer_accepted",
                            "branding.offer_declined",
                            "branding.auto_undone",
                            "settings.undone",
                            "conversation.test_deleted",
                            "signal.created",
                            "signal.accepted",
                            "signal.dismissed",
                            "signal.restored",
                            "survey.created",
                            "survey.updated",
                            "survey.closed",
                            "survey.responded",
                            "post.scored",
                            "settings.scoring_updated",
                            "post.vote_importance_set",
                            "changelog.reacted",
                            "changelog.unreacted",
                            "board.settings_updated",
                            "survey.deleted",
                            "settings.ai_budget_updated",
                            "settings.ai_provider_keys_updated",
                            "assistant.resolution_feedback_recorded",
                            "help_center.article_freshness_updated",
                            "help_center.article_reviewed",
                            "help_center.article_stale_flagged",
                            "help_center.search_synonym_created",
                            "help_center.search_synonym_deleted",
                            "export_schedule.updated",
                            "export_schedule.deleted",
                            "settings.preset_applied",
                            "settings.setup_state_updated",
                            "privacy.customer_erased",
                            "privacy.access_requested",
                            "privacy.access_completed",
                            "privacy.retention_updated",
                            "message.redacted",
                            "assistant_decline_topic.created",
                            "assistant_decline_topic.updated",
                            "assistant_decline_topic.deleted",
                            "assistant_eval.recorded",
                            "assistant_draft.created",
                            "assistant_draft.sent",
                            "assistant_draft.dismissed",
                            "conversation.handed_off",
                            "release.verified",
                            "release.shipped",
                            "ticket.post_linked"
                          ],
                          "description": "The change event recorded for the approved action",
                          "example": "conversation.status_changed"
                        },
                        "entityType": {
                          "type": "string",
                          "enum": [
                            "conversation",
                            "conversation_message"
                          ],
                          "description": "The kind of record that changed",
                          "example": "conversation"
                        },
                        "entityId": {
                          "type": "string",
                          "description": "The changed record's ID",
                          "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                        },
                        "payload": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "Payload key",
                                "example": "status"
                              },
                              "value": {
                                "type": "string",
                                "description": "Payload value, as a string",
                                "example": "closed"
                              }
                            },
                            "required": [
                              "key",
                              "value"
                            ]
                          },
                          "description": "The change event's payload, as key/value pairs"
                        }
                      },
                      "required": [
                        "type",
                        "entityType",
                        "entityId",
                        "payload"
                      ],
                      "description": "The change that a built-in tool made. Null for a connector action, a rejection, or a tool that found nothing to change."
                    }
                  },
                  "required": [
                    "action",
                    "change"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No proposed action with this ID in the workspace, or its conversation no longer exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The action was already decided or expired, the approval token is missing, invalid or used, or the tool can no longer run (unknown tool, invalid arguments, or a connector that no longer offers it)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/merge-suggestions": {
      "get": {
        "operationId": "getQuillsMergeSuggestionsForPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the pending merge suggestions of a post",
        "description": "Lists pending merge suggestions that have the post as source or target, highest hybridScore first, up to 20. Only pairs whose two posts are visible to you. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The feedback post's ID (TypeID or UUID)",
              "example": "post_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The feedback post's ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Pending suggestions, strongest first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The merge suggestion's ID",
                            "example": "post_merge_sug_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "dismissed",
                              "expired"
                            ],
                            "description": "pending: awaiting a decision. accepted: the posts were merged. dismissed: a teammate rejected the pair. expired: no longer actionable.",
                            "example": "pending"
                          },
                          "source": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The post's ID",
                                "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The post's title",
                                "example": "Export boards to CSV"
                              },
                              "voteCount": {
                                "type": "number",
                                "description": "The post's vote count",
                                "example": 12
                              },
                              "boardName": {
                                "type": "string",
                                "description": "Name of the board the post is on",
                                "example": "Feature requests"
                              },
                              "statusName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Name of the post's status. Null when it has none.",
                                "example": "Under review"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "voteCount",
                              "boardName",
                              "statusName"
                            ],
                            "description": "The post that accepting merges away (the duplicate). The worker picks the post with fewer votes."
                          },
                          "target": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The post's ID",
                                "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The post's title",
                                "example": "Export boards to CSV"
                              },
                              "voteCount": {
                                "type": "number",
                                "description": "The post's vote count",
                                "example": 12
                              },
                              "boardName": {
                                "type": "string",
                                "description": "Name of the board the post is on",
                                "example": "Feature requests"
                              },
                              "statusName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Name of the post's status. Null when it has none.",
                                "example": "Under review"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "voteCount",
                              "boardName",
                              "statusName"
                            ],
                            "description": "The post that accepting keeps (the canonical post)"
                          },
                          "hybridScore": {
                            "type": "number",
                            "description": "Similarity of the two posts; higher is more similar. For pairs the worker found, the cosine similarity of their embeddings.",
                            "example": 0.91
                          },
                          "llmConfidence": {
                            "type": "number",
                            "description": "The model's confidence, from 0 to 1, that the posts are duplicates. The worker suggests a pair only at 0.7 or more.",
                            "example": 0.86
                          },
                          "llmReasoning": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The model's explanation of the verdict. Null when none was stored.",
                            "example": "Both posts ask for a CSV export of board data."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the suggestion was created",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "resolvedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When a teammate accepted or dismissed the suggestion. Null while pending or after a restore.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "source",
                          "target",
                          "hybridScore",
                          "llmConfidence",
                          "llmReasoning",
                          "createdAt",
                          "resolvedAt"
                        ]
                      },
                      "description": "Pending suggestions that include the post, highest hybridScore first, at most 20"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post with this ID that you can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/merge-suggestions": {
      "get": {
        "operationId": "listQuillsMergeSuggestions",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the pending or dismissed merge suggestions",
        "description": "Lists merge suggestions in one status, only those whose two posts are visible to you. Pending ones come highest hybridScore first, dismissed ones most recently dismissed first. Paginated with offset and limit. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "dismissed"
              ],
              "default": "pending",
              "description": "Which suggestions to list. Default: pending.",
              "example": "pending"
            },
            "required": false,
            "description": "Which suggestions to list. Default: pending.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of suggestions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The merge suggestion's ID",
                            "example": "post_merge_sug_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "dismissed",
                              "expired"
                            ],
                            "description": "pending: awaiting a decision. accepted: the posts were merged. dismissed: a teammate rejected the pair. expired: no longer actionable.",
                            "example": "pending"
                          },
                          "source": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The post's ID",
                                "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The post's title",
                                "example": "Export boards to CSV"
                              },
                              "voteCount": {
                                "type": "number",
                                "description": "The post's vote count",
                                "example": 12
                              },
                              "boardName": {
                                "type": "string",
                                "description": "Name of the board the post is on",
                                "example": "Feature requests"
                              },
                              "statusName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Name of the post's status. Null when it has none.",
                                "example": "Under review"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "voteCount",
                              "boardName",
                              "statusName"
                            ],
                            "description": "The post that accepting merges away (the duplicate). The worker picks the post with fewer votes."
                          },
                          "target": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The post's ID",
                                "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The post's title",
                                "example": "Export boards to CSV"
                              },
                              "voteCount": {
                                "type": "number",
                                "description": "The post's vote count",
                                "example": 12
                              },
                              "boardName": {
                                "type": "string",
                                "description": "Name of the board the post is on",
                                "example": "Feature requests"
                              },
                              "statusName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "Name of the post's status. Null when it has none.",
                                "example": "Under review"
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "voteCount",
                              "boardName",
                              "statusName"
                            ],
                            "description": "The post that accepting keeps (the canonical post)"
                          },
                          "hybridScore": {
                            "type": "number",
                            "description": "Similarity of the two posts; higher is more similar. For pairs the worker found, the cosine similarity of their embeddings.",
                            "example": 0.91
                          },
                          "llmConfidence": {
                            "type": "number",
                            "description": "The model's confidence, from 0 to 1, that the posts are duplicates. The worker suggests a pair only at 0.7 or more.",
                            "example": 0.86
                          },
                          "llmReasoning": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The model's explanation of the verdict. Null when none was stored.",
                            "example": "Both posts ask for a CSV export of board data."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the suggestion was created",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "resolvedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When a teammate accepted or dismissed the suggestion. Null while pending or after a restore.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "source",
                          "target",
                          "hybridScore",
                          "llmConfidence",
                          "llmReasoning",
                          "createdAt",
                          "resolvedAt"
                        ]
                      },
                      "description": "One page of suggestions in the requested status"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The offset of the next page. Null on the last page.",
                      "example": 50
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/merge-suggestions/summary": {
      "get": {
        "operationId": "fetchQuillsMergeSuggestionSummary",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Count the pending merge suggestions",
        "description": "Counts pending merge suggestions whose two posts are visible to you. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The pending count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "number",
                      "description": "Number of pending suggestions",
                      "example": 3
                    }
                  },
                  "required": [
                    "count"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/merge-suggestions/counts": {
      "get": {
        "operationId": "fetchQuillsMergeSuggestionCountsForPosts",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Count the pending merge suggestions of several posts",
        "description": "Counts pending merge suggestions per post, with the post as source or target and only pairs whose two posts are visible to you. `postIds` is a comma-separated list of up to 100 post IDs; duplicates are counted once. Posts you cannot see count 0. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 10000,
              "description": "Comma-separated post IDs (TypeID or UUID)",
              "example": "post_01m8rxfrbhfzr9r837k90wcggm,post_01m8rxfrbhfzr9r83a29m5ke14"
            },
            "required": true,
            "description": "Comma-separated post IDs (TypeID or UUID)",
            "name": "postIds",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One count per requested post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "postId": {
                            "type": "string",
                            "description": "A requested post's ID",
                            "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "count": {
                            "type": "number",
                            "description": "Pending suggestions that include the post",
                            "example": 1
                          }
                        },
                        "required": [
                          "postId",
                          "count"
                        ]
                      },
                      "description": "One entry per distinct requested post"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/suggestions/{suggestionId}/accept": {
      "post": {
        "operationId": "acceptQuillsSuggestion",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Accept a merge suggestion",
        "description": "Merges the source post into the target post (or the reverse with `swapDirection`), as the post merge route does, marks the suggestion accepted and records a `post.merged` event. Both posts must be visible to you. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The merge suggestion's ID (TypeID or UUID)",
              "example": "post_merge_sug_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The merge suggestion's ID (TypeID or UUID)",
            "name": "suggestionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "swapDirection": {
                    "type": "boolean",
                    "description": "false: merge the source into the target. true: merge the target into the source.",
                    "example": false
                  }
                },
                "required": [
                  "swapDirection"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The merge that the suggestion made",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The accepted suggestion's ID",
                      "example": "post_merge_sug_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "duplicatePostId": {
                      "type": "string",
                      "description": "The post that was merged away",
                      "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "canonicalPostId": {
                      "type": "string",
                      "description": "The post that was kept",
                      "example": "post_01m8rxfrbhfzr9r83a29m5ke14"
                    },
                    "canonicalVoteCount": {
                      "type": "number",
                      "description": "The kept post's vote count after the merge",
                      "example": 54
                    }
                  },
                  "required": [
                    "id",
                    "duplicatePostId",
                    "canonicalPostId",
                    "canonicalVoteCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No suggestion with this ID whose two posts you can see, or a post was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The suggestion is not pending, or one of the posts is already merged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/suggestions/{suggestionId}/dismiss": {
      "post": {
        "operationId": "dismissQuillsSuggestion",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Dismiss a merge suggestion",
        "description": "Dismisses a pending merge suggestion. Both posts must be visible to you. Records a `merge_suggestion.dismissed` event. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The merge suggestion's ID (TypeID or UUID)",
              "example": "post_merge_sug_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The merge suggestion's ID (TypeID or UUID)",
            "name": "suggestionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The suggestion's new status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The suggestion's ID",
                      "example": "post_merge_sug_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "dismissed",
                        "expired"
                      ],
                      "description": "pending: awaiting a decision. accepted: the posts were merged. dismissed: a teammate rejected the pair. expired: no longer actionable.",
                      "example": "dismissed"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No suggestion with this ID whose two posts you can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The suggestion is not pending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/suggestions/{suggestionId}/restore": {
      "post": {
        "operationId": "restoreQuillsSuggestion",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Restore a dismissed merge suggestion",
        "description": "Returns a dismissed merge suggestion to pending, only while no other pending suggestion pairs the same posts. Both posts must be visible to you. Records a `merge_suggestion.restored` event. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The merge suggestion's ID (TypeID or UUID)",
              "example": "post_merge_sug_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The merge suggestion's ID (TypeID or UUID)",
            "name": "suggestionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The suggestion's new status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The suggestion's ID",
                      "example": "post_merge_sug_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "accepted",
                        "dismissed",
                        "expired"
                      ],
                      "description": "pending: awaiting a decision. accepted: the posts were merged. dismissed: a teammate rejected the pair. expired: no longer actionable.",
                      "example": "pending"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No suggestion with this ID whose two posts you can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The suggestion is not dismissed, or another pending suggestion pairs the same posts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/merge-check": {
      "post": {
        "operationId": "retryQuillsPostMergeCheck",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Look for duplicates of a post again",
        "description": "Requests a new duplicate check of a post. Records a `post.merge_check_requested` event; a worker then embeds the post when needed, asks the AI model about the three most similar posts and stores a pending suggestion for each likely duplicate. A pair that already has a suggestion, in any status, is not suggested again. AI usage is logged. Requires the `update` permission and a post that you can see.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The feedback post's ID (TypeID or UUID)",
              "example": "post_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The feedback post's ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The request was recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "The post's ID",
                      "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "requested": {
                      "type": "boolean",
                      "description": "Always true: the check was requested",
                      "example": true
                    }
                  },
                  "required": [
                    "postId",
                    "requested"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post with this ID that you can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider, or the provider has no embedding model",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/similar": {
      "get": {
        "operationId": "listQuillsSimilarPosts",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the posts most similar to a post",
        "description": "Lists the posts closest to a post by cosine similarity of stored embeddings, among posts visible to you; merged posts are left out. Calls no AI provider. `embedded` is false when the post has no embedding yet; request an embedding backfill to add it. Requires the `read` permission; a board linked to projects is visible only when you can open one of its projects.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The feedback post's ID (TypeID or UUID)",
              "example": "post_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The feedback post's ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 5,
              "description": "Maximum number of similar posts to return. Default: 5.",
              "example": 5
            },
            "required": false,
            "description": "Maximum number of similar posts to return. Default: 5.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Similar posts, most similar first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "embedded": {
                      "type": "boolean",
                      "description": "Whether the post has an embedding. False: items is empty.",
                      "example": true
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The similar post's ID",
                            "example": "post_01m8rxfrbhfzr9r83a29m5ke14"
                          },
                          "title": {
                            "type": "string",
                            "description": "The similar post's title",
                            "example": "Export boards to CSV"
                          },
                          "boardName": {
                            "type": "string",
                            "description": "Name of the board the post is on",
                            "example": "Feature requests"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "The post's vote count",
                            "example": 42
                          },
                          "score": {
                            "type": "number",
                            "description": "Cosine similarity to the given post, from -1 to 1; higher is more similar",
                            "example": 0.87
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "boardName",
                          "voteCount",
                          "score"
                        ]
                      },
                      "description": "The most similar visible posts, most similar first. Empty when embedded is false."
                    }
                  },
                  "required": [
                    "embedded",
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post with this ID that you can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/sentiment": {
      "get": {
        "operationId": "getQuillsPostSentiment",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get a post's sentiment",
        "description": "Returns the stored AI sentiment of a post. The fields are null until a worker has analyzed the post; request an analysis first. Requires the `read` permission and a post that you can see.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The feedback post's ID (TypeID or UUID)",
              "example": "post_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The feedback post's ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The stored sentiment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "The post's ID",
                      "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "sentiment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "positive",
                        "neutral",
                        "negative",
                        null
                      ],
                      "description": "The classified sentiment. Null until analyzed.",
                      "example": "negative"
                    },
                    "confidence": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The model's confidence in the sentiment, from 0 to 1. Null until analyzed.",
                      "example": 0.92
                    },
                    "processedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the sentiment was last analyzed. Null until analyzed.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "postId",
                    "sentiment",
                    "confidence",
                    "processedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post with this ID that you can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "requestQuillsPostSentiment",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Analyse a post's sentiment",
        "description": "Requests an AI sentiment analysis of a post. Records a `post.sentiment_requested` event; a worker then classifies the post with the AI provider after commit, logs the AI usage and stores or replaces the result. Read it with the get route. Requires the `update` permission and a post that you can see.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The feedback post's ID (TypeID or UUID)",
              "example": "post_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The feedback post's ID (TypeID or UUID)",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The request was recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requested": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true: the request was recorded for a worker",
                      "example": true
                    }
                  },
                  "required": [
                    "requested"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post with this ID that you can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/ai-tags/backfill": {
      "post": {
        "operationId": "requestQuillsPostTagBackfill",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Tag untagged posts with AI",
        "description": "Requests AI tagging of untagged posts. Records a `post.tags_backfill_requested` event; a worker then asks the model to pick existing tags for up to `limit` untagged posts (on one board, or on any board without project links) and records `post.tags_changed` for each. The worker runs only while the requester still holds the `update` permission. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardId": {
                    "type": "string",
                    "description": "Only tag posts on this board (TypeID or UUID). Omit to tag posts on boards without project links.",
                    "example": "board_01m8rxfrbhfzr9r83a29m5ke14"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30,
                    "description": "Maximum number of untagged posts to tag",
                    "example": 20
                  }
                },
                "required": [
                  "limit"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request was recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requested": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true: the request was recorded for a worker",
                      "example": true
                    }
                  },
                  "required": [
                    "requested"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No board with this ID that you can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/embeddings/backfill": {
      "post": {
        "operationId": "requestQuillsEmbeddingBackfill",
        "tags": [
          "AI assistant"
        ],
        "summary": "Embed the posts, help-center articles, snippets and documents that have no embedding",
        "description": "Requests embeddings for content that has none. Records an `assistant.embeddings_requested` event; a worker then embeds up to 32 each of posts, help-center articles, assistant snippets and assistant documents per request, and logs the AI usage. Send more requests for more rows. Similar posts, merge checks and semantic search use the embeddings. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The request was recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requested": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true: the request was recorded for a worker",
                      "example": true
                    }
                  },
                  "required": [
                    "requested"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider, or the provider has no embedding model",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/summary": {
      "post": {
        "operationId": "requestQuillsConversationSummary",
        "tags": [
          "Conversations"
        ],
        "summary": "Summarize a conversation",
        "description": "Requests an AI summary of a conversation. Records a `conversation.summary_requested` event; a worker then writes the summary with the AI provider after commit (the conversation read returns it) and records `conversation.summarized`. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The conversation's ID (TypeID or UUID)",
              "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
            },
            "required": true,
            "description": "The conversation's ID (TypeID or UUID)",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The request was recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requested": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true: the request was recorded for a worker",
                      "example": true
                    }
                  },
                  "required": [
                    "requested"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No conversation with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/summary": {
      "post": {
        "operationId": "requestQuillsTicketSummary",
        "tags": [
          "Tickets"
        ],
        "summary": "Summarize a ticket",
        "description": "Requests an AI summary of a ticket. Records a `ticket.summary_requested` event; a worker then writes the summary with the AI provider after commit and records `ticket.summarized`. Read it with the ticket summary route. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The ticket's ID (TypeID or UUID)",
              "example": "ticket_01m8rxfrbhfzr9r83t8d2n37cb"
            },
            "required": true,
            "description": "The ticket's ID (TypeID or UUID)",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The request was recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requested": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true: the request was recorded for a worker",
                      "example": true
                    }
                  },
                  "required": [
                    "requested"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No live ticket with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "getQuillsTicketSummary",
        "tags": [
          "Tickets"
        ],
        "summary": "Get a ticket's AI summary",
        "description": "Returns the ticket's stored AI summary. The fields are null until a summary was written; request one first. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The ticket's ID (TypeID or UUID)",
              "example": "ticket_01m8rxfrbhfzr9r83t8d2n37cb"
            },
            "required": true,
            "description": "The ticket's ID (TypeID or UUID)",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The stored summary, or null",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ticketId": {
                      "type": "string",
                      "description": "The ticket's ID",
                      "example": "ticket_01m8rxfrbhfzr9r83t8d2n37cb"
                    },
                    "summary": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The AI summary. Null when none was written yet.",
                      "example": "The customer cannot export invoices; the team confirmed a bug and promised a fix this week."
                    },
                    "updatedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the summary was last written. Null when none exists.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "ticketId",
                    "summary",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No live ticket with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/messages/{messageId}/translate": {
      "post": {
        "operationId": "translateQuillsConversationMessages",
        "tags": [
          "Conversations"
        ],
        "summary": "Translate a conversation message",
        "description": "Translates one message with AI. Returns a pending run; a worker stores the translation as its `text`. Poll the run with the assistant run route. Nothing is stored on the message. Records an `assistant_run.requested` event. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The conversation's ID (TypeID or UUID)",
              "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
            },
            "required": true,
            "description": "The conversation's ID (TypeID or UUID)",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The message's ID (TypeID or UUID), in this conversation",
              "example": "conversation_msg_01m8rxfrbhfzr9r84qkepvgcsq"
            },
            "required": true,
            "description": "The message's ID (TypeID or UUID), in this conversation",
            "name": "messageId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 60,
                    "description": "Target language, as a name or code that the model understands",
                    "example": "Spanish"
                  }
                },
                "required": [
                  "language"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The pending run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The run's ID, a UUID. A run is kept for 24 hours; read it again by this ID until it finishes.",
                      "example": "8c1f4b2e-5d7a-4e93-b6c0-2a9f7e1d3b58"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "copilot",
                        "translate_message",
                        "attribute_preview",
                        "ticket_fields",
                        "kb_ask",
                        "reply_suggestion"
                      ],
                      "description": "What the run does. copilot: a teammate's copilot question. translate_message: a message translation. attribute_preview: an attribute detection preview. ticket_fields: ticket field suggestions. kb_ask: a help center question from the widget. reply_suggestion: a draft reply to the customer.",
                      "example": "reply_suggestion"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "succeeded",
                        "failed"
                      ],
                      "description": "pending: a worker has not answered yet. succeeded: output is set. failed: error is set; a run still pending after 30 minutes reads as failed.",
                      "example": "pending"
                    },
                    "output": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The answer, translation or draft reply text. Null for runs that return values instead.",
                          "example": "You can request a refund within 30 days from Billing > Invoices."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "article",
                                  "snippet",
                                  "document",
                                  "webpage",
                                  "post"
                                ],
                                "description": "The source's kind: a help center article, an assistant snippet, an assistant document, a web source page or a feedback post",
                                "example": "article"
                              },
                              "id": {
                                "type": "string",
                                "description": "The source's ID",
                                "example": "article_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The source's title",
                                "example": "How refunds work"
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title"
                            ]
                          },
                          "description": "The knowledge sources that the answer used. Empty when none."
                        },
                        "proposedActionIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Pending actions that a copilot run proposed for a teammate's approval. Empty for other kinds.",
                          "example": [
                            "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "The attribute or ticket field key that the value is for",
                                "example": "plan"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The suggested value. Null: the AI found no value.",
                                "example": "enterprise"
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The AI's short reason for the value. Null when none was given.",
                                "example": "The customer mentions their enterprise contract."
                              }
                            },
                            "required": [
                              "key",
                              "value",
                              "reason"
                            ]
                          },
                          "description": "Detected attribute values (attribute_preview) or suggested ticket field values (ticket_fields). Empty for other kinds."
                        }
                      },
                      "required": [
                        "text",
                        "citations",
                        "proposedActionIds",
                        "values"
                      ],
                      "description": "The run's result. Null until the run succeeds."
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the run failed. Null unless status is failed.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "When the run was created, as an ISO 8601 timestamp",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "finishedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the worker finished the run, as an ISO 8601 timestamp. Null while pending.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "output",
                    "error",
                    "createdAt",
                    "finishedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No conversation with this ID, or no live message with this ID in it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/reply-suggestion": {
      "post": {
        "operationId": "suggestQuillsConversationReply",
        "tags": [
          "Conversations"
        ],
        "summary": "Draft the next reply to the customer with AI",
        "description": "Drafts the next reply to the customer with AI. Returns a pending run; a worker stores a draft reply as its `text`, with the sources it used as `citations`. Poll the run with the assistant run route. Nothing is sent: a teammate edits and sends it. Private notes are not used. Records an `assistant_run.requested` event. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The conversation's ID (TypeID or UUID)",
              "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
            },
            "required": true,
            "description": "The conversation's ID (TypeID or UUID)",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The pending run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The run's ID, a UUID. A run is kept for 24 hours; read it again by this ID until it finishes.",
                      "example": "8c1f4b2e-5d7a-4e93-b6c0-2a9f7e1d3b58"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "copilot",
                        "translate_message",
                        "attribute_preview",
                        "ticket_fields",
                        "kb_ask",
                        "reply_suggestion"
                      ],
                      "description": "What the run does. copilot: a teammate's copilot question. translate_message: a message translation. attribute_preview: an attribute detection preview. ticket_fields: ticket field suggestions. kb_ask: a help center question from the widget. reply_suggestion: a draft reply to the customer.",
                      "example": "reply_suggestion"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "succeeded",
                        "failed"
                      ],
                      "description": "pending: a worker has not answered yet. succeeded: output is set. failed: error is set; a run still pending after 30 minutes reads as failed.",
                      "example": "pending"
                    },
                    "output": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The answer, translation or draft reply text. Null for runs that return values instead.",
                          "example": "You can request a refund within 30 days from Billing > Invoices."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "article",
                                  "snippet",
                                  "document",
                                  "webpage",
                                  "post"
                                ],
                                "description": "The source's kind: a help center article, an assistant snippet, an assistant document, a web source page or a feedback post",
                                "example": "article"
                              },
                              "id": {
                                "type": "string",
                                "description": "The source's ID",
                                "example": "article_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The source's title",
                                "example": "How refunds work"
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title"
                            ]
                          },
                          "description": "The knowledge sources that the answer used. Empty when none."
                        },
                        "proposedActionIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Pending actions that a copilot run proposed for a teammate's approval. Empty for other kinds.",
                          "example": [
                            "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "The attribute or ticket field key that the value is for",
                                "example": "plan"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The suggested value. Null: the AI found no value.",
                                "example": "enterprise"
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The AI's short reason for the value. Null when none was given.",
                                "example": "The customer mentions their enterprise contract."
                              }
                            },
                            "required": [
                              "key",
                              "value",
                              "reason"
                            ]
                          },
                          "description": "Detected attribute values (attribute_preview) or suggested ticket field values (ticket_fields). Empty for other kinds."
                        }
                      },
                      "required": [
                        "text",
                        "citations",
                        "proposedActionIds",
                        "values"
                      ],
                      "description": "The run's result. Null until the run succeeds."
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the run failed. Null unless status is failed.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "When the run was created, as an ISO 8601 timestamp",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "finishedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the worker finished the run, as an ISO 8601 timestamp. Null while pending.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "output",
                    "error",
                    "createdAt",
                    "finishedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No conversation with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-attributes/description-draft": {
      "post": {
        "operationId": "draftQuillsAttributeDescriptions",
        "tags": [
          "Conversations"
        ],
        "summary": "Draft a conversation attribute description with AI",
        "description": "Drafts, synchronously, a one- or two-sentence description that tells AI detection what an attribute means. Uses only the request text; nothing is saved except the AI usage log row. A provider failure returns 502. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "The attribute's label",
                    "example": "Plan"
                  },
                  "fieldType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40,
                    "description": "The attribute's field type, for example text, number, select, multi_select, checkbox or date",
                    "example": "select"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "maxItems": 50,
                    "default": [],
                    "description": "The attribute's allowed values, for select types. Default: none.",
                    "example": [
                      "free",
                      "pro",
                      "enterprise"
                    ]
                  }
                },
                "required": [
                  "label",
                  "fieldType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The drafted description",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "description": "The drafted description",
                      "example": "The customer's subscription plan, as named in the conversation."
                    }
                  },
                  "required": [
                    "text"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-attributes/{attributeId}/detection-preview": {
      "post": {
        "operationId": "previewQuillsAttributeDetection",
        "tags": [
          "Conversations"
        ],
        "summary": "Preview AI detection of an attribute on a conversation",
        "description": "Previews AI detection of an attribute on one conversation. Returns a pending run; a worker stores the detected value in `values`. Poll the run with the assistant run route. Nothing is written to the conversation. Records an `assistant_run.requested` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The conversation attribute's ID (TypeID or UUID)",
              "example": "conv_attr_01m8rxfrbhfzr9r84wtdjjzmgm"
            },
            "required": true,
            "description": "The conversation attribute's ID (TypeID or UUID)",
            "name": "attributeId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "conversationId": {
                    "type": "string",
                    "description": "The conversation to run detection on (TypeID or UUID)",
                    "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                  }
                },
                "required": [
                  "conversationId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The pending run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The run's ID, a UUID. A run is kept for 24 hours; read it again by this ID until it finishes.",
                      "example": "8c1f4b2e-5d7a-4e93-b6c0-2a9f7e1d3b58"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "copilot",
                        "translate_message",
                        "attribute_preview",
                        "ticket_fields",
                        "kb_ask",
                        "reply_suggestion"
                      ],
                      "description": "What the run does. copilot: a teammate's copilot question. translate_message: a message translation. attribute_preview: an attribute detection preview. ticket_fields: ticket field suggestions. kb_ask: a help center question from the widget. reply_suggestion: a draft reply to the customer.",
                      "example": "reply_suggestion"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "succeeded",
                        "failed"
                      ],
                      "description": "pending: a worker has not answered yet. succeeded: output is set. failed: error is set; a run still pending after 30 minutes reads as failed.",
                      "example": "pending"
                    },
                    "output": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The answer, translation or draft reply text. Null for runs that return values instead.",
                          "example": "You can request a refund within 30 days from Billing > Invoices."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "article",
                                  "snippet",
                                  "document",
                                  "webpage",
                                  "post"
                                ],
                                "description": "The source's kind: a help center article, an assistant snippet, an assistant document, a web source page or a feedback post",
                                "example": "article"
                              },
                              "id": {
                                "type": "string",
                                "description": "The source's ID",
                                "example": "article_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The source's title",
                                "example": "How refunds work"
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title"
                            ]
                          },
                          "description": "The knowledge sources that the answer used. Empty when none."
                        },
                        "proposedActionIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Pending actions that a copilot run proposed for a teammate's approval. Empty for other kinds.",
                          "example": [
                            "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "The attribute or ticket field key that the value is for",
                                "example": "plan"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The suggested value. Null: the AI found no value.",
                                "example": "enterprise"
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The AI's short reason for the value. Null when none was given.",
                                "example": "The customer mentions their enterprise contract."
                              }
                            },
                            "required": [
                              "key",
                              "value",
                              "reason"
                            ]
                          },
                          "description": "Detected attribute values (attribute_preview) or suggested ticket field values (ticket_fields). Empty for other kinds."
                        }
                      },
                      "required": [
                        "text",
                        "citations",
                        "proposedActionIds",
                        "values"
                      ],
                      "description": "The run's result. Null until the run succeeds."
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the run failed. Null unless status is failed.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "When the run was created, as an ISO 8601 timestamp",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "finishedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the worker finished the run, as an ISO 8601 timestamp. Null while pending.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "output",
                    "error",
                    "createdAt",
                    "finishedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No active (unarchived) attribute with this ID, or no conversation with this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tickets/{ticketId}/field-suggestions": {
      "post": {
        "operationId": "suggestQuillsTicketFieldValues",
        "tags": [
          "Tickets"
        ],
        "summary": "Suggest values for a ticket's fields with AI",
        "description": "Suggests values for a ticket's type fields with AI. Returns a pending run; a worker stores one suggestion per field in `values`. Poll the run with the assistant run route. Nothing is written to the ticket. Records an `assistant_run.requested` event. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The ticket's ID (TypeID or UUID)",
              "example": "ticket_01m8rxfrbhfzr9r83t8d2n37cb"
            },
            "required": true,
            "description": "The ticket's ID (TypeID or UUID)",
            "name": "ticketId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The pending run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The run's ID, a UUID. A run is kept for 24 hours; read it again by this ID until it finishes.",
                      "example": "8c1f4b2e-5d7a-4e93-b6c0-2a9f7e1d3b58"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "copilot",
                        "translate_message",
                        "attribute_preview",
                        "ticket_fields",
                        "kb_ask",
                        "reply_suggestion"
                      ],
                      "description": "What the run does. copilot: a teammate's copilot question. translate_message: a message translation. attribute_preview: an attribute detection preview. ticket_fields: ticket field suggestions. kb_ask: a help center question from the widget. reply_suggestion: a draft reply to the customer.",
                      "example": "reply_suggestion"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "succeeded",
                        "failed"
                      ],
                      "description": "pending: a worker has not answered yet. succeeded: output is set. failed: error is set; a run still pending after 30 minutes reads as failed.",
                      "example": "pending"
                    },
                    "output": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The answer, translation or draft reply text. Null for runs that return values instead.",
                          "example": "You can request a refund within 30 days from Billing > Invoices."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "article",
                                  "snippet",
                                  "document",
                                  "webpage",
                                  "post"
                                ],
                                "description": "The source's kind: a help center article, an assistant snippet, an assistant document, a web source page or a feedback post",
                                "example": "article"
                              },
                              "id": {
                                "type": "string",
                                "description": "The source's ID",
                                "example": "article_01m8rxfrbhfzr9r837k90wcggm"
                              },
                              "title": {
                                "type": "string",
                                "description": "The source's title",
                                "example": "How refunds work"
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title"
                            ]
                          },
                          "description": "The knowledge sources that the answer used. Empty when none."
                        },
                        "proposedActionIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Pending actions that a copilot run proposed for a teammate's approval. Empty for other kinds.",
                          "example": [
                            "assistant_action_01m8rxfrbhfzr9r837k90wcggm"
                          ]
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "The attribute or ticket field key that the value is for",
                                "example": "plan"
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "The suggested value. Null: the AI found no value.",
                                "example": "enterprise"
                              },
                              "reason": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The AI's short reason for the value. Null when none was given.",
                                "example": "The customer mentions their enterprise contract."
                              }
                            },
                            "required": [
                              "key",
                              "value",
                              "reason"
                            ]
                          },
                          "description": "Detected attribute values (attribute_preview) or suggested ticket field values (ticket_fields). Empty for other kinds."
                        }
                      },
                      "required": [
                        "text",
                        "citations",
                        "proposedActionIds",
                        "values"
                      ],
                      "description": "The run's result. Null until the run succeeds."
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the run failed. Null unless status is failed.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "description": "When the run was created, as an ISO 8601 timestamp",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "finishedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When the worker finished the run, as an ISO 8601 timestamp. Null while pending.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "status",
                    "output",
                    "error",
                    "createdAt",
                    "finishedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No live ticket with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The instance has no AI provider configured, or the ticket's type has no fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/articles/{articleId}/auto-translate": {
      "post": {
        "operationId": "requestQuillsArticleTranslation",
        "tags": [
          "Help center"
        ],
        "summary": "Translate a help-center article with AI",
        "description": "Requests an AI translation of a help-center article into one locale. After commit, a worker translates the title, description and content (Markdown, links and code kept; the content is cut at 30,000 characters) and saves the result as a draft translation. It replaces an existing draft translation in that locale but never a published one. The locale must be one of the help center's additional locales, not its default. Records a `help_center.article_translation_requested` event; the AI usage is logged by the worker. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the help-center article, as a TypeID or UUID",
              "example": "article_01m8rxzh33enbtnx9j9vmdpc39"
            },
            "required": true,
            "description": "ID of the help-center article, as a TypeID or UUID",
            "name": "articleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locale": {
                    "type": "string",
                    "enum": [
                      "en",
                      "de",
                      "fr",
                      "es",
                      "ar",
                      "ru",
                      "pt-br",
                      "zh-cn",
                      "zh-tw",
                      "nl",
                      "pl",
                      "th",
                      "uk"
                    ],
                    "description": "Target locale code. Must be one of the help center's additional locales.",
                    "example": "fr"
                  }
                },
                "required": [
                  "locale"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request was recorded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requested": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true: the translation request was recorded",
                      "example": true
                    }
                  },
                  "required": [
                    "requested"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No article with this ID exists in the workspace, or it is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No AI provider is configured, or the locale is the help center's default or not one of its additional locales",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/help-center/semantic-search": {
      "post": {
        "operationId": "searchQuillsHelpCenterSemantic",
        "tags": [
          "Help center"
        ],
        "summary": "Search help-center articles by meaning",
        "description": "Embeds the query and ranks the workspace's help-center articles that have an embedding by cosine similarity, most similar first. Drafts are included and marked with `published: false`; deleted articles are left out. Logs the embedding's AI usage for the `help_center_search` step and changes nothing else. Requires the `read` permission. Answers 409 when no embedding model is configured and 502 when the provider call fails.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "What to search for, in natural language",
                    "example": "How do I reset my password?"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20,
                    "default": 10,
                    "description": "Maximum number of articles to return. Defaults to 10.",
                    "example": 5
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Articles, most similar first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the article",
                            "example": "article_01m8rxzh33enbtnx9j9vmdpc39"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title of the article",
                            "example": "Reset your password"
                          },
                          "published": {
                            "type": "boolean",
                            "description": "Whether the article is published; false for a draft",
                            "example": true
                          },
                          "score": {
                            "type": "number",
                            "description": "Cosine similarity to the query, up to 1 (identical meaning)",
                            "example": 0.83
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "published",
                          "score"
                        ]
                      },
                      "description": "Matching articles, most similar first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "No AI provider or no embedding model is configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/analytics/performance": {
      "get": {
        "operationId": "getQuillsQuinnPerformance",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get the customer agent's involvement and resolution counts",
        "description": "Counts the customer agent's involvements (one per conversation it engaged) created in the date range, by status, with confirmed resolutions separated from resolutions assumed after customer silence, and the involvements that the customer reopened after a resolution. Also counts the assistant tool calls that succeeded in the range. Aggregates only; no conversation content. Requires the `read` permission. Answers 400 when the range is shorter than 1 day, longer than 366 days, or `from` is after `to`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "description": "First day of the report range, as an ISO 8601 date (UTC). The range covers 1 to 366 days.",
              "example": "2026-11-01"
            },
            "required": true,
            "description": "First day of the report range, as an ISO 8601 date (UTC). The range covers 1 to 366 days.",
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Last day of the report range, inclusive, as an ISO 8601 date (UTC). Must not be before `from`.",
              "example": "2026-11-30"
            },
            "required": true,
            "description": "Last day of the report range, inclusive, as an ISO 8601 date (UTC). Must not be before `from`.",
            "name": "to",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Involvement and resolution counts for the range",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "involvements": {
                      "type": "number",
                      "description": "Number of involvements created in the range",
                      "example": 240
                    },
                    "byStatus": {
                      "type": "object",
                      "properties": {
                        "active": {
                          "type": "number",
                          "description": "Involvements where the customer agent is still answering"
                        },
                        "handed_off": {
                          "type": "number",
                          "description": "Involvements that the customer agent handed to a teammate"
                        },
                        "resolved_confirmed": {
                          "type": "number",
                          "description": "Involvements that the customer explicitly confirmed as resolved"
                        },
                        "resolved_assumed": {
                          "type": "number",
                          "description": "Involvements resolved because the customer went quiet after a real answer"
                        },
                        "abandoned": {
                          "type": "number",
                          "description": "Involvements that ended without a resolution or a hand-off"
                        }
                      },
                      "required": [
                        "active",
                        "handed_off",
                        "resolved_confirmed",
                        "resolved_assumed",
                        "abandoned"
                      ],
                      "description": "Involvements created in the range, counted by their current status. Every status is present, with 0 when none match."
                    },
                    "resolutionRate": {
                      "type": "number",
                      "description": "Confirmed plus assumed resolutions divided by involvements, from 0 to 1. 0 when there are no involvements.",
                      "example": 0.62
                    },
                    "confirmedResolutions": {
                      "type": "number",
                      "description": "Involvements in `resolved_confirmed` status",
                      "example": 96
                    },
                    "assumedResolutions": {
                      "type": "number",
                      "description": "Involvements in `resolved_assumed` status",
                      "example": 53
                    },
                    "reopenedAfterResolution": {
                      "type": "number",
                      "description": "Involvements created in the range where the customer replied again after an assistant resolution",
                      "example": 7
                    },
                    "confirmedResolutionRate": {
                      "type": "number",
                      "description": "Confirmed resolutions divided by involvements, from 0 to 1. 0 when there are no involvements.",
                      "example": 0.4
                    },
                    "assumedResolutionRate": {
                      "type": "number",
                      "description": "Assumed resolutions divided by involvements, from 0 to 1. 0 when there are no involvements.",
                      "example": 0.22
                    },
                    "succeededToolCalls": {
                      "type": "number",
                      "description": "Assistant tool calls created in the range that finished in `succeeded` status",
                      "example": 412
                    }
                  },
                  "required": [
                    "involvements",
                    "byStatus",
                    "resolutionRate",
                    "confirmedResolutions",
                    "assumedResolutions",
                    "reopenedAfterResolution",
                    "confirmedResolutionRate",
                    "assumedResolutionRate",
                    "succeededToolCalls"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/analytics/tools": {
      "get": {
        "operationId": "getQuillsQuinnToolMetrics",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get the assistant's tool calls by tool and status",
        "description": "Counts the assistant tool calls created in the date range, grouped by tool, with succeeded, failed and denied counts and the average latency. Sorted by total calls, most used first, and limited to 100 tools. Requires the `read` permission. Answers 400 when the range is shorter than 1 day, longer than 366 days, or `from` is after `to`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "description": "First day of the report range, as an ISO 8601 date (UTC). The range covers 1 to 366 days.",
              "example": "2026-11-01"
            },
            "required": true,
            "description": "First day of the report range, as an ISO 8601 date (UTC). The range covers 1 to 366 days.",
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Last day of the report range, inclusive, as an ISO 8601 date (UTC). Must not be before `from`.",
              "example": "2026-11-30"
            },
            "required": true,
            "description": "Last day of the report range, inclusive, as an ISO 8601 date (UTC). Must not be before `from`.",
            "name": "to",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One entry per tool, most used first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "toolName": {
                            "type": "string",
                            "description": "Name of the assistant tool",
                            "example": "search_knowledge"
                          },
                          "total": {
                            "type": "number",
                            "description": "All calls of this tool in the range, in any status, including started, denied and skipped duplicate calls",
                            "example": 180
                          },
                          "succeeded": {
                            "type": "number",
                            "description": "Calls that finished successfully",
                            "example": 171
                          },
                          "failed": {
                            "type": "number",
                            "description": "Calls that ran and failed",
                            "example": 4
                          },
                          "denied": {
                            "type": "number",
                            "description": "Calls that were refused and never ran",
                            "example": 5
                          },
                          "averageLatencyMs": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Average call latency in milliseconds, rounded to an integer. Null when no call recorded a latency.",
                            "example": 640
                          }
                        },
                        "required": [
                          "toolName",
                          "total",
                          "succeeded",
                          "failed",
                          "denied",
                          "averageLatencyMs"
                        ]
                      },
                      "description": "One entry per tool called in the range, most calls first, at most 100"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/analytics/copilot": {
      "get": {
        "operationId": "getQuillsCopilotUsageMetrics",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get copilot usage, outcomes and the proposed-action funnel",
        "description": "Reports teammate copilot usage in the date range: AI calls and tokens per copilot step, how often teammates inserted copilot output or rated it, and the proposed assistant actions by current status (counted by proposal time). Requires the `read` permission. Answers 400 when the range is shorter than 1 day, longer than 366 days, or `from` is after `to`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "description": "First day of the report range, as an ISO 8601 date (UTC). The range covers 1 to 366 days.",
              "example": "2026-11-01"
            },
            "required": true,
            "description": "First day of the report range, as an ISO 8601 date (UTC). The range covers 1 to 366 days.",
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date",
              "description": "Last day of the report range, inclusive, as an ISO 8601 date (UTC). Must not be before `from`.",
              "example": "2026-11-30"
            },
            "required": true,
            "description": "Last day of the report range, inclusive, as an ISO 8601 date (UTC). Must not be before `from`.",
            "name": "to",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Copilot usage counts for the range",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "calls": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "step": {
                            "type": "string",
                            "description": "Copilot step: `copilot` (answers), `copilot_transform` (rewrites), `conversation_summary` or `ticket_summary`",
                            "example": "copilot"
                          },
                          "calls": {
                            "type": "number",
                            "description": "AI calls made for this step in the range",
                            "example": 320
                          },
                          "failed": {
                            "type": "number",
                            "description": "Calls that did not finish with success",
                            "example": 3
                          },
                          "totalTokens": {
                            "type": "number",
                            "description": "Input plus output tokens used by these calls",
                            "example": 812400
                          }
                        },
                        "required": [
                          "step",
                          "calls",
                          "failed",
                          "totalTokens"
                        ]
                      },
                      "description": "One entry per copilot step that made at least one AI call in the range"
                    },
                    "events": {
                      "type": "object",
                      "properties": {
                        "answer_inserted": {
                          "type": "number",
                          "description": "Copilot answers that a teammate inserted",
                          "example": 42
                        },
                        "transform_inserted": {
                          "type": "number",
                          "description": "Copilot rewrites that a teammate inserted",
                          "example": 42
                        },
                        "summary_inserted": {
                          "type": "number",
                          "description": "Copilot summaries that a teammate inserted",
                          "example": 42
                        },
                        "feedback": {
                          "type": "number",
                          "description": "Ratings that teammates gave copilot output",
                          "example": 42
                        }
                      },
                      "required": [
                        "answer_inserted",
                        "transform_inserted",
                        "summary_inserted",
                        "feedback"
                      ],
                      "description": "Teammate outcomes in the range, from the copilot event log: `answer_inserted`, `transform_inserted` and `summary_inserted` count copilot output that a teammate inserted; `feedback` counts ratings of copilot output. Every key is present, with 0 when none match."
                    },
                    "actions": {
                      "type": "object",
                      "properties": {
                        "proposed": {
                          "type": "number",
                          "description": "Actions proposed in the range whose status is now `proposed`",
                          "example": 7
                        },
                        "approved": {
                          "type": "number",
                          "description": "Actions proposed in the range whose status is now `approved`",
                          "example": 7
                        },
                        "rejected": {
                          "type": "number",
                          "description": "Actions proposed in the range whose status is now `rejected`",
                          "example": 7
                        },
                        "expired": {
                          "type": "number",
                          "description": "Actions proposed in the range whose status is now `expired`",
                          "example": 7
                        },
                        "executed": {
                          "type": "number",
                          "description": "Actions proposed in the range whose status is now `executed`",
                          "example": 7
                        },
                        "failed": {
                          "type": "number",
                          "description": "Actions proposed in the range whose status is now `failed`",
                          "example": 7
                        }
                      },
                      "required": [
                        "proposed",
                        "approved",
                        "rejected",
                        "expired",
                        "executed",
                        "failed"
                      ],
                      "description": "Assistant actions proposed in the range, by current status: `proposed` (awaiting a decision), `approved`, `rejected`, `expired`, `executed` or `failed`. Every status is present, with 0 when none match."
                    }
                  },
                  "required": [
                    "calls",
                    "events",
                    "actions"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/decline-topics": {
      "get": {
        "operationId": "listQuillsAssistantDeclineTopics",
        "tags": [
          "AI assistant"
        ],
        "summary": "List the customer agent's restricted topics",
        "description": "Lists every restricted (decline) topic of the workspace, enabled or not, sorted by slug. The customer agent checks each customer message against the enabled topics and either answers only with a verbatim cited quote or hands off. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Configured decline topics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the decline topic",
                            "example": "agent_decline_topic_01m8rxzh33enbtnx8a0c6f45yt"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Unique key of the topic in lowercase letters, digits, `_` and `-`. It also matches customer messages, with underscores read as spaces.",
                            "example": "refunds"
                          },
                          "label": {
                            "type": "string",
                            "description": "Display name",
                            "example": "Refunds"
                          },
                          "policy": {
                            "type": "string",
                            "enum": [
                              "quote_only",
                              "always_handoff"
                            ],
                            "description": "How the customer agent treats a matching message: `quote_only` lets it answer only with a verbatim quote from a cited source, and hands off otherwise; `always_handoff` hands the conversation to a teammate. When topics of both policies match, `always_handoff` wins.",
                            "example": "quote_only"
                          },
                          "examples": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Phrases that mark a customer message as this topic, matched as whole words ignoring case and punctuation. The slug, with underscores read as spaces, also matches. Phrases shorter than 3 characters never match.",
                            "example": [
                              "refund",
                              "money back"
                            ]
                          },
                          "enabled": {
                            "type": "boolean",
                            "description": "Whether the customer agent applies the topic",
                            "example": true
                          },
                          "isDefault": {
                            "type": "boolean",
                            "description": "Whether the topic was seeded with the workspace (pricing, refunds, policies and contract terms) rather than created through the API",
                            "example": true
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the topic was created",
                            "example": "2026-11-02T09:30:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the topic was last changed",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "label",
                          "policy",
                          "examples",
                          "enabled",
                          "isDefault",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "The topics, sorted by slug"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsAssistantDeclineTopic",
        "tags": [
          "AI assistant"
        ],
        "summary": "Create a restricted topic for the customer agent",
        "description": "Creates a restricted (decline) topic that the customer agent applies from its next answer. Records an `assistant_decline_topic.created` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 64,
                    "pattern": "^[a-z0-9_-]+$",
                    "description": "Unique key of the topic in lowercase letters, digits, `_` and `-`. It also matches customer messages, with underscores read as spaces. Cannot be changed later.",
                    "example": "data_deletion"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "description": "Display name",
                    "example": "Data deletion"
                  },
                  "policy": {
                    "type": "string",
                    "enum": [
                      "quote_only",
                      "always_handoff"
                    ],
                    "description": "How the customer agent treats a matching message: `quote_only` lets it answer only with a verbatim quote from a cited source, and hands off otherwise; `always_handoff` hands the conversation to a teammate. When topics of both policies match, `always_handoff` wins.",
                    "example": "always_handoff"
                  },
                  "examples": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 120
                    },
                    "maxItems": 25,
                    "default": [],
                    "description": "Phrases that mark a customer message as this topic, matched as whole words ignoring case and punctuation. The slug, with underscores read as spaces, also matches. Phrases shorter than 3 characters never match. Defaults to an empty list.",
                    "example": [
                      "delete my account",
                      "erase my data"
                    ]
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether the customer agent applies the topic. Defaults to true.",
                    "example": true
                  }
                },
                "required": [
                  "slug",
                  "label",
                  "policy"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created decline topic",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the decline topic",
                      "example": "agent_decline_topic_01m8rxzh33enbtnx8a0c6f45yt"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Unique key of the topic in lowercase letters, digits, `_` and `-`. It also matches customer messages, with underscores read as spaces.",
                      "example": "refunds"
                    },
                    "label": {
                      "type": "string",
                      "description": "Display name",
                      "example": "Refunds"
                    },
                    "policy": {
                      "type": "string",
                      "enum": [
                        "quote_only",
                        "always_handoff"
                      ],
                      "description": "How the customer agent treats a matching message: `quote_only` lets it answer only with a verbatim quote from a cited source, and hands off otherwise; `always_handoff` hands the conversation to a teammate. When topics of both policies match, `always_handoff` wins.",
                      "example": "quote_only"
                    },
                    "examples": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Phrases that mark a customer message as this topic, matched as whole words ignoring case and punctuation. The slug, with underscores read as spaces, also matches. Phrases shorter than 3 characters never match.",
                      "example": [
                        "refund",
                        "money back"
                      ]
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the customer agent applies the topic",
                      "example": true
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "Whether the topic was seeded with the workspace (pricing, refunds, policies and contract terms) rather than created through the API",
                      "example": true
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the topic was created",
                      "example": "2026-11-02T09:30:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the topic was last changed",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "label",
                    "policy",
                    "examples",
                    "enabled",
                    "isDefault",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another decline topic in the workspace already uses this slug",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/decline-topics/{topicId}": {
      "patch": {
        "operationId": "updateQuillsAssistantDeclineTopic",
        "tags": [
          "AI assistant"
        ],
        "summary": "Update a restricted topic",
        "description": "Changes the fields that the request sends and keeps the others. Seeded default topics can be changed too. Records an `assistant_decline_topic.updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the decline topic, as a TypeID or UUID",
              "example": "agent_decline_topic_01m8rxzh33enbtnx8a0c6f45yt"
            },
            "required": true,
            "description": "ID of the decline topic, as a TypeID or UUID",
            "name": "topicId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120,
                    "description": "New display name. Omit to keep it.",
                    "example": "Refunds and credits"
                  },
                  "policy": {
                    "type": "string",
                    "enum": [
                      "quote_only",
                      "always_handoff"
                    ],
                    "description": "New policy. How the customer agent treats a matching message: `quote_only` lets it answer only with a verbatim quote from a cited source, and hands off otherwise; `always_handoff` hands the conversation to a teammate. When topics of both policies match, `always_handoff` wins. Omit to keep it.",
                    "example": "quote_only"
                  },
                  "examples": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 2,
                      "maxLength": 120
                    },
                    "maxItems": 25,
                    "description": "New matching phrases, replacing the current list. Omit to keep them.",
                    "example": [
                      "refund",
                      "credit note"
                    ]
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "false stops the customer agent from applying the topic. Omit to keep it.",
                    "example": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated decline topic",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the decline topic",
                      "example": "agent_decline_topic_01m8rxzh33enbtnx8a0c6f45yt"
                    },
                    "slug": {
                      "type": "string",
                      "description": "Unique key of the topic in lowercase letters, digits, `_` and `-`. It also matches customer messages, with underscores read as spaces.",
                      "example": "refunds"
                    },
                    "label": {
                      "type": "string",
                      "description": "Display name",
                      "example": "Refunds"
                    },
                    "policy": {
                      "type": "string",
                      "enum": [
                        "quote_only",
                        "always_handoff"
                      ],
                      "description": "How the customer agent treats a matching message: `quote_only` lets it answer only with a verbatim quote from a cited source, and hands off otherwise; `always_handoff` hands the conversation to a teammate. When topics of both policies match, `always_handoff` wins.",
                      "example": "quote_only"
                    },
                    "examples": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Phrases that mark a customer message as this topic, matched as whole words ignoring case and punctuation. The slug, with underscores read as spaces, also matches. Phrases shorter than 3 characters never match.",
                      "example": [
                        "refund",
                        "money back"
                      ]
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the customer agent applies the topic",
                      "example": true
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "Whether the topic was seeded with the workspace (pricing, refunds, policies and contract terms) rather than created through the API",
                      "example": true
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the topic was created",
                      "example": "2026-11-02T09:30:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the topic was last changed",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "label",
                    "policy",
                    "examples",
                    "enabled",
                    "isDefault",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No decline topic with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsAssistantDeclineTopic",
        "tags": [
          "AI assistant"
        ],
        "summary": "Delete a restricted topic",
        "description": "Permanently deletes a restricted topic, including a seeded default one. Records an `assistant_decline_topic.deleted` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the decline topic, as a TypeID or UUID",
              "example": "agent_decline_topic_01m8rxzh33enbtnx8a0c6f45yt"
            },
            "required": true,
            "description": "ID of the decline topic, as a TypeID or UUID",
            "name": "topicId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted topic ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted topic",
                      "example": "agent_decline_topic_01m8rxzh33enbtnx8a0c6f45yt"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No decline topic with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/eval-runs": {
      "get": {
        "operationId": "listQuillsAssistantEvalRuns",
        "tags": [
          "AI assistant"
        ],
        "summary": "List recent customer agent evaluation runs",
        "description": "Lists the 20 most recent evaluation runs of the customer agent's guardrails, newest first. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Recent evaluation runs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the evaluation run",
                            "example": "ai_eval_run_01m8rxzh33enbtnx8q1szkkjzv"
                          },
                          "channel": {
                            "type": "string",
                            "description": "Channel named when the run started: `all`, `messenger`, `email` or `widget`",
                            "example": "all"
                          },
                          "model": {
                            "type": "string",
                            "description": "What evaluated the cases. Runs started through the API record `deterministic-replay` (fixed checks, no AI call).",
                            "example": "deterministic-replay"
                          },
                          "promptDigest": {
                            "type": "string",
                            "description": "Digest of the restricted-topic configuration that the run checked (slugs, policies, enabled flags and phrases), to tell which configuration it covers",
                            "example": "3f1c9a7e5b2d4c6a8e0f1b3d5c7a9e1f3b5d7c9a1e3f5b7d9c1a3e5f7b9d1c3a"
                          },
                          "totalCases": {
                            "type": "integer",
                            "description": "Number of cases checked",
                            "example": 6
                          },
                          "passedCases": {
                            "type": "integer",
                            "description": "Number of cases that passed",
                            "example": 6
                          },
                          "groundingScore": {
                            "type": "number",
                            "description": "Share of grounding cases that passed, from 0 to 1",
                            "example": 1
                          },
                          "escalationScore": {
                            "type": "number",
                            "description": "Share of escalation cases that passed, from 0 to 1",
                            "example": 1
                          },
                          "declineScore": {
                            "type": "number",
                            "description": "Share of restricted-topic cases that passed, from 0 to 1",
                            "example": 1
                          },
                          "passed": {
                            "type": "boolean",
                            "description": "Whether every case passed. The most recent run must pass before a channel can switch to `auto` mode.",
                            "example": true
                          },
                          "details": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Key of the case",
                                  "example": "grounding_zero_source"
                                },
                                "category": {
                                  "type": "string",
                                  "enum": [
                                    "grounding",
                                    "escalation",
                                    "decline",
                                    "tool_allowlist"
                                  ],
                                  "description": "What the case checks: `grounding` (answers need real sources), `escalation` (hand-off on low confidence or a request for a person), `decline` (restricted topics) or `tool_allowlist`",
                                  "example": "grounding"
                                },
                                "passed": {
                                  "type": "boolean",
                                  "description": "Whether the case passed",
                                  "example": true
                                },
                                "reason": {
                                  "type": "string",
                                  "description": "Why the case failed, when recorded. Absent otherwise."
                                }
                              },
                              "required": [
                                "id",
                                "category",
                                "passed"
                              ]
                            },
                            "description": "Result of each case"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the run was recorded",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "channel",
                          "model",
                          "promptDigest",
                          "totalCases",
                          "passedCases",
                          "groundingScore",
                          "escalationScore",
                          "declineScore",
                          "passed",
                          "details",
                          "createdAt"
                        ]
                      },
                      "description": "The runs, newest first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "runQuillsAssistantEval",
        "tags": [
          "AI assistant"
        ],
        "summary": "Run the customer agent guardrail evaluation suite",
        "description": "Runs fixed grounding, escalation and restricted-topic checks against the workspace's current restricted topics, without calling an AI provider, and records the result. Switching a channel to `auto` mode requires the most recent run to pass. Records an `assistant_eval.recorded` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel": {
                    "type": "string",
                    "enum": [
                      "all",
                      "messenger",
                      "email",
                      "widget"
                    ],
                    "description": "Channel to record with the run. The checks are the same for every channel, and the `auto` mode gate reads the most recent run of any channel.",
                    "example": "all"
                  }
                },
                "required": [
                  "channel"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recorded evaluation run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the evaluation run",
                      "example": "ai_eval_run_01m8rxzh33enbtnx8q1szkkjzv"
                    },
                    "channel": {
                      "type": "string",
                      "description": "Channel named when the run started: `all`, `messenger`, `email` or `widget`",
                      "example": "all"
                    },
                    "model": {
                      "type": "string",
                      "description": "What evaluated the cases. Runs started through the API record `deterministic-replay` (fixed checks, no AI call).",
                      "example": "deterministic-replay"
                    },
                    "promptDigest": {
                      "type": "string",
                      "description": "Digest of the restricted-topic configuration that the run checked (slugs, policies, enabled flags and phrases), to tell which configuration it covers",
                      "example": "3f1c9a7e5b2d4c6a8e0f1b3d5c7a9e1f3b5d7c9a1e3f5b7d9c1a3e5f7b9d1c3a"
                    },
                    "totalCases": {
                      "type": "integer",
                      "description": "Number of cases checked",
                      "example": 6
                    },
                    "passedCases": {
                      "type": "integer",
                      "description": "Number of cases that passed",
                      "example": 6
                    },
                    "groundingScore": {
                      "type": "number",
                      "description": "Share of grounding cases that passed, from 0 to 1",
                      "example": 1
                    },
                    "escalationScore": {
                      "type": "number",
                      "description": "Share of escalation cases that passed, from 0 to 1",
                      "example": 1
                    },
                    "declineScore": {
                      "type": "number",
                      "description": "Share of restricted-topic cases that passed, from 0 to 1",
                      "example": 1
                    },
                    "passed": {
                      "type": "boolean",
                      "description": "Whether every case passed. The most recent run must pass before a channel can switch to `auto` mode.",
                      "example": true
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Key of the case",
                            "example": "grounding_zero_source"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "grounding",
                              "escalation",
                              "decline",
                              "tool_allowlist"
                            ],
                            "description": "What the case checks: `grounding` (answers need real sources), `escalation` (hand-off on low confidence or a request for a person), `decline` (restricted topics) or `tool_allowlist`",
                            "example": "grounding"
                          },
                          "passed": {
                            "type": "boolean",
                            "description": "Whether the case passed",
                            "example": true
                          },
                          "reason": {
                            "type": "string",
                            "description": "Why the case failed, when recorded. Absent otherwise."
                          }
                        },
                        "required": [
                          "id",
                          "category",
                          "passed"
                        ]
                      },
                      "description": "Result of each case"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the run was recorded",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "model",
                    "promptDigest",
                    "totalCases",
                    "passedCases",
                    "groundingScore",
                    "escalationScore",
                    "declineScore",
                    "passed",
                    "details",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/channels": {
      "patch": {
        "operationId": "updateQuillsAssistantChannelMode",
        "tags": [
          "AI assistant"
        ],
        "summary": "Set the customer agent's mode for a channel",
        "description": "Sets whether the customer agent is off, writes drafts for review, or replies on its own in one channel, and the confidence below which it hands off. Switching to `auto` requires the workspace's most recent evaluation run to have passed. Saves the assistant settings with a new revision. Records a `settings.assistant_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel": {
                    "type": "string",
                    "enum": [
                      "messenger",
                      "email",
                      "widget"
                    ],
                    "description": "Channel to configure: `messenger`, `email` or `widget`",
                    "example": "widget"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "off",
                      "draft",
                      "auto"
                    ],
                    "description": "`off` (the customer agent does not answer), `draft` (answers are saved as drafts for a teammate to approve) or `auto` (answers go to the customer)",
                    "example": "draft"
                  },
                  "confidenceThreshold": {
                    "type": "number",
                    "minimum": 0.5,
                    "maximum": 0.99,
                    "description": "Confidence from 0 to 1 below which the customer agent hands off instead of answering. When omitted, 0.75 is saved, replacing any earlier value.",
                    "example": 0.8
                  }
                },
                "required": [
                  "channel",
                  "mode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated channel agent mode",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "channel": {
                      "type": "string",
                      "enum": [
                        "messenger",
                        "email",
                        "widget"
                      ],
                      "description": "The configured channel",
                      "example": "widget"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "draft",
                        "auto"
                      ],
                      "description": "The saved mode",
                      "example": "draft"
                    },
                    "confidenceThreshold": {
                      "type": "number",
                      "description": "The saved confidence threshold, from 0 to 1",
                      "example": 0.8
                    }
                  },
                  "required": [
                    "channel",
                    "mode",
                    "confidenceThreshold"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "`auto` mode was requested, but the workspace has no evaluation run or its most recent run failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/assistant-drafts": {
      "get": {
        "operationId": "listQuillsConversationAssistantDrafts",
        "tags": [
          "Conversations"
        ],
        "summary": "List the customer agent's draft replies for a conversation",
        "description": "Lists the 20 most recent draft replies that the customer agent wrote for a conversation in `draft` mode (or under the AI budget's draft mode), newest first, in any status. Drafts are stored apart from the conversation's messages, so customers never see them. Requires the `read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the conversation, as a TypeID or UUID",
              "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
            },
            "required": true,
            "description": "ID of the conversation, as a TypeID or UUID",
            "name": "conversationId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "AI draft replies awaiting teammate review",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "ID of the draft reply",
                            "example": "assistant_draft_reply_01m8rxzh33enbtnx8xxazk0js0"
                          },
                          "conversationId": {
                            "type": "string",
                            "description": "Conversation that the draft answers",
                            "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                          },
                          "content": {
                            "type": "string",
                            "description": "Reply text. After approval, the text that was sent, including the teammate's edits.",
                            "example": "Full refunds are available within 14 days of purchase."
                          },
                          "citations": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "Kind of source, such as `article`",
                                  "example": "article"
                                },
                                "id": {
                                  "type": "string",
                                  "description": "ID of the source",
                                  "example": "article_01m8rxzh33enbtnx9j9vmdpc39"
                                },
                                "title": {
                                  "type": "string",
                                  "description": "Title of the source",
                                  "example": "Refund policy"
                                },
                                "url": {
                                  "type": "string",
                                  "description": "Link to the source",
                                  "example": "https://help.example.com/articles/12-refund-policy"
                                }
                              },
                              "required": [
                                "type",
                                "id",
                                "title",
                                "url"
                              ]
                            },
                            "description": "Sources that the draft cites"
                          },
                          "confidence": {
                            "type": "number",
                            "description": "The customer agent's confidence in the answer, from 0 to 1",
                            "example": 0.86
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "sent",
                              "dismissed"
                            ],
                            "description": "`pending` (awaiting review), `sent` (approved and posted to the conversation) or `dismissed` (discarded without sending)",
                            "example": "pending"
                          },
                          "sentMessageId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Conversation message created when the draft was approved. Null until then.",
                            "example": null
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the customer agent wrote the draft",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "reviewedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When a teammate approved or dismissed the draft. Null while pending.",
                            "example": null
                          }
                        },
                        "required": [
                          "id",
                          "conversationId",
                          "content",
                          "citations",
                          "confidence",
                          "status",
                          "sentMessageId",
                          "createdAt",
                          "reviewedAt"
                        ]
                      },
                      "description": "The drafts, newest first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No conversation with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant-drafts/{draftId}/approve": {
      "post": {
        "operationId": "approveQuillsAssistantDraft",
        "tags": [
          "AI assistant"
        ],
        "summary": "Approve and send an AI draft reply to the customer",
        "description": "Posts the reply text as a message from the approving teammate in the draft's conversation, with the draft's citations, updates the conversation's last message, and marks the draft `sent`. Records an `assistant_draft.sent` event. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the draft reply, as a TypeID or UUID",
              "example": "assistant_draft_reply_01m8rxzh33enbtnx8xxazk0js0"
            },
            "required": true,
            "description": "ID of the draft reply, as a TypeID or UUID",
            "name": "draftId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "Text to send: the draft's text, as is or edited by the teammate",
                    "example": "Full refunds are available within 14 days of purchase. I have started yours."
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The approved draft and created customer message ID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "draft": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of the draft reply",
                          "example": "assistant_draft_reply_01m8rxzh33enbtnx8xxazk0js0"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "Conversation that the draft answers",
                          "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                        },
                        "content": {
                          "type": "string",
                          "description": "Reply text. After approval, the text that was sent, including the teammate's edits.",
                          "example": "Full refunds are available within 14 days of purchase."
                        },
                        "citations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "Kind of source, such as `article`",
                                "example": "article"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the source",
                                "example": "article_01m8rxzh33enbtnx9j9vmdpc39"
                              },
                              "title": {
                                "type": "string",
                                "description": "Title of the source",
                                "example": "Refund policy"
                              },
                              "url": {
                                "type": "string",
                                "description": "Link to the source",
                                "example": "https://help.example.com/articles/12-refund-policy"
                              }
                            },
                            "required": [
                              "type",
                              "id",
                              "title",
                              "url"
                            ]
                          },
                          "description": "Sources that the draft cites"
                        },
                        "confidence": {
                          "type": "number",
                          "description": "The customer agent's confidence in the answer, from 0 to 1",
                          "example": 0.86
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "sent",
                            "dismissed"
                          ],
                          "description": "`pending` (awaiting review), `sent` (approved and posted to the conversation) or `dismissed` (discarded without sending)",
                          "example": "pending"
                        },
                        "sentMessageId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Conversation message created when the draft was approved. Null until then.",
                          "example": null
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the customer agent wrote the draft",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "reviewedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When a teammate approved or dismissed the draft. Null while pending.",
                          "example": null
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "content",
                        "citations",
                        "confidence",
                        "status",
                        "sentMessageId",
                        "createdAt",
                        "reviewedAt"
                      ],
                      "description": "The draft, now `sent`"
                    },
                    "messageId": {
                      "type": "string",
                      "description": "ID of the conversation message that was posted",
                      "example": "conversation_msg_01m8rxzh33enbtnx95dfxq1wve"
                    }
                  },
                  "required": [
                    "draft",
                    "messageId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No draft reply with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The draft was already sent or dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant-drafts/{draftId}/dismiss": {
      "post": {
        "operationId": "dismissQuillsAssistantDraft",
        "tags": [
          "AI assistant"
        ],
        "summary": "Dismiss an AI draft reply without sending it to the customer",
        "description": "Marks a pending draft `dismissed`; nothing is posted to the conversation. Records an `assistant_draft.dismissed` event. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the draft reply, as a TypeID or UUID",
              "example": "assistant_draft_reply_01m8rxzh33enbtnx8xxazk0js0"
            },
            "required": true,
            "description": "ID of the draft reply, as a TypeID or UUID",
            "name": "draftId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The dismissed draft",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the draft reply",
                      "example": "assistant_draft_reply_01m8rxzh33enbtnx8xxazk0js0"
                    },
                    "conversationId": {
                      "type": "string",
                      "description": "Conversation that the draft answers",
                      "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
                    },
                    "content": {
                      "type": "string",
                      "description": "Reply text. After approval, the text that was sent, including the teammate's edits.",
                      "example": "Full refunds are available within 14 days of purchase."
                    },
                    "citations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "Kind of source, such as `article`",
                            "example": "article"
                          },
                          "id": {
                            "type": "string",
                            "description": "ID of the source",
                            "example": "article_01m8rxzh33enbtnx9j9vmdpc39"
                          },
                          "title": {
                            "type": "string",
                            "description": "Title of the source",
                            "example": "Refund policy"
                          },
                          "url": {
                            "type": "string",
                            "description": "Link to the source",
                            "example": "https://help.example.com/articles/12-refund-policy"
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "title",
                          "url"
                        ]
                      },
                      "description": "Sources that the draft cites"
                    },
                    "confidence": {
                      "type": "number",
                      "description": "The customer agent's confidence in the answer, from 0 to 1",
                      "example": 0.86
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "sent",
                        "dismissed"
                      ],
                      "description": "`pending` (awaiting review), `sent` (approved and posted to the conversation) or `dismissed` (discarded without sending)",
                      "example": "pending"
                    },
                    "sentMessageId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Conversation message created when the draft was approved. Null until then.",
                      "example": null
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the customer agent wrote the draft",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "reviewedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When a teammate approved or dismissed the draft. Null while pending.",
                      "example": null
                    }
                  },
                  "required": [
                    "id",
                    "conversationId",
                    "content",
                    "citations",
                    "confidence",
                    "status",
                    "sentMessageId",
                    "createdAt",
                    "reviewedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No draft reply with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The draft was already sent or dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/apps/boards": {
      "get": {
        "operationId": "listQuillsAppBoards",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "List the boards that a sidebar app can file posts on",
        "description": "Lists the live boards that the API key's owner can see, by name, one page at a time. Pass `nextOffset` as `offset` for the next page. Requires an API key with quills scopes that an active app of this workspace holds, with the read:feedback capability.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "How many boards to skip. Default 0.",
              "example": 0
            },
            "required": false,
            "description": "How many boards to skip. Default 0.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100,
              "description": "The maximum number of boards to return. Default 100.",
              "example": 100
            },
            "required": false,
            "description": "The maximum number of boards to return. Default 100.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of boards",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The board ID. Pass it as `boardId` to create a post.",
                            "example": "board_01m8rxfrbhfzr9r83a29m5ke14"
                          },
                          "name": {
                            "type": "string",
                            "description": "The board name.",
                            "example": "Feature requests"
                          },
                          "slug": {
                            "type": "string",
                            "description": "The board's URL slug.",
                            "example": "feature-requests"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "slug"
                        ]
                      },
                      "description": "The boards, by name."
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The `offset` of the next page. Null on the last page.",
                      "example": null
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access: MISSING_PERMISSION, API_KEY_SCOPE, APP_NOT_BOUND or APP_SCOPE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/apps/search": {
      "get": {
        "operationId": "searchQuillsAppPosts",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Search the posts that a sidebar app can link",
        "description": "Full-text search over the posts that the API key's owner can see, most voted first. Leaves out merged, deleted and test-customer posts. Requires an API key with quills scopes that an active app of this workspace holds, with the read:feedback capability.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "The search text, matched against post titles and content.",
              "example": "pdf invoice"
            },
            "required": true,
            "description": "The search text, matched against post titles and content.",
            "name": "q",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 10,
              "description": "The maximum number of posts to return. Default 10.",
              "example": 10
            },
            "required": false,
            "description": "The maximum number of posts to return. Default 10.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Matching posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The post ID.",
                            "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "title": {
                            "type": "string",
                            "description": "The post title.",
                            "example": "Export invoices as PDF"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "The number of votes on the post.",
                            "example": 42
                          },
                          "boardName": {
                            "type": "string",
                            "description": "The name of the post's board.",
                            "example": "Feature requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The name of the post's status. Null when it has none.",
                            "example": "Planned"
                          },
                          "statusColor": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The status's display color. Null when the post has no status.",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "voteCount",
                          "boardName",
                          "statusName",
                          "statusColor"
                        ]
                      },
                      "description": "Matching posts, most voted first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access: MISSING_PERMISSION, API_KEY_SCOPE, APP_NOT_BOUND or APP_SCOPE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/apps/suggest": {
      "get": {
        "operationId": "suggestQuillsAppPosts",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Suggest posts that match a ticket's text",
        "description": "Ranks visible, unmerged posts by the cosine similarity of their embeddings (at least 0.5). Without an embedding model, or when the provider fails, it searches the text instead and `similarity` is null. The text goes to the configured AI provider. In the fallback, posts that share any word with the text rank by text relevance, then votes. Requires an API key with quills scopes that an active app of this workspace holds, with the read:feedback capability.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000,
              "description": "The ticket or message text to find matching posts for.",
              "example": "Can I download my invoices as PDF files?"
            },
            "required": true,
            "description": "The ticket or message text to find matching posts for.",
            "name": "text",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 5,
              "description": "The maximum number of posts to return. Default 5.",
              "example": 5
            },
            "required": false,
            "description": "The maximum number of posts to return. Default 5.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Suggested posts, best first",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The post ID.",
                            "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "title": {
                            "type": "string",
                            "description": "The post title.",
                            "example": "Export invoices as PDF"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "The number of votes on the post.",
                            "example": 42
                          },
                          "boardName": {
                            "type": "string",
                            "description": "The name of the post's board.",
                            "example": "Feature requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The name of the post's status. Null when it has none.",
                            "example": "Planned"
                          },
                          "statusColor": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The status's display color. Null when the post has no status.",
                            "example": "#3b82f6"
                          },
                          "similarity": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "The cosine similarity between the text and the post, from 0.5 to 1, rounded to two decimals. Null when the text search fallback found the post.",
                            "example": 0.82
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "voteCount",
                          "boardName",
                          "statusName",
                          "statusColor",
                          "similarity"
                        ]
                      },
                      "description": "Suggested posts, best match first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access: MISSING_PERMISSION, API_KEY_SCOPE, APP_NOT_BOUND or APP_SCOPE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/apps/posts": {
      "post": {
        "operationId": "createQuillsAppPost",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Create a post from a sidebar app",
        "description": "Creates a post on a board that the API key's owner can see. The requester, when given, is identified as a customer and becomes the author and first voter; the key's owner is recorded as the teammate who tracks the post. Without a requester the key's owner is the author. With `link`, the external item is linked to the new post. Records `post.created` and `app.post_created` events, plus `app.post_linked` with a link and `user.identified` with a requester. Each call creates a new post. Requires an API key with quills scopes that an active app of this workspace holds, with the write:feedback capability.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "boardId": {
                    "type": "string",
                    "description": "The board to file the post on, from `listQuillsAppBoards`.",
                    "example": "board_01m8rxfrbhfzr9r83a29m5ke14"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "The post title.",
                    "example": "Export invoices as PDF"
                  },
                  "content": {
                    "type": "string",
                    "maxLength": 10000,
                    "default": "",
                    "description": "The post body as plain text. Default: empty.",
                    "example": "Our finance team needs PDF invoices for their records."
                  },
                  "link": {
                    "type": "object",
                    "properties": {
                      "externalType": {
                        "type": "string",
                        "maxLength": 50,
                        "pattern": "^[a-z][a-z0-9_-]*$",
                        "description": "The kind of external item: lowercase letters, digits, `_` and `-`, starting with a letter. `live_chat` and `import` are reserved.",
                        "example": "zendesk"
                      },
                      "externalKey": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500,
                        "description": "The item's key in the external system, such as a ticket number. Together with `externalType` it names one item.",
                        "example": "48213"
                      },
                      "externalUrl": {
                        "type": "string",
                        "maxLength": 2048,
                        "format": "uri",
                        "description": "An https link to the item in the external system.",
                        "example": "https://acme.zendesk.com/agent/tickets/48213"
                      }
                    },
                    "required": [
                      "externalType",
                      "externalKey"
                    ],
                    "description": "The external item to link to the new post, such as the ticket the request came from."
                  },
                  "requester": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string",
                        "maxLength": 254,
                        "format": "email",
                        "description": "The customer's email address. An existing customer with this address is updated; otherwise a customer is created. It must not belong to a teammate.",
                        "example": "jane@example.com"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "description": "The customer's display name. Left out: the stored name stays.",
                        "example": "Jane Cooper"
                      }
                    },
                    "required": [
                      "email"
                    ],
                    "description": "The customer who asked: identified, then the post's voter"
                  },
                  "customFields": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2000
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "maxItems": 50
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "description": "Values of the board's custom fields, keyed by field key: a string for text, select and date (YYYY-MM-DD), a number, a boolean for a checkbox, and a list of options for multi-select."
                  }
                },
                "required": [
                  "boardId",
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The new post's ID.",
                      "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "title": {
                      "type": "string",
                      "description": "The post title.",
                      "example": "Export invoices as PDF"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "The post's board.",
                      "example": "board_01m8rxfrbhfzr9r83a29m5ke14"
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The post's status. Null when it has none.",
                      "example": "post_status_01m8rxfrbhfzr9r84qkepvgcsq"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "The post's vote count: 1 when the requester voted.",
                      "example": 1
                    },
                    "authorPrincipalId": {
                      "type": "string",
                      "description": "The author: the requester's customer principal, or the API key owner's principal without a requester.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "linkId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The new external link's ID. Null without `link`.",
                      "example": "post_external_link_01m8rxfrbhfzr9r84wtdjjzmgm"
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "boardId",
                    "statusId",
                    "voteCount",
                    "authorPrincipalId",
                    "createdAt",
                    "linkId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A custom field value is missing, unknown or of the wrong type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access: MISSING_PERMISSION, API_KEY_SCOPE, APP_NOT_BOUND or APP_SCOPE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The board does not exist, or the API key's owner cannot see it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The requester's email belongs to a teammate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/apps/links": {
      "put": {
        "operationId": "linkQuillsAppPost",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Link an external item to a post",
        "description": "Idempotent: `linked` is false when the link existed. With a requester, the requester is identified as a customer and votes on the post (or on the post it was merged into); the key's owner is recorded as the teammate who added the vote. A link to the same item that an integration owns is a 409. Records `app.post_linked` for a new link, `post.voted` for a new vote and `user.identified` for a requester. Requires an API key with quills scopes that an active app of this workspace holds, with the write:feedback capability.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postId": {
                    "type": "string",
                    "description": "The post to link the item to. The API key's owner must be able to see it.",
                    "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                  },
                  "externalType": {
                    "type": "string",
                    "maxLength": 50,
                    "pattern": "^[a-z][a-z0-9_-]*$",
                    "description": "The kind of external item: lowercase letters, digits, `_` and `-`, starting with a letter. `live_chat` and `import` are reserved.",
                    "example": "zendesk"
                  },
                  "externalKey": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "The item's key in the external system, such as a ticket number. Together with `externalType` it names one item.",
                    "example": "48213"
                  },
                  "externalUrl": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "An https link to the item in the external system.",
                    "example": "https://acme.zendesk.com/agent/tickets/48213"
                  },
                  "requester": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string",
                        "maxLength": 254,
                        "format": "email",
                        "description": "The customer's email address. An existing customer with this address is updated; otherwise a customer is created. It must not belong to a teammate.",
                        "example": "jane@example.com"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200,
                        "description": "The customer's display name. Left out: the stored name stays.",
                        "example": "Jane Cooper"
                      }
                    },
                    "required": [
                      "email"
                    ],
                    "description": "The customer who asked: identified, then the post's voter"
                  }
                },
                "required": [
                  "postId",
                  "externalType",
                  "externalKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The link and the vote",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "linkId": {
                      "type": "string",
                      "description": "The link's ID, new or existing.",
                      "example": "post_external_link_01m8rxfrbhfzr9r84wtdjjzmgm"
                    },
                    "linked": {
                      "type": "boolean",
                      "description": "True when this request created the link; false when it existed.",
                      "example": true
                    },
                    "voted": {
                      "type": "boolean",
                      "description": "True when this request added the requester's vote; false without a requester or when they had already voted.",
                      "example": true
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "The vote count of the post that holds the vote: the linked post, or the post it was merged into.",
                      "example": 43
                    },
                    "votedPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The post the requester's vote counts on: the linked post, or the post it was merged into. Null without a requester.",
                      "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "voterPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The requester's customer principal. Null without a requester.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    }
                  },
                  "required": [
                    "linkId",
                    "linked",
                    "voted",
                    "voteCount",
                    "votedPostId",
                    "voterPrincipalId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access: MISSING_PERMISSION, API_KEY_SCOPE, APP_NOT_BOUND or APP_SCOPE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post does not exist, or the API key's owner cannot see it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "An integration owns this link, or the requester's email belongs to a teammate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "unlinkQuillsAppPost",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Unlink an external item from a post",
        "description": "Idempotent. Removes only the app's link; a vote that the link added stays. Links that an integration owns are not touched. Records an `app.post_unlinked` event when a link was removed. Requires an API key with quills scopes that an active app of this workspace holds, with the write:feedback capability.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The post to unlink the item from.",
              "example": "post_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The post to unlink the item from.",
            "name": "postId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 50,
              "pattern": "^[a-z][a-z0-9_-]*$",
              "description": "The kind of external item: lowercase letters, digits, `_` and `-`, starting with a letter. `live_chat` and `import` are reserved.",
              "example": "zendesk"
            },
            "required": true,
            "description": "The kind of external item: lowercase letters, digits, `_` and `-`, starting with a letter. `live_chat` and `import` are reserved.",
            "name": "externalType",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500,
              "description": "The item's key in the external system, such as a ticket number. Together with `externalType` it names one item.",
              "example": "48213"
            },
            "required": true,
            "description": "The item's key in the external system, such as a ticket number. Together with `externalType` it names one item.",
            "name": "externalKey",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether a link was removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "True when a link was removed; false when there was none.",
                      "example": true
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access: MISSING_PERMISSION, API_KEY_SCOPE, APP_NOT_BOUND or APP_SCOPE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The post does not exist, or the API key's owner cannot see it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "listQuillsAppLinkedPosts",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "List the posts linked to an external item",
        "description": "Lists the posts that an app linked to one external item: the app's active links to posts that the API key's owner can see, newest first, at most 100. Links that an integration owns are left out. Requires an API key with quills scopes that an active app of this workspace holds, with the read:feedback capability.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 50,
              "pattern": "^[a-z][a-z0-9_-]*$",
              "description": "The kind of external item: lowercase letters, digits, `_` and `-`, starting with a letter. `live_chat` and `import` are reserved.",
              "example": "zendesk"
            },
            "required": true,
            "description": "The kind of external item: lowercase letters, digits, `_` and `-`, starting with a letter. `live_chat` and `import` are reserved.",
            "name": "externalType",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500,
              "description": "The item's key in the external system, such as a ticket number. Together with `externalType` it names one item.",
              "example": "48213"
            },
            "required": true,
            "description": "The item's key in the external system, such as a ticket number. Together with `externalType` it names one item.",
            "name": "externalKey",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Linked posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The post ID.",
                            "example": "post_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "title": {
                            "type": "string",
                            "description": "The post title.",
                            "example": "Export invoices as PDF"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "The number of votes on the post.",
                            "example": 42
                          },
                          "boardName": {
                            "type": "string",
                            "description": "The name of the post's board.",
                            "example": "Feature requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The name of the post's status. Null when it has none.",
                            "example": "Planned"
                          },
                          "statusColor": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The status's display color. Null when the post has no status.",
                            "example": "#3b82f6"
                          },
                          "linkId": {
                            "type": "string",
                            "description": "The link's ID.",
                            "example": "post_external_link_01m8rxfrbhfzr9r84wtdjjzmgm"
                          },
                          "linkedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the link was created.",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "voteCount",
                          "boardName",
                          "statusName",
                          "statusColor",
                          "linkId",
                          "linkedAt"
                        ]
                      },
                      "description": "The linked posts, newest link first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access: MISSING_PERMISSION, API_KEY_SCOPE, APP_NOT_BOUND or APP_SCOPE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/app-registrations": {
      "get": {
        "operationId": "listQuillsAppRegistrations",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "List the workspace's sidebar apps",
        "description": "Lists the workspace's sidebar apps, newest first, one page at a time; pass `nextOffset` as `offset` for the next page. An app with no `apiKeyId` was imported and cannot call the app routes. Key secrets are never returned. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000,
              "default": 0,
              "description": "How many apps to skip. Default 0.",
              "example": 0
            },
            "required": false,
            "description": "How many apps to skip. Default 0.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "The maximum number of apps to return. Default 50.",
              "example": 50
            },
            "required": false,
            "description": "The maximum number of apps to return. Default 50.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of apps",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The app ID.",
                            "example": "app_01m8rxfrbhfzr9r84wtdjjzmgm"
                          },
                          "name": {
                            "type": "string",
                            "description": "The app's display name.",
                            "example": "Zendesk sidebar"
                          },
                          "grantedScopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The capabilities the app holds. `read:feedback`: list boards, search and suggest posts, and list linked posts. `write:feedback`: create posts and link or unlink external items.",
                            "example": [
                              "read:feedback",
                              "write:feedback"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "`active`: the app's key can call the app routes. `disabled`: the app's key is refused on them.",
                            "example": "active"
                          },
                          "apiKeyId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The ID of the API key bound to the app. Null for an imported app, which cannot call the app routes."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the app was registered.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the app was last changed.",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "grantedScopes",
                          "status",
                          "apiKeyId",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "The apps, newest first."
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The `offset` of the next page. Null on the last page.",
                      "example": null
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsAppRegistration",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Register a sidebar app and create its API key",
        "description": "Needs a user session, as API key management does. Creates an API key for the caller with workspace:read and the actions that the scopes need (`read` for `read:feedback`; `create` and `update` for `write:feedback`), and binds it to the new app. The caller must hold those actions. `secret` is the key: it is shown only in this response. In this workspace's support and feedback API the key works only on the app routes; it keeps workspace:read on the other platform routes, and its scope in the caller's other workspaces. If saving the app fails, the new key is deleted. Records an `app.registered` event. Requires the `manage_settings` and `read` permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "The app's display name. Its API key is named `App <name>`, cut to 32 characters.",
                    "example": "Zendesk sidebar"
                  },
                  "grantedScopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "read:feedback",
                        "write:feedback"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 2,
                    "description": "The capabilities the app holds. `read:feedback`: list boards, search and suggest posts, and list linked posts. `write:feedback`: create posts and link or unlink external items. Duplicates are ignored.",
                    "example": [
                      "read:feedback",
                      "write:feedback"
                    ]
                  }
                },
                "required": [
                  "name",
                  "grantedScopes"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The app and its API key, shown once",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The app ID.",
                      "example": "app_01m8rxfrbhfzr9r84wtdjjzmgm"
                    },
                    "name": {
                      "type": "string",
                      "description": "The app's display name.",
                      "example": "Zendesk sidebar"
                    },
                    "grantedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The capabilities the app holds. `read:feedback`: list boards, search and suggest posts, and list linked posts. `write:feedback`: create posts and link or unlink external items.",
                      "example": [
                        "read:feedback",
                        "write:feedback"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "description": "`active`: the app's key can call the app routes. `disabled`: the app's key is refused on them.",
                      "example": "active"
                    },
                    "apiKeyId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The ID of the API key bound to the app. Null for an imported app, which cannot call the app routes."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the app was registered.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the app was last changed.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "secret": {
                      "type": "string",
                      "description": "The API key secret. It is shown only in this response; store it now. The app sends it as its API key."
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "grantedScopes",
                    "status",
                    "apiKeyId",
                    "createdAt",
                    "updatedAt",
                    "secret"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/app-registrations/{appId}": {
      "patch": {
        "operationId": "updateQuillsAppRegistration",
        "tags": [
          "Webhooks and apps"
        ],
        "summary": "Rename, rescope, disable or enable a sidebar app",
        "description": "Needs a user session. A disabled app's key is refused at once on the app routes and stays refused on this workspace's other support and feedback routes. The key itself stays enabled: delete it in the API key settings to revoke it everywhere. New scopes also set the key's scope; the caller must hold their actions. Fields left out keep their value. Records an `app.updated` event that names the changed fields. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The app ID.",
              "example": "app_01m8rxfrbhfzr9r84wtdjjzmgm"
            },
            "required": true,
            "description": "The app ID.",
            "name": "appId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "The app's new display name. The API key keeps its name.",
                    "example": "Zendesk sidebar"
                  },
                  "grantedScopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "read:feedback",
                        "write:feedback"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 2,
                    "description": "The capabilities the app holds. `read:feedback`: list boards, search and suggest posts, and list linked posts. `write:feedback`: create posts and link or unlink external items. Replaces the current scopes and the key's scope.",
                    "example": [
                      "read:feedback"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "disabled"
                    ],
                    "description": "`disabled` refuses the app's key on the app routes; `active` allows it again.",
                    "example": "disabled"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated app",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The app ID.",
                      "example": "app_01m8rxfrbhfzr9r84wtdjjzmgm"
                    },
                    "name": {
                      "type": "string",
                      "description": "The app's display name.",
                      "example": "Zendesk sidebar"
                    },
                    "grantedScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The capabilities the app holds. `read:feedback`: list boards, search and suggest posts, and list linked posts. `write:feedback`: create posts and link or unlink external items.",
                      "example": [
                        "read:feedback",
                        "write:feedback"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "description": "`active`: the app's key can call the app routes. `disabled`: the app's key is refused on them.",
                      "example": "active"
                    },
                    "apiKeyId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The ID of the API key bound to the app. Null for an imported app, which cannot call the app routes."
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the app was registered.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the app was last changed.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "grantedScopes",
                    "status",
                    "apiKeyId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No app with this ID exists in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/assistant/slack": {
      "get": {
        "operationId": "getQuillsSlackAgentSettings",
        "tags": [
          "AI assistant"
        ],
        "summary": "Get the Slack assistant settings",
        "description": "Returns whether the assistant answers in Slack, and what it still needs: an active Slack connection with the assistant scopes, and the Slack app's signing secret. `hookUrl` is the Event Subscriptions URL to register in the Slack app. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The Slack assistant settings and their revision",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revision": {
                      "type": "number",
                      "description": "Assistant settings revision, shared with the assistant settings. Send it back as expectedRevision.",
                      "example": 7
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the assistant answers mentions and direct messages in Slack",
                      "example": false
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether the workspace has an active Slack connection",
                      "example": true
                    },
                    "missingScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Slack OAuth scopes that the assistant needs and the connection was not granted. Empty when none are missing.",
                      "example": [
                        "app_mentions:read",
                        "im:history"
                      ]
                    },
                    "signingConfigured": {
                      "type": "boolean",
                      "description": "Whether the Slack app's signing secret is saved",
                      "example": true
                    },
                    "hookUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The Event Subscriptions request URL to register in the Slack app. Null when Slack is not connected.",
                      "example": "https://cloud.example.com/api/quills-public/signed/integrations/slack/integration_01m8rxfrbhfzr9r837k90wcggm/hooks/events"
                    }
                  },
                  "required": [
                    "revision",
                    "enabled",
                    "active",
                    "missingScopes",
                    "signingConfigured",
                    "hookUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsSlackAssistantEnabled",
        "tags": [
          "AI assistant"
        ],
        "summary": "Turn the Slack assistant on or off",
        "description": "Turns the Slack assistant on or off. Send the revision you read; another writer's change since then returns 409, and a successful update increases the revision by one. Turning it on needs an active Slack connection with every scope in `missingScopes` granted, and the signing secret. Turning it off always succeeds. Records a `slack_agent.settings_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expectedRevision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647,
                    "description": "The revision from your last read. A different current revision returns 409.",
                    "example": 7
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "true: answer in Slack. false: stop answering.",
                    "example": true
                  }
                },
                "required": [
                  "expectedRevision",
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated Slack assistant settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revision": {
                      "type": "number",
                      "description": "Assistant settings revision, shared with the assistant settings. Send it back as expectedRevision.",
                      "example": 7
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Whether the assistant answers mentions and direct messages in Slack",
                      "example": false
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether the workspace has an active Slack connection",
                      "example": true
                    },
                    "missingScopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Slack OAuth scopes that the assistant needs and the connection was not granted. Empty when none are missing.",
                      "example": [
                        "app_mentions:read",
                        "im:history"
                      ]
                    },
                    "signingConfigured": {
                      "type": "boolean",
                      "description": "Whether the Slack app's signing secret is saved",
                      "example": true
                    },
                    "hookUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The Event Subscriptions request URL to register in the Slack app. Null when Slack is not connected.",
                      "example": "https://cloud.example.com/api/quills-public/signed/integrations/slack/integration_01m8rxfrbhfzr9r837k90wcggm/hooks/events"
                    }
                  },
                  "required": [
                    "revision",
                    "enabled",
                    "active",
                    "missingScopes",
                    "signingConfigured",
                    "hookUrl"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Turning on while Slack is not active, misses a required scope or has no signing secret, or the settings revision changed since you read it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/channels/github": {
      "get": {
        "operationId": "getQuillsGitHubChannelStatus",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Get the GitHub inbox channel status",
        "description": "Returns the GitHub connection's state, whether the GitHub inbox channel is on, the status-sync webhook it relies on, and the connection's last error and activity times. `hasToken` says whether a token is stored; the token is never returned. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The GitHub channel status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connected": {
                      "type": "boolean",
                      "description": "Whether the GitHub connection is `active` or `paused`.",
                      "example": true
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Status of the GitHub connection, such as `active` or `paused`. Null when GitHub was never connected.",
                      "example": "active"
                    },
                    "inboxEnabled": {
                      "type": "boolean",
                      "description": "Whether the GitHub inbox channel is on, so issues and comments arrive as conversations and teammate replies post as issue comments.",
                      "example": true
                    },
                    "hasToken": {
                      "type": "boolean",
                      "description": "Whether a GitHub access token is stored. The token itself is never returned.",
                      "example": true
                    },
                    "webhookReady": {
                      "type": "boolean",
                      "description": "Whether status sync has an active repository webhook that the inbox can use.",
                      "example": true
                    },
                    "repo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Repository of the status-sync webhook, as `owner/name`. Null while `webhookReady` is false.",
                      "example": "acme/website"
                    },
                    "username": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "GitHub login of the connected account. Null when unknown.",
                      "example": "acme-support"
                    },
                    "lastError": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Last error of the GitHub connection, such as a failed webhook update. When the inbox is on but no token is stored, a reminder to connect GitHub. Null when there is none.",
                      "example": "The webhook update failed. Check the repository webhook in GitHub."
                    },
                    "lastErrorAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Time of the last error, in ISO 8601 UTC. Null when none is recorded.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "lastOutboundAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Time the connection last sent something to GitHub, in ISO 8601 UTC. Null when it never has.",
                      "example": "2026-03-14T09:20:11.000Z"
                    },
                    "lastInboundAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Time the connection last received something from GitHub, in ISO 8601 UTC. Null when it never has.",
                      "example": "2026-03-14T09:18:42.000Z"
                    }
                  },
                  "required": [
                    "connected",
                    "status",
                    "inboxEnabled",
                    "hasToken",
                    "webhookReady",
                    "repo",
                    "username",
                    "lastError",
                    "lastErrorAt",
                    "lastOutboundAt",
                    "lastInboundAt"
                  ],
                  "description": "Status of the GitHub inbox channel."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/channels/github/inbox": {
      "put": {
        "operationId": "setQuillsGitHubInboxEnabled",
        "tags": [
          "Inbox settings and channels"
        ],
        "summary": "Turn the GitHub inbox channel on or off",
        "description": "Turns the GitHub inbox channel on or off. The inbox uses the status-sync webhook of the GitHub connection, so turning it on needs an active (not paused) connection with a token and status sync on for a repository. Turning it on gives the channel to the workspace's default team, restoring the team's earlier GitHub channel with its issue threads when there is one; turning it off removes the channel. The server also changes the repository webhook's events in GitHub (`issues` and `issue_comment` when on, `issues` only when off); when that call fails the switch still changes and `lastError` says so, and a successful call clears `lastError`. Setting the current state changes nothing (`changed: false`). Requires the `manage_settings` permission. Records a `github_inbox.settings_updated` event when something changed.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether the GitHub inbox channel should be on.",
                    "example": true
                  }
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The GitHub channel status after the change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connected": {
                      "type": "boolean",
                      "description": "Whether the GitHub connection is `active` or `paused`.",
                      "example": true
                    },
                    "status": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Status of the GitHub connection, such as `active` or `paused`. Null when GitHub was never connected.",
                      "example": "active"
                    },
                    "inboxEnabled": {
                      "type": "boolean",
                      "description": "Whether the GitHub inbox channel is on, so issues and comments arrive as conversations and teammate replies post as issue comments.",
                      "example": true
                    },
                    "hasToken": {
                      "type": "boolean",
                      "description": "Whether a GitHub access token is stored. The token itself is never returned.",
                      "example": true
                    },
                    "webhookReady": {
                      "type": "boolean",
                      "description": "Whether status sync has an active repository webhook that the inbox can use.",
                      "example": true
                    },
                    "repo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Repository of the status-sync webhook, as `owner/name`. Null while `webhookReady` is false.",
                      "example": "acme/website"
                    },
                    "username": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "GitHub login of the connected account. Null when unknown.",
                      "example": "acme-support"
                    },
                    "lastError": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Last error of the GitHub connection, such as a failed webhook update. When the inbox is on but no token is stored, a reminder to connect GitHub. Null when there is none.",
                      "example": "The webhook update failed. Check the repository webhook in GitHub."
                    },
                    "lastErrorAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Time of the last error, in ISO 8601 UTC. Null when none is recorded.",
                      "example": "2026-03-14T09:26:53.000Z"
                    },
                    "lastOutboundAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Time the connection last sent something to GitHub, in ISO 8601 UTC. Null when it never has.",
                      "example": "2026-03-14T09:20:11.000Z"
                    },
                    "lastInboundAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Time the connection last received something from GitHub, in ISO 8601 UTC. Null when it never has.",
                      "example": "2026-03-14T09:18:42.000Z"
                    },
                    "changed": {
                      "type": "boolean",
                      "description": "Whether the request turned the channel on or off. False when it was already in the requested state.",
                      "example": true
                    }
                  },
                  "required": [
                    "connected",
                    "status",
                    "inboxEnabled",
                    "hasToken",
                    "webhookReady",
                    "repo",
                    "username",
                    "lastError",
                    "lastErrorAt",
                    "lastOutboundAt",
                    "lastInboundAt",
                    "changed"
                  ],
                  "description": "Status of the GitHub inbox channel."
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Turning the channel on needs GitHub connected and not paused, status sync on for a repository, and a default team; the message says which is missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversation-messages/{messageId}/github-retry": {
      "post": {
        "operationId": "retryQuillsGitHubAgentMessage",
        "tags": [
          "Conversations"
        ],
        "summary": "Send a failed reply to GitHub again",
        "description": "Queues a teammate's reply on a GitHub conversation for delivery as an issue comment again, when its delivery failed or has been pending for more than ten minutes. Sets the reply's delivery status back to `pending`. The worker first lists the issue's comments and marks the reply sent when one already carries it, so a reply that reached GitHub isn't posted twice. Requires the `update` permission. Records a `github_inbox.message_retried` event, which queues the delivery.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the teammate's reply to send again. Accepts the TypeID or its UUID.",
              "example": "conversation_msg_01m8rzdgxqecrb411rt5pxq1s4"
            },
            "required": true,
            "description": "ID of the teammate's reply to send again. Accepts the TypeID or its UUID.",
            "name": "messageId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The reply is queued for delivery",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messageId": {
                      "type": "string",
                      "description": "ID of the queued reply (TypeID).",
                      "example": "conversation_msg_01m8rzdgxqecrb411rt5pxq1s4"
                    },
                    "conversationId": {
                      "type": "string",
                      "description": "ID of the reply's conversation (TypeID).",
                      "example": "conversation_01m8rxv9wze05sk3mc2x5ss7d8"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending"
                      ],
                      "description": "New delivery status. Always `pending`.",
                      "example": "pending"
                    }
                  },
                  "required": [
                    "messageId",
                    "conversationId",
                    "status"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The message doesn't exist, or isn't a teammate's customer-visible reply on a GitHub conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The reply is already on GitHub, or its delivery hasn't failed and hasn't been pending for more than ten minutes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/integrations/segment/connection": {
      "put": {
        "operationId": "saveQuillsSegmentConnection",
        "tags": [
          "Integrations"
        ],
        "summary": "Connect Segment with its shared secret",
        "description": "Segment signs each identify call with this secret (x-signature). Send them to /api/quills-public/signed/integrations/segment/{integrationId}/identify, with the `id` from the response. Creates the connection, or replaces the credentials of an existing one (a new installation; event mappings stay). Records an `integration.connected` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "incomingSecret": {
                    "type": "string",
                    "minLength": 16,
                    "maxLength": 500,
                    "pattern": "^[\\x21-\\x7e]+$",
                    "description": "Shared secret that Segment uses to sign identify calls. Stored encrypted and never returned."
                  }
                },
                "required": [
                  "incomingSecret"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The connection without its secret",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/QuillsIntegrationSummary"
                        },
                        {
                          "description": "The saved connection, without its credentials."
                        }
                      ]
                    }
                  },
                  "required": [
                    "integration"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the manage_settings permission, or the API key lacks its scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The server has no NOTIFICATION_SECRET_ENCRYPTION_KEY, so it cannot store credentials encrypted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/surveys": {
      "get": {
        "operationId": "listQuillsSurveys",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "List surveys",
        "description": "Lists the workspace's surveys, newest first, with their response counts (without test customers). Uses offset paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "description": "Maximum number of items to return in the page",
              "example": 50
            },
            "required": false,
            "description": "Maximum number of items to return in the page",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "active",
                "closed"
              ],
              "description": "Only surveys in this status. Omit it for every status. `draft`: not shown to customers yet; it can be edited or deleted. `active`: shown to the targeted customers. `closed`: no longer collects responses and cannot change."
            },
            "required": false,
            "description": "Only surveys in this status. Omit it for every status. `draft`: not shown to customers yet; it can be edited or deleted. `active`: shown to the targeted customers. `closed`: no longer collects responses and cannot change.",
            "name": "status",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Surveys, newest first, with their response counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "surveys": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/QuillsSurvey"
                      },
                      "description": "Surveys on this page, newest first"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Offset to request the next page with, or null on the last page",
                      "example": 50
                    }
                  },
                  "required": [
                    "surveys",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createQuillsSurvey",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Create a draft survey",
        "description": "Creates a survey in `draft` status; activate it with the status route. A poll needs 2 to 20 answer options. A PMF survey gets its fixed answers. Other types take no options. `targetSegmentIds` null or absent aims the survey at every customer. Records a `survey.created` event. Requires the `quills:create` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "nps",
                      "csat",
                      "ces",
                      "pmf",
                      "poll",
                      "open"
                    ],
                    "description": "Survey type. `nps`: Net Promoter Score, a 0-10 score. `csat`: customer satisfaction, a 1-5 score. `ces`: customer effort, a 1-7 score. `pmf`: product-market fit, one of three fixed answers. `poll`: one of the survey's own answers. `open`: a written answer. It cannot be changed later."
                  },
                  "question": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "The question that customers see. Leading and trailing spaces are removed.",
                    "example": "How likely are you to recommend us to a friend?"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "minItems": 2,
                    "maxItems": 20,
                    "description": "Answer options of a poll, each unique, about 4,000 bytes in total at most. Only a poll takes options.",
                    "example": [
                      "Weekly",
                      "Monthly",
                      "Rarely"
                    ]
                  },
                  "targetSegmentIds": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Segment IDs of the customers that the survey targets. Null targets every customer. Each must be a live segment.",
                    "example": [
                      "segment_05p0q2s6v8x1y3z5a7b9c1d4e6"
                    ]
                  }
                },
                "required": [
                  "type",
                  "question"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created draft",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsSurvey"
                }
              }
            }
          },
          "400": {
            "description": "A poll has no options, or another type was given options",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A target segment was not found or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/surveys/{surveyId}": {
      "patch": {
        "operationId": "updateQuillsSurvey",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Update a draft or active survey",
        "description": "Changes the question, the poll options or the target segments of a draft or active survey; at least one is required. A closed survey does not change. New poll options apply to later results: earlier answers that are no longer an option count only in the total. Records a `survey.updated` event. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Survey ID",
              "example": "survey_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Survey ID",
            "name": "surveyId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "The question that customers see. Leading and trailing spaces are removed.",
                    "example": "How likely are you to recommend us to a friend?"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "minItems": 2,
                    "maxItems": 20,
                    "description": "Answer options of a poll, each unique, about 4,000 bytes in total at most. Only a poll takes options.",
                    "example": [
                      "Weekly",
                      "Monthly",
                      "Rarely"
                    ]
                  },
                  "targetSegmentIds": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Segment IDs of the customers that the survey targets. Null targets every customer. Each must be a live segment.",
                    "example": [
                      "segment_05p0q2s6v8x1y3z5a7b9c1d4e6"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated survey",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsSurvey"
                }
              }
            }
          },
          "400": {
            "description": "Options were given for a survey that is not a poll",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Survey not found, or a target segment not found or deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The survey is closed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteQuillsSurvey",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Delete a draft survey",
        "description": "Permanently deletes a survey that is still a draft. Active and closed surveys keep their responses and cannot be deleted. Records a `survey.deleted` event. Requires the `quills:delete` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Survey ID",
              "example": "survey_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Survey ID",
            "name": "surveyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted draft",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID of the deleted survey",
                      "example": "survey_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    }
                  },
                  "required": [
                    "id"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Survey not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The survey is active or closed; only a draft can be deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/surveys/{surveyId}/status": {
      "put": {
        "operationId": "setQuillsSurveyStatus",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Activate or close a survey",
        "description": "Moves a survey forward: a draft becomes active, and an active survey closes. Other changes are refused, so a closed survey stays closed. Records a `survey.updated` event on activation and a `survey.closed` event on closing. Requires the `quills:update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Survey ID",
              "example": "survey_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Survey ID",
            "name": "surveyId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "closed"
                    ],
                    "description": "The new status. `active`: only from `draft`. `closed`: only from `active`."
                  }
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The survey with its new status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsSurvey"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Survey not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The survey is not in the status that this change starts from",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/surveys/{surveyId}/results": {
      "get": {
        "operationId": "getQuillsSurveyResults",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Get the results of a survey",
        "description": "Counts each score or choice and computes the type's score: NPS is % promoters (9-10) minus % detractors (0-6), CSAT is % of 4-5, CES is the average, PMF is % very disappointed. Also returns the latest 20 comments with the respondent's display name, which `quills:read` already shows in the people directory. Responses from test customers are left out. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Survey ID",
              "example": "survey_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Survey ID",
            "name": "surveyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The survey and its results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsSurveyResults"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Survey not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog/drafts": {
      "post": {
        "operationId": "draftQuillsChangelogFromPosts",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Draft a changelog entry from shipped posts with AI",
        "description": "Asks the instance's configured AI provider to draft a changelog entry from the given posts and returns a title and a Markdown body for review. The model sees each post's title, board, status, vote count and the first 500 characters of its details, and is told not to add features, dates, numbers or customer names.\n\nSaves and publishes nothing: create the entry with `createQuillsChangelogEntry`. The call is recorded only as an AI usage log row; no event is recorded. Every post must be one the caller can see. Requires the `quills:create` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post` prefix. Requests also accept the bare UUID.",
                      "example": "post_01h455vb4pex5vsknk084sn02q"
                    },
                    "minItems": 1,
                    "maxItems": 25,
                    "description": "IDs of the posts to announce, 1 to 25, each once. They are usually posts in a `complete` status, but any post the caller can see is accepted.",
                    "example": [
                      "post_01jd3k8m2q5r7t9v1w3x5y7z9d",
                      "post_01jd3k8m2q5r7t9v1w3x5y7z9g"
                    ]
                  }
                },
                "required": [
                  "postIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The draft for review",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string",
                      "description": "Suggested entry title, up to 200 characters",
                      "example": "Faster filters and CSV export"
                    },
                    "body": {
                      "type": "string",
                      "description": "Suggested entry body in Markdown, up to 20,000 characters: a short intro sentence and one bullet per post",
                      "example": "This update makes boards quicker to work with.\n\n- **Filter by tag**: find related requests in one click."
                    },
                    "postIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The post IDs from the request, to link when you create the entry",
                      "example": [
                        "post_01jd3k8m2q5r7t9v1w3x5y7z9d",
                        "post_01jd3k8m2q5r7t9v1w3x5y7z9g"
                      ]
                    },
                    "requesterCount": {
                      "type": "number",
                      "description": "Distinct people who voted for the posts, test customers left out",
                      "example": 37
                    }
                  },
                  "required": [
                    "title",
                    "body",
                    "postIds",
                    "requesterCount"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "A post was not found or is not visible to the caller",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "AI is not configured on this instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The AI provider timed out, was busy, rejected the request, could not be reached or returned an unusable answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog-engagement": {
      "get": {
        "operationId": "listQuillsChangelogEngagement",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "List published changelog entries with reaction and read counts",
        "description": "Lists published changelog entries with how many customers read them and their emoji reaction counts, newest publish time first, with offset paging (at most 50 entries per page). Drafts, scheduled and deleted entries are left out, and test customers are not counted. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 10000000,
              "default": 0,
              "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
              "example": 0
            },
            "required": false,
            "description": "Number of items to skip before the page starts. For the next page, add `limit` to it, or pass the response's `nextOffset` when the response has one.",
            "name": "offset",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "Maximum number of entries to return",
              "example": 20
            },
            "required": false,
            "description": "Maximum number of entries to return",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "One page of entries with their engagement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Changelog entry ID",
                            "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "title": {
                            "type": "string",
                            "description": "Entry title",
                            "example": "Faster board filters"
                          },
                          "publishedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the entry was published, in ISO 8601 UTC",
                            "example": "2026-11-19T09:10:00.000Z"
                          },
                          "readCount": {
                            "type": "number",
                            "description": "Customers whose changelog read mark is at or after the entry's publish time, that is, who opened the changelog after it was published",
                            "example": 214
                          },
                          "reactions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "emoji": {
                                  "type": "string",
                                  "description": "Reaction emoji",
                                  "example": "🎉"
                                },
                                "count": {
                                  "type": "number",
                                  "description": "Customers who reacted with this emoji",
                                  "example": 18
                                }
                              },
                              "required": [
                                "emoji",
                                "count"
                              ]
                            },
                            "description": "Reaction counts per emoji, sorted by emoji. Emojis nobody used are left out."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "publishedAt",
                          "readCount",
                          "reactions"
                        ]
                      },
                      "description": "One page of published entries, newest first"
                    },
                    "nextOffset": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "`offset` value for the next page. Null on the last page.",
                      "example": 20
                    }
                  },
                  "required": [
                    "items",
                    "nextOffset"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog/{entryId}/translations": {
      "get": {
        "operationId": "listQuillsChangelogTranslations",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "List the other-language versions of a changelog entry",
        "description": "Lists the translated versions of a changelog entry, sorted by language code. The entry's own title and content are the default language and are not included. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog entry ID",
              "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Changelog entry ID",
            "name": "entryId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Versions by language",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "locale": {
                            "type": "string",
                            "description": "Language of this version, as stored (lowercase language code)",
                            "example": "de"
                          },
                          "title": {
                            "type": "string",
                            "description": "Entry title in this language",
                            "example": "Schnellere Board-Filter"
                          },
                          "content": {
                            "type": "string",
                            "description": "Entry body in this language, in Markdown",
                            "example": "Filter werden jetzt sofort angewendet."
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When this version was last written, in ISO 8601 UTC",
                            "example": "2026-11-19T10:00:00.000Z"
                          }
                        },
                        "required": [
                          "locale",
                          "title",
                          "content",
                          "updatedAt"
                        ]
                      },
                      "description": "Translated versions, sorted by language code. Empty when there are none."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No changelog entry with this ID, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "saveQuillsChangelogTranslation",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Write a changelog entry's version in one language",
        "description": "Creates the entry's version in `locale`, or replaces it if one exists. Readers whose language it is get it in the portal, the widget and the changelog mail; others get the entry's own text. Requires the `quills:update` permission. Records a `changelog.translation_saved` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog entry ID",
              "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Changelog entry ID",
            "name": "entryId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "locale": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 35,
                    "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
                    "description": "A BCP 47 tag. It is stored as its language (de-AT is de; Chinese keeps zh-cn or zh-tw).",
                    "example": "de"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Entry title in this language, 1 to 200 characters after trimming",
                    "example": "Schnellere Board-Filter"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000,
                    "description": "Entry body in this language, in Markdown, up to 100,000 characters",
                    "example": "Filter werden jetzt sofort angewendet."
                  }
                },
                "required": [
                  "locale",
                  "title",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved version",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "locale": {
                      "type": "string",
                      "description": "Language of this version, as stored (lowercase language code)",
                      "example": "de"
                    },
                    "title": {
                      "type": "string",
                      "description": "Entry title in this language",
                      "example": "Schnellere Board-Filter"
                    },
                    "content": {
                      "type": "string",
                      "description": "Entry body in this language, in Markdown",
                      "example": "Filter werden jetzt sofort angewendet."
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When this version was last written, in ISO 8601 UTC",
                      "example": "2026-11-19T10:00:00.000Z"
                    }
                  },
                  "required": [
                    "locale",
                    "title",
                    "content",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No changelog entry with this ID, or it was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/changelog/{entryId}/translations/{locale}": {
      "delete": {
        "operationId": "deleteQuillsChangelogTranslation",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Delete a changelog entry's version in one language",
        "description": "Deletes the entry's version in `locale`; readers of that language then get the entry's own text. Requires the `quills:update` permission. Records a `changelog.translation_deleted` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Changelog entry ID",
              "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Changelog entry ID",
            "name": "entryId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 35,
              "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
              "description": "A BCP 47 tag. It is stored as its language (de-AT is de; Chinese keeps zh-cn or zh-tw).",
              "example": "de"
            },
            "required": true,
            "description": "A BCP 47 tag. It is stored as its language (de-AT is de; Chinese keeps zh-cn or zh-tw).",
            "name": "locale",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The version was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean",
                      "enum": [
                        true
                      ],
                      "description": "Always true"
                    }
                  },
                  "required": [
                    "deleted"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No changelog entry with this ID, it was deleted, or it has no version in this language",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/boards/{boardId}/settings": {
      "get": {
        "operationId": "getQuillsBoardSettings",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get a board's voting, task sync and custom field settings",
        "description": "Gets a board's vote display, default sort, task sync statuses, custom fields and delivery settings. Missing or unreadable stored values read as their defaults. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Board ID",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Board ID",
            "name": "boardId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Voting, task sync, custom field and delivery settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board these settings belong to",
                      "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "voteDisplay": {
                      "type": "string",
                      "enum": [
                        "count",
                        "hidden"
                      ],
                      "description": "How the portal and widget show vote counts. `count` (the default): show them. `hidden`: leave vote counts out of portal and widget responses; voting still works."
                    },
                    "defaultSort": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "votes",
                        "newest",
                        "random",
                        null
                      ],
                      "description": "The order of the board's portal and widget posts when the caller names none. `votes`: most votes first. `newest`: newest first. `random`: a shuffled order that stays the same for one viewer for one UTC day. Null: newest in the API, the portal's own default in the web portal."
                    },
                    "taskSync": {
                      "type": "object",
                      "properties": {
                        "statusOnTaskDone": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The post status that a linked post gets when its linked task moves to a done column. Null: no change.",
                          "example": "post_status_01m8rxs5z8e8mtfnjpm7daknbw"
                        },
                        "statusOnTaskPlanned": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The post status that a linked post gets when its linked task is scheduled into a sprint/cycle. Null: no change.",
                          "example": "post_status_01m8rxs5z8e8mtfnjtmnjtr0d0"
                        },
                        "statusOnTaskInProgress": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The post status that a linked post gets when its linked task moves to an in-progress column. Null: no change.",
                          "example": "post_status_01m8rxs5z8e8mtfnjtmnjtr0d0"
                        }
                      },
                      "required": [
                        "statusOnTaskDone"
                      ],
                      "description": "Post statuses that the board's linked posts move to when their linked tasks change. A key that is absent or null makes no change."
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{0,39}$",
                            "description": "Field key that post values are stored under, unique on the board: 1 to 40 lowercase letters, digits or underscores, starting with a letter",
                            "example": "plan_tier"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100,
                            "description": "Field name shown to people",
                            "example": "Plan tier"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "text",
                              "number",
                              "select",
                              "multi_select",
                              "checkbox",
                              "date"
                            ],
                            "description": "Value type. `text`: free text. `number`: a number. `select`: one of `options`. `multi_select`: a list of `options`. `checkbox`: a boolean. `date`: a YYYY-MM-DD date."
                          },
                          "required": {
                            "type": "boolean",
                            "default": false,
                            "description": "Whether a new post must have a value. A required checkbox must be checked. Default false."
                          },
                          "internal": {
                            "type": "boolean",
                            "default": false,
                            "description": "Whether only teammates see and set the field; customers never see it. Default false."
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "maxItems": 50,
                            "description": "Unique choices of a `select` or `multi_select` field, at least one; absent for other types",
                            "example": [
                              "Free",
                              "Pro",
                              "Enterprise"
                            ]
                          }
                        },
                        "required": [
                          "key",
                          "label",
                          "type"
                        ]
                      },
                      "description": "The custom fields that the board asks for, in display order. Internal fields are for teammates only."
                    },
                    "delivery": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "description": "project that receives the board's tasks."
                        },
                        "columnId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Column of new tasks. Null: the project's first column that is not final."
                        },
                        "priority": {
                          "type": "string",
                          "enum": [
                            "no-priority",
                            "low",
                            "medium",
                            "high",
                            "urgent"
                          ],
                          "description": "Priority of new tasks.",
                          "example": "medium"
                        },
                        "triggerStatusId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Post status that creates a task when a teammate moves a request of this board to it. Null: the rule is off.",
                          "example": "post_status_01m8rxs5z8e8mtfnjtmnjtr0d0"
                        }
                      },
                      "required": [
                        "projectId",
                        "columnId",
                        "priority",
                        "triggerStatusId"
                      ],
                      "description": "Null: the board has no delivery project."
                    }
                  },
                  "required": [
                    "boardId",
                    "voteDisplay",
                    "defaultSort",
                    "taskSync",
                    "customFields",
                    "delivery"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Board not found, deleted, or linked only to projects the caller cannot open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateQuillsBoardSettings",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Change a board's voting, task sync and custom field settings",
        "description": "Changes only the given keys and keeps every other board setting; at least one key is required. `defaultSort` null removes the board's default. `taskSync` status IDs must be live post statuses of the workspace; null turns that sync off. `customFields` replaces the board's whole field list; values that posts already hold stay stored. Records a `board.settings_updated` event that names the changed keys. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Board ID",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Board ID",
            "name": "boardId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "voteDisplay": {
                    "type": "string",
                    "enum": [
                      "count",
                      "hidden"
                    ],
                    "description": "How the portal and widget show vote counts. `count` (the default): show them. `hidden`: leave vote counts out of portal and widget responses; voting still works."
                  },
                  "defaultSort": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "votes",
                      "newest",
                      "random",
                      null
                    ],
                    "description": "The order of the board's portal and widget posts when the caller names none. `votes`: most votes first. `newest`: newest first. `random`: a shuffled order that stays the same for one viewer for one UTC day. Null: newest in the API, the portal's own default in the web portal."
                  },
                  "taskSync": {
                    "type": "object",
                    "properties": {
                      "statusOnTaskDone": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The post status that a linked post gets when its linked task moves to a done column. Null: no change.",
                        "example": "post_status_01m8rxs5z8e8mtfnjpm7daknbw"
                      },
                      "statusOnTaskPlanned": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The post status that a linked post gets when its linked task is scheduled into a sprint/cycle. Null: no change.",
                        "example": "post_status_01m8rxs5z8e8mtfnjtmnjtr0d0"
                      },
                      "statusOnTaskInProgress": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The post status that a linked post gets when its linked task moves to an in-progress column. Null: no change.",
                        "example": "post_status_01m8rxs5z8e8mtfnjtmnjtr0d0"
                      }
                    },
                    "required": [
                      "statusOnTaskDone"
                    ],
                    "description": "Post statuses that linked posts move to when their linked tasks change. It replaces the stored task sync as a whole: `statusOnTaskDone` is required, and an omitted planned or in-progress key turns that sync off."
                  },
                  "customFields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_]{0,39}$",
                          "description": "Field key that post values are stored under, unique on the board: 1 to 40 lowercase letters, digits or underscores, starting with a letter",
                          "example": "plan_tier"
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "Field name shown to people",
                          "example": "Plan tier"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "text",
                            "number",
                            "select",
                            "multi_select",
                            "checkbox",
                            "date"
                          ],
                          "description": "Value type. `text`: free text. `number`: a number. `select`: one of `options`. `multi_select`: a list of `options`. `checkbox`: a boolean. `date`: a YYYY-MM-DD date."
                        },
                        "required": {
                          "type": "boolean",
                          "default": false,
                          "description": "Whether a new post must have a value. A required checkbox must be checked. Default false."
                        },
                        "internal": {
                          "type": "boolean",
                          "default": false,
                          "description": "Whether only teammates see and set the field; customers never see it. Default false."
                        },
                        "options": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          },
                          "maxItems": 50,
                          "description": "Unique choices of a `select` or `multi_select` field, at least one; absent for other types",
                          "example": [
                            "Free",
                            "Pro",
                            "Enterprise"
                          ]
                        }
                      },
                      "required": [
                        "key",
                        "label",
                        "type"
                      ]
                    },
                    "maxItems": 20,
                    "description": "The fields that the board asks for (at most 20). An internal field is for teammates only: the portal, the widget and customer responses never include it. A required checkbox must be checked."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The board's voting, task sync, custom field and delivery settings after the change",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board these settings belong to",
                      "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "voteDisplay": {
                      "type": "string",
                      "enum": [
                        "count",
                        "hidden"
                      ],
                      "description": "How the portal and widget show vote counts. `count` (the default): show them. `hidden`: leave vote counts out of portal and widget responses; voting still works."
                    },
                    "defaultSort": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "votes",
                        "newest",
                        "random",
                        null
                      ],
                      "description": "The order of the board's portal and widget posts when the caller names none. `votes`: most votes first. `newest`: newest first. `random`: a shuffled order that stays the same for one viewer for one UTC day. Null: newest in the API, the portal's own default in the web portal."
                    },
                    "taskSync": {
                      "type": "object",
                      "properties": {
                        "statusOnTaskDone": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The post status that a linked post gets when its linked task moves to a done column. Null: no change.",
                          "example": "post_status_01m8rxs5z8e8mtfnjpm7daknbw"
                        },
                        "statusOnTaskPlanned": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The post status that a linked post gets when its linked task is scheduled into a sprint/cycle. Null: no change.",
                          "example": "post_status_01m8rxs5z8e8mtfnjtmnjtr0d0"
                        },
                        "statusOnTaskInProgress": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The post status that a linked post gets when its linked task moves to an in-progress column. Null: no change.",
                          "example": "post_status_01m8rxs5z8e8mtfnjtmnjtr0d0"
                        }
                      },
                      "required": [
                        "statusOnTaskDone"
                      ],
                      "description": "Post statuses that the board's linked posts move to when their linked tasks change. A key that is absent or null makes no change."
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{0,39}$",
                            "description": "Field key that post values are stored under, unique on the board: 1 to 40 lowercase letters, digits or underscores, starting with a letter",
                            "example": "plan_tier"
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100,
                            "description": "Field name shown to people",
                            "example": "Plan tier"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "text",
                              "number",
                              "select",
                              "multi_select",
                              "checkbox",
                              "date"
                            ],
                            "description": "Value type. `text`: free text. `number`: a number. `select`: one of `options`. `multi_select`: a list of `options`. `checkbox`: a boolean. `date`: a YYYY-MM-DD date."
                          },
                          "required": {
                            "type": "boolean",
                            "default": false,
                            "description": "Whether a new post must have a value. A required checkbox must be checked. Default false."
                          },
                          "internal": {
                            "type": "boolean",
                            "default": false,
                            "description": "Whether only teammates see and set the field; customers never see it. Default false."
                          },
                          "options": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "maxItems": 50,
                            "description": "Unique choices of a `select` or `multi_select` field, at least one; absent for other types",
                            "example": [
                              "Free",
                              "Pro",
                              "Enterprise"
                            ]
                          }
                        },
                        "required": [
                          "key",
                          "label",
                          "type"
                        ]
                      },
                      "description": "The custom fields that the board asks for, in display order. Internal fields are for teammates only."
                    },
                    "delivery": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "description": "project that receives the board's tasks."
                        },
                        "columnId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Column of new tasks. Null: the project's first column that is not final."
                        },
                        "priority": {
                          "type": "string",
                          "enum": [
                            "no-priority",
                            "low",
                            "medium",
                            "high",
                            "urgent"
                          ],
                          "description": "Priority of new tasks.",
                          "example": "medium"
                        },
                        "triggerStatusId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Post status that creates a task when a teammate moves a request of this board to it. Null: the rule is off.",
                          "example": "post_status_01m8rxs5z8e8mtfnjtmnjtr0d0"
                        }
                      },
                      "required": [
                        "projectId",
                        "columnId",
                        "priority",
                        "triggerStatusId"
                      ],
                      "description": "Null: the board has no delivery project."
                    }
                  },
                  "required": [
                    "boardId",
                    "voteDisplay",
                    "defaultSort",
                    "taskSync",
                    "customFields",
                    "delivery"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Board not found, deleted, or linked only to projects the caller cannot open; or a task sync status is not a live post status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/boards/{boardId}/delivery": {
      "put": {
        "operationId": "setQuillsBoardDelivery",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Set a board's delivery project and task rule",
        "description": "Sets the project that receives the board's tasks, the column and priority of new tasks, and an optional trigger status. Replaces any earlier delivery settings and keeps the board's other settings. It does not change who sees the board. With a trigger status, a teammate who moves a request of the board to that status gets a task created as them. Requires the `quills:manage_settings` permission and `task:create` in the project, which must be a live project of this workspace. Records a `board.settings_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Board ID",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Board ID",
            "name": "boardId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "The project that receives the board's tasks. It does not change who sees the board."
                  },
                  "columnId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "The column of new tasks. Null: the project's first column that is not final."
                  },
                  "priority": {
                    "type": "string",
                    "enum": [
                      "no-priority",
                      "low",
                      "medium",
                      "high",
                      "urgent"
                    ],
                    "description": "The priority of new tasks."
                  },
                  "triggerStatusId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "When a teammate moves a request of this board to this status, a task is created as that teammate. Null: the rule is off.",
                    "example": "post_status_01h455vb4pex5vsknk084sn02q"
                  }
                },
                "required": [
                  "projectId",
                  "columnId",
                  "priority",
                  "triggerStatusId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The delivery settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "description": "project that receives the board's tasks."
                    },
                    "columnId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Column of new tasks. Null: the project's first column that is not final."
                    },
                    "priority": {
                      "type": "string",
                      "enum": [
                        "no-priority",
                        "low",
                        "medium",
                        "high",
                        "urgent"
                      ],
                      "description": "Priority of new tasks.",
                      "example": "medium"
                    },
                    "triggerStatusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Post status that creates a task when a teammate moves a request of this board to it. Null: the rule is off.",
                      "example": "post_status_01m8rxs5z8e8mtfnjtmnjtr0d0"
                    }
                  },
                  "required": [
                    "projectId",
                    "columnId",
                    "priority",
                    "triggerStatusId"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller cannot create tasks in the project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Board, project or trigger status not found, or the board is deleted or linked only to projects the caller cannot open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The project is archived, the column does not exist in the project, or the workspace plan does not include task creation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "clearQuillsBoardDelivery",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Remove a board's delivery project and task rule",
        "description": "Removes the board's delivery project, task settings and trigger status, so no more tasks are created from the board's requests. Existing tasks and links stay. Safe to repeat: a board without delivery settings answers `changed: false`. Records a `board.settings_updated` event only when something was removed. Requires the `quills:manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Board ID",
              "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Board ID",
            "name": "boardId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Whether delivery settings were removed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "True when the board had delivery settings and they were removed; false when it had none"
                    }
                  },
                  "required": [
                    "changed"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Board not found, deleted, or linked only to projects the caller cannot open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/tasks": {
      "post": {
        "operationId": "createQuillsPostTask",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Create a task from a post and link it",
        "description": "Creates a task as the caller through the task controller, then links it to the post. Requires the `quills:update` permission, the workspace `task:create` permission and access to the project; a project the caller cannot create tasks in is 403. The task gets the post title, a description with the post text, a link back and the demand counts (no customer names), the post's target date, the post owner as assignee when the project allows it, and the board's delivery priority (default medium). If the post is deleted before the link is stored, the new task is deleted again. Records a `post.task_linked` event with source `manual`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "ID of the project to create the task in",
                    "example": "k3x9p2m7q4v8w1z5n6b0c2d4"
                  },
                  "columnId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "ID of the project column for the task. Omitted or null: the project's first column that is not final.",
                    "example": "c7d2f9h4j6k8m1n3p5q7r9s2"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Task title, 1 to 500 characters after trimming. Omitted: the post title.",
                    "example": "Add CSV export to reports"
                  }
                },
                "required": [
                  "projectId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created and linked task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taskId": {
                      "type": "string",
                      "description": "ID of the created task",
                      "example": "m8n2b5v7c9x1z3l4k6j8h0g2"
                    },
                    "projectId": {
                      "type": "string",
                      "description": "ID of the task's project",
                      "example": "k3x9p2m7q4v8w1z5n6b0c2d4"
                    }
                  },
                  "required": [
                    "taskId",
                    "projectId"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The task fields were refused",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see, or project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The project is archived, the column does not exist, or the plan does not include it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "get": {
        "operationId": "listQuillsPostTasks",
        "tags": [
          "Feedback boards"
        ],
        "summary": "List the tasks linked to a post",
        "description": "Lists the linked tasks in projects that the caller can open, oldest link first, at most 100. `hidden` counts the linked tasks in projects that the caller cannot open; their fields are left out. Requires the `quills:read` permission and the workspace `project:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Linked tasks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "taskId": {
                            "type": "string",
                            "description": "ID of the task",
                            "example": "m8n2b5v7c9x1z3l4k6j8h0g2"
                          },
                          "key": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The task's ticket ID, such as APP-12; null when it has none",
                            "example": "APP-12"
                          },
                          "title": {
                            "type": "string",
                            "description": "Task title",
                            "example": "Add CSV export to reports"
                          },
                          "projectId": {
                            "type": "string",
                            "description": "ID of the task's project",
                            "example": "k3x9p2m7q4v8w1z5n6b0c2d4"
                          },
                          "columnName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the task's column; null when unknown",
                            "example": "In progress"
                          },
                          "columnColor": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Color of the task's column; null when it has none",
                            "example": "#f59e0b"
                          },
                          "done": {
                            "type": "boolean",
                            "description": "The task is in a final column."
                          },
                          "assigneeName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the task's assignee; null when unassigned",
                            "example": "Sam Rivera"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "rule",
                              "import"
                            ],
                            "description": "How the link was made. `manual`: a teammate created or linked the task. `rule`: the board's task rule created it. `import`: an import linked it."
                          }
                        },
                        "required": [
                          "taskId",
                          "key",
                          "title",
                          "projectId",
                          "columnName",
                          "columnColor",
                          "done",
                          "assigneeName",
                          "source"
                        ]
                      },
                      "description": "Linked tasks the caller can open, oldest link first"
                    },
                    "hidden": {
                      "type": "number",
                      "description": "Number of linked tasks in projects the caller cannot open, among the first 100 links",
                      "example": 1
                    }
                  },
                  "required": [
                    "items",
                    "hidden"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/tasks/{taskId}/customer-context": {
      "get": {
        "operationId": "getQuillsTaskCustomerContext",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get customer demand context for a task",
        "description": "Returns the customer demand behind a task: the feedback posts linked to it (up to the first 100 links), the customers who voted for them or for posts merged into them, and those customers' companies. Only posts the caller can see count, and test customers are left out. Requesters carry no email addresses.\n\nRequires the `quills:read` permission and read access to the task's project; a private project the caller is not a member of answers 403. Revenue fields are null without the `quills:view_revenue` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the task",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the task",
            "name": "taskId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Customer demand context for the task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taskId": {
                      "type": "string",
                      "description": "ID of the task",
                      "example": "tz4a98xxat96iws9zmbrgj3a"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "totalLinkedPosts": {
                          "type": "number",
                          "description": "Linked posts the caller can see",
                          "example": 3
                        },
                        "totalVotes": {
                          "type": "number",
                          "description": "Sum of the vote counts of those posts",
                          "example": 48
                        },
                        "uniqueRequesters": {
                          "type": "number",
                          "description": "Distinct customers who voted for the posts or for posts merged into them",
                          "example": 41
                        },
                        "uniqueCompanies": {
                          "type": "number",
                          "description": "Distinct companies of those customers",
                          "example": 12
                        },
                        "totalMrrCents": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "Sum of those companies' monthly recurring revenue, in cents. Null without the quills:view_revenue permission.",
                          "example": 1250000
                        }
                      },
                      "required": [
                        "totalLinkedPosts",
                        "totalVotes",
                        "uniqueRequesters",
                        "uniqueCompanies",
                        "totalMrrCents"
                      ],
                      "description": "Totals across the linked posts"
                    },
                    "linkedPosts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Post ID",
                            "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "title": {
                            "type": "string",
                            "description": "Post title",
                            "example": "Export boards to CSV"
                          },
                          "boardId": {
                            "type": "string",
                            "description": "ID of the post's board",
                            "example": "board_01jd3k8m2q5r7t9v1w3x5y7z9b"
                          },
                          "boardName": {
                            "type": "string",
                            "description": "Name of the post's board",
                            "example": "Feature requests"
                          },
                          "statusName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the post's status. Null when it has none.",
                            "example": "Planned"
                          },
                          "voteCount": {
                            "type": "number",
                            "description": "Post's vote count",
                            "example": 31
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "boardId",
                          "boardName",
                          "statusName",
                          "voteCount"
                        ]
                      },
                      "description": "Linked posts the caller can see"
                    },
                    "requesters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "principalId": {
                            "type": "string",
                            "description": "Customer's principal ID",
                            "example": "principal_01jd3k8m2q5r7t9v1w3x5y7z9c"
                          },
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Customer's display name. Null for anonymous voters or when unknown.",
                            "example": "Priya Shah"
                          },
                          "companyId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the customer's company. Null when none.",
                            "example": "company_01jd3k8m2q5r7t9v1w3x5y7z9d"
                          },
                          "companyName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Name of the customer's company. Null when none.",
                            "example": "Northwind Labs"
                          },
                          "importance": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Importance the customer gave one of their votes: `nice`, `important` or `critical`. Null when not given.",
                            "example": "important"
                          }
                        },
                        "required": [
                          "principalId",
                          "displayName",
                          "companyId",
                          "companyName",
                          "importance"
                        ]
                      },
                      "description": "Each customer who voted, once, test customers left out"
                    },
                    "companies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Company ID",
                            "example": "company_01jd3k8m2q5r7t9v1w3x5y7z9d"
                          },
                          "name": {
                            "type": "string",
                            "description": "Company name",
                            "example": "Northwind Labs"
                          },
                          "plan": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Company's plan name. Null when not set.",
                            "example": "Enterprise"
                          },
                          "churnRisk": {
                            "type": "boolean",
                            "description": "True when the company is flagged as a churn risk"
                          },
                          "requesterCount": {
                            "type": "number",
                            "description": "Requesters from this company",
                            "example": 4
                          },
                          "mrrCents": {
                            "type": [
                              "number",
                              "null"
                            ],
                            "description": "Company's monthly recurring revenue in cents. Null without the quills:view_revenue permission, or when not set.",
                            "example": 450000
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "plan",
                          "churnRisk",
                          "requesterCount",
                          "mrrCents"
                        ]
                      },
                      "description": "Requesters' companies, most requesters first"
                    }
                  },
                  "required": [
                    "taskId",
                    "summary",
                    "linkedPosts",
                    "requesters",
                    "companies"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No task with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/updates/preview": {
      "post": {
        "operationId": "previewQuillsPostUpdate",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Count who a post update reaches on each channel",
        "description": "Counts the recipients of a post update per channel. Writes nothing. The counts are what sendQuillsPostUpdate sends for the same channels and targets, unless followers or conversations change in between. Above 1,000 matching followers, counts.emailEstimated is true and counts.email is the number of matching followers, before each one's address and access are checked at send time. Requires the `quills:update` and `quills:manage_settings` permissions and access to the post's board.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 20,
                    "default": [],
                    "description": "Only customers in one of these segments. Empty: everyone."
                  },
                  "languages": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-z]{2,3}(-[a-z0-9]{2,8})*$"
                    },
                    "maxItems": 10,
                    "default": [],
                    "description": "Only customers whose language (preferred language, else locale) is one of these or a region of one (fr matches fr-CA). Empty: everyone."
                  },
                  "channels": {
                    "type": "object",
                    "properties": {
                      "page": {
                        "type": "boolean",
                        "description": "A public team comment on the request."
                      },
                      "email": {
                        "type": "boolean",
                        "description": "Mail to the request's followers."
                      },
                      "conversations": {
                        "type": "boolean",
                        "description": "A reply in each support conversation linked to the request."
                      },
                      "slack": {
                        "type": "boolean",
                        "description": "The page comment, posted by each Slack connection that sends comments of the request's board. Needs page."
                      }
                    },
                    "required": [
                      "page",
                      "email",
                      "conversations",
                      "slack"
                    ],
                    "description": "Channels to use; each flag turns one on. `slack` needs `page`."
                  }
                },
                "required": [
                  "channels"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recipients per channel",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counts": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number",
                          "description": "Public team comments on the request: 1 when `page` is on, else 0.",
                          "example": 1
                        },
                        "email": {
                          "type": "number",
                          "description": "Followers who get the update mail. When `emailEstimated` is true, the number of followers before the send-time checks.",
                          "example": 42
                        },
                        "emailEstimated": {
                          "type": "boolean",
                          "description": "True above 1,000 followers: `email` counts every follower, before the checks that each send makes."
                        },
                        "conversations": {
                          "type": "number",
                          "description": "Support conversations linked to the request that get a reply (at most 100).",
                          "example": 3
                        },
                        "slack": {
                          "type": "number",
                          "description": "Slack connections that post the page comment. 0 unless both `page` and `slack` are on.",
                          "example": 1
                        }
                      },
                      "required": [
                        "page",
                        "email",
                        "emailEstimated",
                        "conversations",
                        "slack"
                      ],
                      "description": "Recipients the update would reach on each channel"
                    },
                    "slackConnected": {
                      "type": "boolean",
                      "description": "A Slack connection sends this board's comments."
                    }
                  },
                  "required": [
                    "counts",
                    "slackConnected"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see, or segment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/updates": {
      "post": {
        "operationId": "sendQuillsPostUpdate",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Send an update about a post to its followers on every chosen channel",
        "description": "Sends one update about a post to its followers on every chosen channel. Requires the `quills:update` and `quills:manage_settings` permissions, access to the post's board, and `confirmRelease: true` (no verified release record links the post yet; a merged PR or a status change is not one). Page: a public team comment. Email: every follower that matches the targets, each once and with no cap; each one's address and access are checked when the mail is sent by a background job. Conversations: a reply in each linked conversation, without reopening or claiming it; its customer gets no update mail. Slack: the page comment, through Slack connections that send the board's comments. Records a `post.update_sent` event, plus `comment.created` for the page comment and `message.created` for each conversation reply. Idempotent: a repeated `idempotencyKey` returns the first send with `replayed: true` and sends nothing.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID, as a TypeID or a UUID",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "Post ID, as a TypeID or a UUID",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "segmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `segment` prefix. Requests also accept the bare UUID.",
                      "example": "segment_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 20,
                    "default": [],
                    "description": "Only customers in one of these segments. Empty: everyone."
                  },
                  "languages": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-z]{2,3}(-[a-z0-9]{2,8})*$"
                    },
                    "maxItems": 10,
                    "default": [],
                    "description": "Only customers whose language (preferred language, else locale) is one of these or a region of one (fr matches fr-CA). Empty: everyone."
                  },
                  "channels": {
                    "type": "object",
                    "properties": {
                      "page": {
                        "type": "boolean",
                        "description": "A public team comment on the request."
                      },
                      "email": {
                        "type": "boolean",
                        "description": "Mail to the request's followers."
                      },
                      "conversations": {
                        "type": "boolean",
                        "description": "A reply in each support conversation linked to the request."
                      },
                      "slack": {
                        "type": "boolean",
                        "description": "The page comment, posted by each Slack connection that sends comments of the request's board. Needs page."
                      }
                    },
                    "required": [
                      "page",
                      "email",
                      "conversations",
                      "slack"
                    ],
                    "description": "Channels to use; each flag turns one on. `slack` needs `page`."
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000,
                    "description": "Update text, 1 to 5,000 characters after trimming. Used as the page comment, the mail text and the conversation reply.",
                    "example": "CSV export is now live for every board. Open a board and choose Export."
                  },
                  "confirmRelease": {
                    "type": "boolean",
                    "default": false,
                    "description": "The sender confirms that the change shipped."
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 100,
                    "description": "Caller-chosen key, 8 to 100 characters, unique per send. Retrying with the same key returns the first send instead of sending again; a key already used for another post answers 409.",
                    "example": "post-update-2026-11-20-csv-export"
                  }
                },
                "required": [
                  "channels",
                  "body",
                  "idempotencyKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The update and what it queued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updateId": {
                      "type": "string",
                      "description": "ID (a UUID) of the stored update; on a replay, the earlier send's ID",
                      "example": "3f6c2b1e-8a4d-4c7f-9e2b-5d1a7c3e9f02"
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number",
                          "description": "Public team comments on the request: 1 when `page` is on, else 0.",
                          "example": 1
                        },
                        "email": {
                          "type": "number",
                          "description": "Followers who get the update mail. When `emailEstimated` is true, the number of followers before the send-time checks.",
                          "example": 42
                        },
                        "emailEstimated": {
                          "type": "boolean",
                          "description": "True above 1,000 followers: `email` counts every follower, before the checks that each send makes."
                        },
                        "conversations": {
                          "type": "number",
                          "description": "Support conversations linked to the request that get a reply (at most 100).",
                          "example": 3
                        },
                        "slack": {
                          "type": "number",
                          "description": "Slack connections that post the page comment. 0 unless both `page` and `slack` are on.",
                          "example": 1
                        }
                      },
                      "required": [
                        "page",
                        "email",
                        "emailEstimated",
                        "conversations",
                        "slack"
                      ],
                      "description": "Recipients the update reached on each channel; on a replay, the earlier send's counts"
                    },
                    "replayed": {
                      "type": "boolean",
                      "description": "The idempotency key named an earlier send: nothing was sent again."
                    },
                    "commentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The page comment of this send; null on a replay or without the page channel."
                    },
                    "replies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "messageId": {
                            "type": "string",
                            "description": "ID of the reply message",
                            "example": "conversation_msg_01jd3k8m2q5r7t9v1w3x5y7z9h"
                          },
                          "conversationId": {
                            "type": "string",
                            "description": "ID of the conversation that got the reply",
                            "example": "conversation_01jd3k8m2q5r7t9v1w3x5y7z9j"
                          }
                        },
                        "required": [
                          "messageId",
                          "conversationId"
                        ]
                      },
                      "description": "The reply of this send in each linked conversation; empty on a replay."
                    }
                  },
                  "required": [
                    "updateId",
                    "counts",
                    "replayed",
                    "commentId",
                    "replies"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see, or segment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The release is not confirmed, or the idempotency key belongs to another post",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/demand": {
      "get": {
        "operationId": "getQuillsPostDemand",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Get the demand for a post",
        "description": "Gets who asks for a post: voters, their companies and revenue (null without quills:view_revenue), the five segments with the most voters, and the importance that voters gave. Votes on live posts merged into it count too. For a merged post: the demand of the post it was merged into. Votes on boards that the caller cannot see and test customers' votes are left out. Computed at read time. Requires the `quills:read` permission; revenue also needs `quills:view_revenue`.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Post ID",
              "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
            },
            "required": true,
            "description": "Post ID",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Demand",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "voters": {
                      "type": "number",
                      "description": "Number of distinct people who voted on the post or on live posts merged into it, without test customers and votes on boards the caller cannot see",
                      "example": 37
                    },
                    "companies": {
                      "type": "number",
                      "description": "Distinct voter companies",
                      "example": 12
                    },
                    "mrrCents": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The monthly revenue of the voters' companies, in cents. Each company counts once. Null without the quills:view_revenue permission.",
                      "example": 1250000
                    },
                    "importance": {
                      "type": "object",
                      "properties": {
                        "nice": {
                          "type": "number",
                          "description": "Voters who marked the post as nice to have",
                          "example": 20
                        },
                        "important": {
                          "type": "number",
                          "description": "Voters who marked the post as important",
                          "example": 12
                        },
                        "critical": {
                          "type": "number",
                          "description": "Voters who marked the post as critical",
                          "example": 5
                        }
                      },
                      "required": [
                        "nice",
                        "important",
                        "critical"
                      ],
                      "description": "Number of voters per importance they gave. Voters who gave none are counted only in `voters`."
                    },
                    "postId": {
                      "type": "string",
                      "description": "ID of the requested post. For a merged post, the counts are those of the post it was merged into.",
                      "example": "post_03m8n0q4s6v9w1x3y5z7a9b2c4"
                    },
                    "segments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Segment ID",
                            "example": "segment_05p0q2s6v8x1y3z5a7b9c1d4e6"
                          },
                          "name": {
                            "type": "string",
                            "description": "Segment name",
                            "example": "Enterprise"
                          },
                          "voters": {
                            "type": "number",
                            "description": "Number of the post's voters in this segment",
                            "example": 9
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "voters"
                        ]
                      },
                      "description": "Up to five live segments with the most voters, most voters first, then by name"
                    }
                  },
                  "required": [
                    "voters",
                    "companies",
                    "mrrCents",
                    "importance",
                    "postId",
                    "segments"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Post not found, deleted, or on a board the caller cannot see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/feedback/revenue-at-risk": {
      "get": {
        "operationId": "getQuillsRevenueAtRisk",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Sum the revenue of companies with a critical vote on an open post",
        "description": "Sums the monthly revenue of the companies whose people gave a `critical` vote on an open post. An open post is live, not merged and has no complete or closed status. Votes count as in getQuillsPostDemand, on boards that the caller can see and without test customers. Each company counts once. Requires the `quills:read` and `quills:view_revenue` permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Revenue at risk",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "companies": {
                      "type": "number",
                      "description": "Number of distinct companies with at least one critical vote on an open post",
                      "example": 4
                    },
                    "mrrCents": {
                      "type": "number",
                      "description": "Monthly revenue in cents",
                      "example": 860000
                    }
                  },
                  "required": [
                    "companies",
                    "mrrCents"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/score": {
      "put": {
        "operationId": "setQuillsPostScore",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Set a post's RICE inputs",
        "description": "Sets the four RICE inputs (reach, impact, confidence, effort) of a post. Desired state: send all four; null clears one. The response is the updated post, whose score includes its RICE value. Requires the `quills:update` permission and a post the caller can see. Records a `post.scored` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the post to score",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "ID of the post to score",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reach": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 2147483647,
                    "description": "Reach: people or events affected in a period, 0 or more. Null clears it.",
                    "example": 1200
                  },
                  "impact": {
                    "anyOf": [
                      {
                        "type": "number",
                        "enum": [
                          0.25
                        ]
                      },
                      {
                        "type": "number",
                        "enum": [
                          0.5
                        ]
                      },
                      {
                        "type": "number",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "type": "number",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "type": "number",
                        "enum": [
                          3
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Impact on each person reached: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive. Null clears it.",
                    "example": 2
                  },
                  "confidence": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Confidence in the estimates, as a whole percent from 0 to 100. Null clears it.",
                    "example": 80
                  },
                  "effort": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0.01,
                    "maximum": 10000,
                    "description": "Effort in person-weeks, from 0.01 to 10,000. Null clears it.",
                    "example": 3
                  }
                },
                "required": [
                  "reach",
                  "impact",
                  "confidence",
                  "effort"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "boardId": {
                      "type": "string",
                      "description": "ID of the board the post belongs to",
                      "example": "board_01jd3k9p4s6v8x0z2b4d6f8h0j"
                    },
                    "title": {
                      "type": "string",
                      "description": "Post title",
                      "example": "Export reports to CSV"
                    },
                    "content": {
                      "type": "string",
                      "description": "Post body text",
                      "example": "We need to share weekly numbers with finance in a spreadsheet."
                    },
                    "statusId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post's status; null when the post has no status",
                      "example": "post_status_01jd3kb2c4e6g8j0m2p4r6t8v0"
                    },
                    "principalId": {
                      "type": "string",
                      "description": "Principal ID of the author: the customer or teammate the post is attributed to",
                      "example": "principal_01jd3kc5f7h9k1n3q5s7v9x1z3"
                    },
                    "authorName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name of the author; null when the author has none",
                      "example": "Ada Park"
                    },
                    "authorAvatarUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Avatar image URL of the author; null when the author has none",
                      "example": "https://example.com/avatars/ada.png"
                    },
                    "ownerPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Principal ID of the teammate who owns the post; null when unassigned",
                      "example": "principal_01jd3kd8j0m2p4r6t8w0y2a4c6"
                    },
                    "voteCount": {
                      "type": "number",
                      "description": "Number of votes on the post",
                      "example": 42
                    },
                    "commentCount": {
                      "type": "number",
                      "description": "Number of comments on the post",
                      "example": 7
                    },
                    "pinnedCommentId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the comment pinned as the official response; null when none is pinned",
                      "example": "post_comment_01jd3kf1m3p5r7t9w1y3a5c7e9"
                    },
                    "isCommentsLocked": {
                      "type": "boolean",
                      "description": "Whether the thread is locked: customers cannot comment, teammates still can"
                    },
                    "isHidden": {
                      "type": "boolean",
                      "description": "Hidden from the board: only the author and the team see it"
                    },
                    "moderationState": {
                      "type": "string",
                      "description": "Moderation state. `published`: live on its board. `pending`: waits for review; a rejected post stays `pending` and gets `deletedAt`. `archived`: hidden from the board, so only the team sees it. `spam`, `closed`, `deleted`: other stored states, for example from an import.",
                      "example": "published"
                    },
                    "canonicalPostId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ID of the post this post was merged into; null when the post is not merged",
                      "example": null
                    },
                    "eta": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Target ship date, shown at month granularity on time-based roadmaps; null when not set",
                      "example": "2027-03-01T00:00:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was created",
                      "example": "2026-11-18T14:32:05.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the post was last changed",
                      "example": "2026-11-20T09:15:42.000Z"
                    },
                    "deletedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the post was deleted; null for a post that is not deleted",
                      "example": null
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Tag ID",
                            "example": "post_tag_01jd3kg4p6r8t0w2y4a6c8e0g2"
                          },
                          "name": {
                            "type": "string",
                            "description": "Tag name",
                            "example": "Reporting"
                          },
                          "color": {
                            "type": "string",
                            "description": "Tag color as a `#RRGGBB` hex code",
                            "example": "#3b82f6"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ]
                      },
                      "description": "Active tags on the post, sorted by name; deleted tags are left out"
                    },
                    "customFields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string",
                            "description": "Key of the board's custom field",
                            "example": "plan_tier"
                          },
                          "value": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "A text, select or date (YYYY-MM-DD) string, a number, or a checkbox boolean; null for multi-select"
                          },
                          "values": {
                            "type": [
                              "array",
                              "null"
                            ],
                            "items": {
                              "type": "string"
                            },
                            "description": "The chosen options of a multi-select field; null for other types"
                          }
                        },
                        "required": [
                          "key",
                          "value",
                          "values"
                        ]
                      },
                      "description": "The post's values of its board's custom fields, internal fields included, in the board's order"
                    },
                    "score": {
                      "type": "object",
                      "properties": {
                        "reach": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE reach: people or events in a period, 0 or more; null when not set",
                          "example": 500
                        },
                        "impact": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE impact: 0.25 minimal, 0.5 low, 1 medium, 2 high, 3 massive; null when not set",
                          "example": 2
                        },
                        "confidence": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE confidence as a percentage, 0 to 100; null when not set",
                          "example": 80
                        },
                        "effort": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "RICE effort in person-weeks, above 0 and at most 10000; null when not set",
                          "example": 4
                        },
                        "rice": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "reach × impact × confidence ÷ 100 ÷ effort. Null when an input is missing.",
                          "example": 200
                        }
                      },
                      "required": [
                        "reach",
                        "impact",
                        "confidence",
                        "effort",
                        "rice"
                      ],
                      "description": "RICE scoring inputs and the computed RICE score"
                    },
                    "factorValues": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "ID of the team's scoring factor: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "Stored value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values (0 to 10) by scoring factor ID. Only the team's current factors count toward the score."
                    }
                  },
                  "required": [
                    "id",
                    "boardId",
                    "title",
                    "content",
                    "statusId",
                    "principalId",
                    "authorName",
                    "authorAvatarUrl",
                    "ownerPrincipalId",
                    "voteCount",
                    "commentCount",
                    "pinnedCommentId",
                    "isCommentsLocked",
                    "isHidden",
                    "moderationState",
                    "canonicalPostId",
                    "eta",
                    "createdAt",
                    "updatedAt",
                    "deletedAt",
                    "tags",
                    "customFields",
                    "score",
                    "factorValues"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post with this ID that the caller can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/feedback/scoring-factors": {
      "get": {
        "operationId": "getQuillsScoringFactors",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "List the team's scoring factors",
        "description": "Lists the team's scoring factors. Each factor has an ID, a name and a weight from -10 to 10 (negative for a cost such as effort). A post's score is the sum of weight × its value for the factor. A stored list that is not valid reads as empty. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The scoring factors",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "factors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-z0-9]{1,16}$",
                            "description": "Scoring factor ID: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60,
                            "description": "Factor name. Leading and trailing spaces are removed.",
                            "example": "Impact"
                          },
                          "weight": {
                            "type": "integer",
                            "minimum": -10,
                            "maximum": 10,
                            "description": "Whole-number weight from -10 to 10, never 0. A negative weight marks a cost, such as effort.",
                            "example": 3
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "weight"
                        ]
                      },
                      "description": "The team's scoring factors, up to 10, in their saved order. Empty when none are set."
                    }
                  },
                  "required": [
                    "factors"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "setQuillsScoringFactors",
        "tags": [
          "Reporting and insights"
        ],
        "summary": "Replace the team's scoring factors",
        "description": "Replaces the team's scoring factors with the list sent (desired state, up to 10 factors). Send a stored factor's ID to keep the values that posts have for it; a factor without a stored ID gets a new one, so a removed factor's values never count again. Requires the `quills:manage_settings` permission. Records a `settings.scoring_updated` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "factors": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-z0-9]{1,16}$",
                          "description": "ID of a stored factor to keep, with its post values. Omit it, or send an unknown ID, to create a new factor with a new ID.",
                          "example": "a1b2c3d4e5f6"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60,
                          "description": "Factor name. Leading and trailing spaces are removed.",
                          "example": "Impact"
                        },
                        "weight": {
                          "type": "integer",
                          "minimum": -10,
                          "maximum": 10,
                          "description": "Whole-number weight from -10 to 10, never 0. A negative weight marks a cost, such as effort.",
                          "example": 3
                        }
                      },
                      "required": [
                        "name",
                        "weight"
                      ]
                    },
                    "maxItems": 10,
                    "description": "The complete new list of factors, up to 10, in display order. An empty list removes every factor."
                  }
                },
                "required": [
                  "factors"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved scoring factors",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "factors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[a-z0-9]{1,16}$",
                            "description": "Scoring factor ID: 1 to 16 lowercase letters or digits",
                            "example": "a1b2c3d4e5f6"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60,
                            "description": "Factor name. Leading and trailing spaces are removed.",
                            "example": "Impact"
                          },
                          "weight": {
                            "type": "integer",
                            "minimum": -10,
                            "maximum": 10,
                            "description": "Whole-number weight from -10 to 10, never 0. A negative weight marks a cost, such as effort.",
                            "example": 3
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "weight"
                        ]
                      },
                      "description": "The team's scoring factors, up to 10, in their saved order. Empty when none are set."
                    }
                  },
                  "required": [
                    "factors"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid factors: two factors share an ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/factor-scores": {
      "put": {
        "operationId": "setQuillsPostFactorScores",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Set a post's values for the team's scoring factors",
        "description": "Sets a post's values for the team's scoring factors. Each value names a factor ID and is 0 to 10; null clears it. Values that are not sent stay. Values of removed factors are dropped. Only the post's ranking changes: no linked task changes. Requires the `quills:update` permission and a post the caller can see. Records a `post.scored` event.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the post to score",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "ID of the post to score",
            "name": "postId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "values": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "factorId": {
                          "type": "string",
                          "pattern": "^[a-z0-9]{1,16}$",
                          "description": "Scoring factor ID: 1 to 16 lowercase letters or digits",
                          "example": "a1b2c3d4e5f6"
                        },
                        "value": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "minimum": 0,
                          "maximum": 10,
                          "description": "Whole-number value from 0 to 10 for this factor. Null clears the post's value for it.",
                          "example": 7
                        }
                      },
                      "required": [
                        "factorId",
                        "value"
                      ]
                    },
                    "maxItems": 10,
                    "description": "Values to change, up to 10, one per factor. Every factor ID must be one of the team's factors."
                  }
                },
                "required": [
                  "values"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The post's factor values and score",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "Post ID",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "factorId": {
                            "type": "string",
                            "description": "Scoring factor ID",
                            "example": "a1b2c3d4e5f6"
                          },
                          "value": {
                            "type": "number",
                            "description": "The post's value for the factor, 0 to 10",
                            "example": 7
                          }
                        },
                        "required": [
                          "factorId",
                          "value"
                        ]
                      },
                      "description": "The post's stored values for current factors after the change. Factors without a value are left out."
                    },
                    "score": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "The post's team score: the sum of weight × value over its factor values. Null when it has no value for any factor.",
                      "example": 21
                    }
                  },
                  "required": [
                    "postId",
                    "values",
                    "score"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A value names a factor ID that is not one of the team's factors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post with this ID that the caller can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/posts/{postId}/summary": {
      "post": {
        "operationId": "summarizeQuillsPost",
        "tags": [
          "Feedback boards"
        ],
        "summary": "Summarize a feedback post and its comments with AI",
        "description": "Asks the instance's configured AI provider for a short summary of a post for the teammate: what is asked, why, and what is still open, in at most five sentences. It reads the post's title, board and details and its newest 30 comments that are not deleted, private notes included. Saves nothing and records no event; the AI usage log row is its record. Requires the `quills:read` permission and a post the caller can see.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the post to summarize",
              "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "ID of the post to summarize",
            "name": "postId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The summary for review",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "description": "ID of the summarized post",
                      "example": "post_01jd3k8m2q5r7t9v1w3x5y7z9a"
                    },
                    "summary": {
                      "type": "string",
                      "description": "Summary in plain text, up to 2,000 characters",
                      "example": "Customers want to export a board to CSV to share it with finance. Two teams need it monthly. Still open: whether comments are included."
                    }
                  },
                  "required": [
                    "postId",
                    "summary"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No post with this ID that the caller can see",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "AI is not configured on this instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The AI provider timed out, was busy, rejected the request, could not be reached or returned an unusable answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/quills/{workspaceId}/privacy/retention-policies": {
      "get": {
        "operationId": "listQuillsRetentionPolicies",
        "tags": [
          "Privacy and audit"
        ],
        "summary": "List workspace retention schedules",
        "description": "Lists the workspace's retention schedules, one per channel at most, ordered by channel. Channels without an explicit override inherit from the `all` policy when configured. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Configured retention schedules",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The retention schedule ID.",
                            "example": "retention_policy_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "channel": {
                            "type": "string",
                            "enum": [
                              "all",
                              "messenger",
                              "email",
                              "widget",
                              "ticket"
                            ],
                            "description": "The channel the schedule covers. `all`: the default for every channel without its own schedule. `messenger`: chat conversations that did not start in the widget. `widget`: chat conversations that started in the widget. `email`: email conversations. `ticket`: stored, but closed-conversation retention currently runs only for `messenger`, `widget` and `email`.",
                            "example": "all"
                          },
                          "action": {
                            "type": "string",
                            "enum": [
                              "delete",
                              "anonymize"
                            ],
                            "description": "What happens to closed conversations past `closedAfterDays`. `delete`: the conversation, its messages and their attachments are permanently deleted; daily reporting totals are kept. `anonymize`: message content and the subject are replaced with a redaction notice; attachments, translations and summaries are deleted; the conversation's customer becomes a deleted-user placeholder, and its email, CSAT comment and custom attributes are cleared.",
                            "example": "anonymize"
                          },
                          "closedAfterDays": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Days after a closed, non-spam conversation was resolved (or last updated) before `action` applies to it. Null: closed conversations on this channel are kept, unless the `all` schedule sets a value.",
                            "example": 365
                          },
                          "spamAfterDays": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Days after a conversation closed as spam was resolved before it is permanently deleted. Applies workspace-wide: the `all` schedule's value wins, otherwise the first schedule that sets one. Null: no spam deletion from this schedule.",
                            "example": 30
                          },
                          "softDeletedAfterDays": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Days after a message, post comment or post was soft-deleted before it is permanently deleted. Applies workspace-wide like `spamAfterDays`. Null: no purge from this schedule.",
                            "example": 30
                          },
                          "aiLogsAfterDays": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "Days to keep AI assistant tool calls, assistant events and cached message translations before they are deleted. Applies workspace-wide like `spamAfterDays`. Null: no purge from this schedule.",
                            "example": 90
                          },
                          "updatedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The teammate principal who last saved the schedule. Null when unknown.",
                            "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the schedule was first saved.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the schedule was last saved.",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "channel",
                          "action",
                          "closedAfterDays",
                          "spamAfterDays",
                          "softDeletedAfterDays",
                          "aiLogsAfterDays",
                          "updatedByPrincipalId",
                          "createdAt",
                          "updatedAt"
                        ]
                      },
                      "description": "The saved schedules, ordered by channel."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "upsertQuillsRetentionPolicy",
        "tags": [
          "Privacy and audit"
        ],
        "summary": "Create or update a retention schedule for a channel",
        "description": "Creates the channel's schedule or replaces it: each channel has at most one. Configures automatic retention enforcement for closed conversations, spam, soft-deleted records, and AI logs. Null values disable that category. A periodic background sweep applies the schedules in bounded batches, so a large backlog clears over several runs; the deletions and redactions it makes are permanent. Records a `privacy.retention_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "channel": {
                    "type": "string",
                    "enum": [
                      "all",
                      "messenger",
                      "email",
                      "widget",
                      "ticket"
                    ],
                    "description": "The channel the schedule covers. `all`: the default for every channel without its own schedule. `messenger`: chat conversations that did not start in the widget. `widget`: chat conversations that started in the widget. `email`: email conversations. `ticket`: stored, but closed-conversation retention currently runs only for `messenger`, `widget` and `email`.",
                    "example": "all"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "delete",
                      "anonymize"
                    ],
                    "description": "What happens to closed conversations past `closedAfterDays`. `delete`: the conversation, its messages and their attachments are permanently deleted; daily reporting totals are kept. `anonymize`: message content and the subject are replaced with a redaction notice; attachments, translations and summaries are deleted; the conversation's customer becomes a deleted-user placeholder, and its email, CSAT comment and custom attributes are cleared.",
                    "example": "anonymize"
                  },
                  "closedAfterDays": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 3650,
                    "default": null,
                    "description": "Days after a closed, non-spam conversation was resolved (or last updated) before `action` applies to it. Null: closed conversations on this channel are kept, unless the `all` schedule sets a value. Default null.",
                    "example": 365
                  },
                  "spamAfterDays": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 3650,
                    "default": null,
                    "description": "Days after a conversation closed as spam was resolved before it is permanently deleted. Applies workspace-wide: the `all` schedule's value wins, otherwise the first schedule that sets one. Null: no spam deletion from this schedule. Default null.",
                    "example": 30
                  },
                  "softDeletedAfterDays": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 3650,
                    "default": null,
                    "description": "Days after a message, post comment or post was soft-deleted before it is permanently deleted. Applies workspace-wide like `spamAfterDays`. Null: no purge from this schedule. Default null.",
                    "example": 30
                  },
                  "aiLogsAfterDays": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 1,
                    "maximum": 3650,
                    "default": null,
                    "description": "Days to keep AI assistant tool calls, assistant events and cached message translations before they are deleted. Applies workspace-wide like `spamAfterDays`. Null: no purge from this schedule. Default null.",
                    "example": 90
                  }
                },
                "required": [
                  "channel",
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved retention schedule",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The retention schedule ID.",
                      "example": "retention_policy_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "all",
                        "messenger",
                        "email",
                        "widget",
                        "ticket"
                      ],
                      "description": "The channel the schedule covers. `all`: the default for every channel without its own schedule. `messenger`: chat conversations that did not start in the widget. `widget`: chat conversations that started in the widget. `email`: email conversations. `ticket`: stored, but closed-conversation retention currently runs only for `messenger`, `widget` and `email`.",
                      "example": "all"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "delete",
                        "anonymize"
                      ],
                      "description": "What happens to closed conversations past `closedAfterDays`. `delete`: the conversation, its messages and their attachments are permanently deleted; daily reporting totals are kept. `anonymize`: message content and the subject are replaced with a redaction notice; attachments, translations and summaries are deleted; the conversation's customer becomes a deleted-user placeholder, and its email, CSAT comment and custom attributes are cleared.",
                      "example": "anonymize"
                    },
                    "closedAfterDays": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Days after a closed, non-spam conversation was resolved (or last updated) before `action` applies to it. Null: closed conversations on this channel are kept, unless the `all` schedule sets a value.",
                      "example": 365
                    },
                    "spamAfterDays": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Days after a conversation closed as spam was resolved before it is permanently deleted. Applies workspace-wide: the `all` schedule's value wins, otherwise the first schedule that sets one. Null: no spam deletion from this schedule.",
                      "example": 30
                    },
                    "softDeletedAfterDays": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Days after a message, post comment or post was soft-deleted before it is permanently deleted. Applies workspace-wide like `spamAfterDays`. Null: no purge from this schedule.",
                      "example": 30
                    },
                    "aiLogsAfterDays": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Days to keep AI assistant tool calls, assistant events and cached message translations before they are deleted. Applies workspace-wide like `spamAfterDays`. Null: no purge from this schedule.",
                      "example": 90
                    },
                    "updatedByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The teammate principal who last saved the schedule. Null when unknown.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the schedule was first saved.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the schedule was last saved.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "channel",
                    "action",
                    "closedAfterDays",
                    "spamAfterDays",
                    "softDeletedAfterDays",
                    "aiLogsAfterDays",
                    "updatedByPrincipalId",
                    "createdAt",
                    "updatedAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/privacy/retention-policies/{policyId}": {
      "delete": {
        "operationId": "deleteQuillsRetentionPolicy",
        "tags": [
          "Privacy and audit"
        ],
        "summary": "Remove a retention schedule",
        "description": "Deletes the schedule; data it already removed stays removed. A channel schedule's removal makes the channel fall back to the `all` schedule, if any. Records a `privacy.retention_updated` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The retention schedule ID.",
              "example": "retention_policy_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The retention schedule ID.",
            "name": "policyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Removed retention schedule",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The removed schedule's ID.",
                      "example": "retention_policy_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "channel": {
                      "type": "string",
                      "enum": [
                        "all",
                        "messenger",
                        "email",
                        "widget",
                        "ticket"
                      ],
                      "description": "The channel the removed schedule covered.",
                      "example": "email"
                    }
                  },
                  "required": [
                    "id",
                    "channel"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No retention schedule with this ID exists in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/privacy/erasure": {
      "post": {
        "operationId": "eraseQuillsCustomer",
        "tags": [
          "Privacy and audit"
        ],
        "summary": "Erase a customer's personal data",
        "description": "Erases one customer in a single transaction and returns a compliance receipt that holds no personal data. Deletes the customer's files, conversation summaries, translations and knowledge sources, reactions, mentions, notification preferences, in-app notifications, subscriptions, devices, segment and tag assignments, survey responses, help center article feedback, AI assistant logs, email logs, and finally the customer's principal and sign-in identity. Tickets they requested lose their requester and have their title redacted. Conversations, posts, comments and votes are anonymized or deleted according to `mode`. Teammates cannot be erased this way. The erasure cannot be undone. Records a `privacy.customer_erased` event. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "principalId": {
                    "type": "string",
                    "description": "The customer principal to erase.",
                    "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "anonymize",
                      "delete"
                    ],
                    "default": "anonymize",
                    "description": "How the customer's records were erased. `anonymize`: conversations, posts, comments and votes stay, re-attributed to a deleted-user placeholder, with their text replaced by a redaction notice. `delete`: the customer's conversations, posts, comments and votes are permanently deleted; daily reporting totals are kept. Default `anonymize`.",
                    "example": "anonymize"
                  }
                },
                "required": [
                  "principalId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Non-PII compliance receipt for the erased customer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requestId": {
                      "type": "string",
                      "description": "The ID of the privacy request that keeps this receipt; read it again with `getQuillsPrivacyRequest`.",
                      "example": "privacy_request_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "anonymize",
                        "delete"
                      ],
                      "description": "How the customer's records were erased. `anonymize`: conversations, posts, comments and votes stay, re-attributed to a deleted-user placeholder, with their text replaced by a redaction notice. `delete`: the customer's conversations, posts, comments and votes are permanently deleted; daily reporting totals are kept.",
                      "example": "anonymize"
                    },
                    "subjectDigest": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "A SHA-256 hex digest of the erased customer's trimmed, lowercased email address. Null when the customer had no email address.",
                      "example": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "completed"
                      ],
                      "description": "Always `completed`: the erasure ran in this request.",
                      "example": "completed"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "anonymize",
                            "delete"
                          ],
                          "description": "Erasures only. How the customer's records were erased. `anonymize`: conversations, posts, comments and votes stay, re-attributed to a deleted-user placeholder, with their text replaced by a redaction notice. `delete`: the customer's conversations, posts, comments and votes are permanently deleted; daily reporting totals are kept.",
                          "example": "anonymize"
                        },
                        "conversations": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Conversations the customer started. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 4
                        },
                        "messages": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Conversation messages by the customer or in their conversations (an access export leaves out internal notes). For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 37
                        },
                        "files": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Files the customer uploaded or that their messages hold. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 3
                        },
                        "posts": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Feedback posts by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 2
                        },
                        "comments": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Post comments by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 5
                        },
                        "votes": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Post votes by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 11
                        },
                        "tickets": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Tickets the customer requested. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 1
                        },
                        "surveyResponses": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Survey responses by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 2
                        },
                        "aiLogs": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Erasures only: AI assistant tool calls and events about the customer or their conversations that were deleted.",
                          "example": 12
                        },
                        "emailLogs": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Erasures only: email log entries for the customer that were deleted.",
                          "example": 6
                        },
                        "subscriptions": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Post, ticket, changelog and status page subscriptions of the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 3
                        },
                        "exportBytes": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Completed access exports only: the archive size in bytes.",
                          "example": 204800
                        },
                        "attachmentCount": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Completed access exports only: attachments included in the archive. Files over 10 MB, and files past a 25 MB total, are left out.",
                          "example": 3
                        }
                      },
                      "description": "Counts of the records erased or anonymized."
                    },
                    "completedAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the erasure finished.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the receipt was recorded.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "requestId",
                    "mode",
                    "subjectDigest",
                    "status",
                    "summary",
                    "completedAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No principal with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The principal is a teammate; teammates are managed through workspace membership",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/privacy/erasure/by-external-id": {
      "post": {
        "operationId": "eraseQuillsCustomerByExternalId",
        "tags": [
          "Privacy and audit"
        ],
        "summary": "Erase a customer's personal data across Quills by host externalId",
        "description": "Requires quills:manage_settings. Resolves the workspace-scoped customer by externalId in a single locked transaction and erases all PII, sessions, and exports. Set idempotent: true for background worker retries so missing/already-erased subjects return 200 already_erased without creating duplicate receipts.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "anonymize",
                      "delete"
                    ],
                    "default": "anonymize"
                  },
                  "idempotent": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "externalId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Non-PII compliance receipt or already_erased status when idempotent: true",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requestId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "anonymize",
                        "delete"
                      ]
                    },
                    "subjectDigest": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "already_erased"
                      ]
                    },
                    "summary": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "anonymize",
                            "delete"
                          ],
                          "description": "Erasures only. How the customer's records were erased. `anonymize`: conversations, posts, comments and votes stay, re-attributed to a deleted-user placeholder, with their text replaced by a redaction notice. `delete`: the customer's conversations, posts, comments and votes are permanently deleted; daily reporting totals are kept.",
                          "example": "anonymize"
                        },
                        "conversations": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Conversations the customer started. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 4
                        },
                        "messages": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Conversation messages by the customer or in their conversations (an access export leaves out internal notes). For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 37
                        },
                        "files": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Files the customer uploaded or that their messages hold. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 3
                        },
                        "posts": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Feedback posts by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 2
                        },
                        "comments": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Post comments by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 5
                        },
                        "votes": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Post votes by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 11
                        },
                        "tickets": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Tickets the customer requested. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 1
                        },
                        "surveyResponses": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Survey responses by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 2
                        },
                        "aiLogs": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Erasures only: AI assistant tool calls and events about the customer or their conversations that were deleted.",
                          "example": 12
                        },
                        "emailLogs": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Erasures only: email log entries for the customer that were deleted.",
                          "example": 6
                        },
                        "subscriptions": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Post, ticket, changelog and status page subscriptions of the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 3
                        },
                        "exportBytes": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Completed access exports only: the archive size in bytes.",
                          "example": 204800
                        },
                        "attachmentCount": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Completed access exports only: attachments included in the archive. Files over 10 MB, and files past a 25 MB total, are left out.",
                          "example": 3
                        }
                      }
                    },
                    "completedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Date and time in ISO 8601 format, in UTC, or null when unset.",
                      "example": "2026-03-14T09:26:53.589Z"
                    },
                    "createdAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "Date and time in ISO 8601 format, in UTC, or null when unset.",
                      "example": "2026-03-14T09:26:53.589Z"
                    }
                  },
                  "required": [
                    "requestId",
                    "mode",
                    "subjectDigest",
                    "status",
                    "summary",
                    "completedAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Customer not found (when idempotent is false)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Teammates, service accounts, and system tombstones cannot be erased",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/privacy/access-requests": {
      "post": {
        "operationId": "createQuillsPrivacyAccessRequest",
        "tags": [
          "Privacy and audit"
        ],
        "summary": "Start a single-customer data access/portability export",
        "description": "Queues a background ZIP export containing the customer's profile, posts, comments, votes, conversations, non-internal messages, attachments, tickets, survey responses, and subscriptions. The archive holds data.json and the attachment files: files over 10 MB, and files past a 25 MB total, are left out. Records a `privacy.access_requested` event; a background job builds the archive after commit. Poll `getQuillsPrivacyRequest`, then get a URL from `downloadQuillsPrivacyAccessRequest`; the archive stays available for 7 days. Each call queues a new export. Requires the `manage_settings` permission and configured file storage.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "principalId": {
                    "type": "string",
                    "description": "The customer principal whose data to export.",
                    "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                  }
                },
                "required": [
                  "principalId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The queued access request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The privacy request ID.",
                          "example": "privacy_request_01m8rxfrbhfzr9r837k90wcggm"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "erasure",
                            "access"
                          ],
                          "description": "`erasure`: a completed customer erasure, kept as a compliance receipt. `access`: a data access (portability) export of one customer.",
                          "example": "access"
                        },
                        "mode": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "anonymize",
                            "delete",
                            null
                          ],
                          "description": "How the customer's records were erased. `anonymize`: conversations, posts, comments and votes stay, re-attributed to a deleted-user placeholder, with their text replaced by a redaction notice. `delete`: the customer's conversations, posts, comments and votes are permanently deleted; daily reporting totals are kept. Null for access requests.",
                          "example": null
                        },
                        "subjectPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The customer principal the request is about. Null for erasures, whose receipt keeps no link to the erased customer, and once the principal has been deleted.",
                          "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                        },
                        "subjectDigest": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "A SHA-256 hex digest of the customer's trimmed, lowercased email address at the time of the request, so an operator can confirm which address a request covered without storing it. Null when the customer had no email address.",
                          "example": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "running",
                            "completed",
                            "failed"
                          ],
                          "description": "`pending`: queued. `running`: the export is being built. `completed`: done; an access export is downloadable until `exportExpiresAt`. `failed`: `error` says why. Erasures are always `completed`.",
                          "example": "completed"
                        },
                        "requestedByPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The principal who made the request: a teammate, or the customer for a portal self-export. Null when unknown or deleted.",
                          "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                        },
                        "summary": {
                          "type": "object",
                          "properties": {
                            "mode": {
                              "type": "string",
                              "enum": [
                                "anonymize",
                                "delete"
                              ],
                              "description": "Erasures only. How the customer's records were erased. `anonymize`: conversations, posts, comments and votes stay, re-attributed to a deleted-user placeholder, with their text replaced by a redaction notice. `delete`: the customer's conversations, posts, comments and votes are permanently deleted; daily reporting totals are kept.",
                              "example": "anonymize"
                            },
                            "conversations": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Conversations the customer started. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                              "example": 4
                            },
                            "messages": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Conversation messages by the customer or in their conversations (an access export leaves out internal notes). For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                              "example": 37
                            },
                            "files": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Files the customer uploaded or that their messages hold. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                              "example": 3
                            },
                            "posts": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Feedback posts by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                              "example": 2
                            },
                            "comments": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Post comments by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                              "example": 5
                            },
                            "votes": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Post votes by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                              "example": 11
                            },
                            "tickets": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Tickets the customer requested. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                              "example": 1
                            },
                            "surveyResponses": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Survey responses by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                              "example": 2
                            },
                            "aiLogs": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Erasures only: AI assistant tool calls and events about the customer or their conversations that were deleted.",
                              "example": 12
                            },
                            "emailLogs": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Erasures only: email log entries for the customer that were deleted.",
                              "example": 6
                            },
                            "subscriptions": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Post, ticket, changelog and status page subscriptions of the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                              "example": 3
                            },
                            "exportBytes": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Completed access exports only: the archive size in bytes.",
                              "example": 204800
                            },
                            "attachmentCount": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Completed access exports only: attachments included in the archive. Files over 10 MB, and files past a 25 MB total, are left out.",
                              "example": 3
                            }
                          },
                          "description": "Counts of what the request erased or exported."
                        },
                        "exportFileName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Access requests only: the ZIP file name. Null for erasures.",
                          "example": "privacy-export-acme-2026-11-30.zip"
                        },
                        "exportExpiresAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When a completed access export stops being downloadable: 7 days after it completed. Null otherwise.",
                          "example": "2026-12-07T14:05:00.000Z"
                        },
                        "error": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Why the request failed. Null unless `status` is `failed`.",
                          "example": null
                        },
                        "completedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the request completed. Null until then.",
                          "example": "2026-11-30T14:05:00.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the request was made.",
                          "example": "2026-11-30T14:05:00.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "mode",
                        "subjectPrincipalId",
                        "subjectDigest",
                        "status",
                        "requestedByPrincipalId",
                        "summary",
                        "exportFileName",
                        "exportExpiresAt",
                        "error",
                        "completedAt",
                        "createdAt"
                      ],
                      "description": "The new access request, in `pending` status."
                    }
                  },
                  "required": [
                    "request"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No principal with this ID exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/privacy/requests": {
      "get": {
        "operationId": "listQuillsPrivacyRequests",
        "tags": [
          "Privacy and audit"
        ],
        "summary": "List privacy erasure and access requests",
        "description": "Lists the workspace's privacy requests, newest first, up to `limit`, including portal self-exports. Not paginated. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "erasure",
                "access"
              ],
              "description": "Only requests of this type: `erasure` receipts or `access` exports. Leave it out for both.",
              "example": "access"
            },
            "required": false,
            "description": "Only requests of this type: `erasure` receipts or `access` exports. Leave it out for both.",
            "name": "type",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30,
              "description": "The maximum number of requests to return. Default 30.",
              "example": 30
            },
            "required": false,
            "description": "The maximum number of requests to return. Default 30.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Recent privacy requests and compliance receipts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The privacy request ID.",
                            "example": "privacy_request_01m8rxfrbhfzr9r837k90wcggm"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "erasure",
                              "access"
                            ],
                            "description": "`erasure`: a completed customer erasure, kept as a compliance receipt. `access`: a data access (portability) export of one customer.",
                            "example": "access"
                          },
                          "mode": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "anonymize",
                              "delete",
                              null
                            ],
                            "description": "How the customer's records were erased. `anonymize`: conversations, posts, comments and votes stay, re-attributed to a deleted-user placeholder, with their text replaced by a redaction notice. `delete`: the customer's conversations, posts, comments and votes are permanently deleted; daily reporting totals are kept. Null for access requests.",
                            "example": null
                          },
                          "subjectPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The customer principal the request is about. Null for erasures, whose receipt keeps no link to the erased customer, and once the principal has been deleted.",
                            "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                          },
                          "subjectDigest": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "A SHA-256 hex digest of the customer's trimmed, lowercased email address at the time of the request, so an operator can confirm which address a request covered without storing it. Null when the customer had no email address.",
                            "example": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "running",
                              "completed",
                              "failed"
                            ],
                            "description": "`pending`: queued. `running`: the export is being built. `completed`: done; an access export is downloadable until `exportExpiresAt`. `failed`: `error` says why. Erasures are always `completed`.",
                            "example": "completed"
                          },
                          "requestedByPrincipalId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "The principal who made the request: a teammate, or the customer for a portal self-export. Null when unknown or deleted.",
                            "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                          },
                          "summary": {
                            "type": "object",
                            "properties": {
                              "mode": {
                                "type": "string",
                                "enum": [
                                  "anonymize",
                                  "delete"
                                ],
                                "description": "Erasures only. How the customer's records were erased. `anonymize`: conversations, posts, comments and votes stay, re-attributed to a deleted-user placeholder, with their text replaced by a redaction notice. `delete`: the customer's conversations, posts, comments and votes are permanently deleted; daily reporting totals are kept.",
                                "example": "anonymize"
                              },
                              "conversations": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Conversations the customer started. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                                "example": 4
                              },
                              "messages": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Conversation messages by the customer or in their conversations (an access export leaves out internal notes). For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                                "example": 37
                              },
                              "files": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Files the customer uploaded or that their messages hold. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                                "example": 3
                              },
                              "posts": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Feedback posts by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                                "example": 2
                              },
                              "comments": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Post comments by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                                "example": 5
                              },
                              "votes": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Post votes by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                                "example": 11
                              },
                              "tickets": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Tickets the customer requested. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                                "example": 1
                              },
                              "surveyResponses": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Survey responses by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                                "example": 2
                              },
                              "aiLogs": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Erasures only: AI assistant tool calls and events about the customer or their conversations that were deleted.",
                                "example": 12
                              },
                              "emailLogs": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Erasures only: email log entries for the customer that were deleted.",
                                "example": 6
                              },
                              "subscriptions": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Post, ticket, changelog and status page subscriptions of the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                                "example": 3
                              },
                              "exportBytes": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Completed access exports only: the archive size in bytes.",
                                "example": 204800
                              },
                              "attachmentCount": {
                                "type": "integer",
                                "minimum": 0,
                                "description": "Completed access exports only: attachments included in the archive. Files over 10 MB, and files past a 25 MB total, are left out.",
                                "example": 3
                              }
                            },
                            "description": "Counts of what the request erased or exported."
                          },
                          "exportFileName": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Access requests only: the ZIP file name. Null for erasures.",
                            "example": "privacy-export-acme-2026-11-30.zip"
                          },
                          "exportExpiresAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When a completed access export stops being downloadable: 7 days after it completed. Null otherwise.",
                            "example": "2026-12-07T14:05:00.000Z"
                          },
                          "error": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Why the request failed. Null unless `status` is `failed`.",
                            "example": null
                          },
                          "completedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the request completed. Null until then.",
                            "example": "2026-11-30T14:05:00.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the request was made.",
                            "example": "2026-11-30T14:05:00.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "mode",
                          "subjectPrincipalId",
                          "subjectDigest",
                          "status",
                          "requestedByPrincipalId",
                          "summary",
                          "exportFileName",
                          "exportExpiresAt",
                          "error",
                          "completedAt",
                          "createdAt"
                        ]
                      },
                      "description": "The privacy requests, newest first."
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/privacy/requests/{requestId}": {
      "get": {
        "operationId": "getQuillsPrivacyRequest",
        "tags": [
          "Privacy and audit"
        ],
        "summary": "Get one privacy request",
        "description": "Returns one erasure receipt or access request with its status and counts. Poll it after `createQuillsPrivacyAccessRequest` until `status` is `completed` or `failed`. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The privacy request ID.",
              "example": "privacy_request_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The privacy request ID.",
            "name": "requestId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Privacy request details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The privacy request ID.",
                      "example": "privacy_request_01m8rxfrbhfzr9r837k90wcggm"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "erasure",
                        "access"
                      ],
                      "description": "`erasure`: a completed customer erasure, kept as a compliance receipt. `access`: a data access (portability) export of one customer.",
                      "example": "access"
                    },
                    "mode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "anonymize",
                        "delete",
                        null
                      ],
                      "description": "How the customer's records were erased. `anonymize`: conversations, posts, comments and votes stay, re-attributed to a deleted-user placeholder, with their text replaced by a redaction notice. `delete`: the customer's conversations, posts, comments and votes are permanently deleted; daily reporting totals are kept. Null for access requests.",
                      "example": null
                    },
                    "subjectPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The customer principal the request is about. Null for erasures, whose receipt keeps no link to the erased customer, and once the principal has been deleted.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "subjectDigest": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "A SHA-256 hex digest of the customer's trimmed, lowercased email address at the time of the request, so an operator can confirm which address a request covered without storing it. Null when the customer had no email address.",
                      "example": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "running",
                        "completed",
                        "failed"
                      ],
                      "description": "`pending`: queued. `running`: the export is being built. `completed`: done; an access export is downloadable until `exportExpiresAt`. `failed`: `error` says why. Erasures are always `completed`.",
                      "example": "completed"
                    },
                    "requestedByPrincipalId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The principal who made the request: a teammate, or the customer for a portal self-export. Null when unknown or deleted.",
                      "example": "principal_01m8rxfrbhfzr9r84aes8ej5z4"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "anonymize",
                            "delete"
                          ],
                          "description": "Erasures only. How the customer's records were erased. `anonymize`: conversations, posts, comments and votes stay, re-attributed to a deleted-user placeholder, with their text replaced by a redaction notice. `delete`: the customer's conversations, posts, comments and votes are permanently deleted; daily reporting totals are kept.",
                          "example": "anonymize"
                        },
                        "conversations": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Conversations the customer started. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 4
                        },
                        "messages": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Conversation messages by the customer or in their conversations (an access export leaves out internal notes). For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 37
                        },
                        "files": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Files the customer uploaded or that their messages hold. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 3
                        },
                        "posts": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Feedback posts by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 2
                        },
                        "comments": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Post comments by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 5
                        },
                        "votes": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Post votes by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 11
                        },
                        "tickets": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Tickets the customer requested. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 1
                        },
                        "surveyResponses": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Survey responses by the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 2
                        },
                        "aiLogs": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Erasures only: AI assistant tool calls and events about the customer or their conversations that were deleted.",
                          "example": 12
                        },
                        "emailLogs": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Erasures only: email log entries for the customer that were deleted.",
                          "example": 6
                        },
                        "subscriptions": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Post, ticket, changelog and status page subscriptions of the customer. For an erasure, the records erased or anonymized; for an access export, the records in the archive. Absent when not counted.",
                          "example": 3
                        },
                        "exportBytes": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Completed access exports only: the archive size in bytes.",
                          "example": 204800
                        },
                        "attachmentCount": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Completed access exports only: attachments included in the archive. Files over 10 MB, and files past a 25 MB total, are left out.",
                          "example": 3
                        }
                      },
                      "description": "Counts of what the request erased or exported."
                    },
                    "exportFileName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Access requests only: the ZIP file name. Null for erasures.",
                      "example": "privacy-export-acme-2026-11-30.zip"
                    },
                    "exportExpiresAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When a completed access export stops being downloadable: 7 days after it completed. Null otherwise.",
                      "example": "2026-12-07T14:05:00.000Z"
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Why the request failed. Null unless `status` is `failed`.",
                      "example": null
                    },
                    "completedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "When the request completed. Null until then.",
                      "example": "2026-11-30T14:05:00.000Z"
                    },
                    "createdAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the request was made.",
                      "example": "2026-11-30T14:05:00.000Z"
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "mode",
                    "subjectPrincipalId",
                    "subjectDigest",
                    "status",
                    "requestedByPrincipalId",
                    "summary",
                    "exportFileName",
                    "exportExpiresAt",
                    "error",
                    "completedAt",
                    "createdAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No privacy request with this ID exists in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/privacy/requests/{requestId}/download": {
      "get": {
        "operationId": "downloadQuillsPrivacyAccessRequest",
        "tags": [
          "Privacy and audit"
        ],
        "summary": "Get a short-lived download URL for a completed subject access export",
        "description": "Returns a presigned URL for a completed access export's ZIP archive. The URL stops working at `expiresAt`; request a new one after that, until the export itself expires 7 days after it completed. Requires the `manage_settings` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The privacy request ID.",
              "example": "privacy_request_01m8rxfrbhfzr9r837k90wcggm"
            },
            "required": true,
            "description": "The privacy request ID.",
            "name": "requestId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Presigned ZIP download URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "The presigned URL that downloads the ZIP archive.",
                      "example": "https://storage.example.com/privacy/export.zip?X-Amz-Signature=abc123"
                    },
                    "fileName": {
                      "type": "string",
                      "description": "The ZIP file name.",
                      "example": "privacy-export-acme-2026-11-30.zip"
                    },
                    "expiresAt": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When `url` stops working.",
                      "example": "2026-11-30T15:05:00.000Z"
                    }
                  },
                  "required": [
                    "url",
                    "fileName",
                    "expiresAt"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No completed access export with this ID exists, or its archive has expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/conversations/{conversationId}/messages/{messageId}/redact": {
      "post": {
        "operationId": "redactQuillsConversationMessage",
        "tags": [
          "Conversations"
        ],
        "summary": "Redact sensitive text or attachments from a message",
        "description": "Surgically scrubs message text, rich JSON, translations, conversation summaries/embeddings, and/or attached files (queuing storage deletion) while keeping the conversation thread intact. Works on customer messages, teammate replies and internal notes, but not on system notices. Redacting the text of a visible message also refreshes the conversation's last-message preview. The change cannot be undone. Records a `message.redacted` event. Requires the `update` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The conversation that holds the message.",
              "example": "conversation_01m8rxfrbhfzr9r83gw2ecw92z"
            },
            "required": true,
            "description": "The conversation that holds the message.",
            "name": "conversationId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "The message to redact.",
              "example": "conversation_msg_01m8rxfrbhfzr9r83t8d2n37cb"
            },
            "required": true,
            "description": "The message to redact.",
            "name": "messageId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "text",
                      "attachments",
                      "both"
                    ],
                    "description": "What to redact. `text`: replace the message text with `replacement`, drop its rich text and translations, and delete the conversation's cached summary. `attachments`: delete the attachments named in `attachmentIds`, or all of them. `both`: both.",
                    "example": "text"
                  },
                  "replacement": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "The text that replaces the message content, for `text` and `both`. Default `[Redacted]`.",
                    "example": "[Card number removed]"
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `file` prefix. Requests also accept the bare UUID.",
                      "example": "file_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 50,
                    "description": "The attachment files to delete, for `attachments` and `both`. Leave it out or send an empty list to delete every attachment of the message.",
                    "example": [
                      "file_01m8rxfrbhfzr9r83t8d2n37cb"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Why the message is redacted. Stored on the message with the redacting teammate and time.",
                    "example": "Customer shared a full card number"
                  }
                },
                "required": [
                  "mode",
                  "reason"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The redacted message and scrub counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Message ID.",
                          "example": "conversation_msg_01m8rxy505fewvz40t65v0ybzw"
                        },
                        "conversationId": {
                          "type": "string",
                          "description": "ID of the conversation the message belongs to.",
                          "example": "conversation_01m8rxy504fewvz40pjgj60e1r"
                        },
                        "senderType": {
                          "type": "string",
                          "enum": [
                            "visitor",
                            "agent",
                            "system"
                          ],
                          "description": "Who wrote the message. `visitor`: the customer. `agent`: the team side, a teammate or the AI assistant. `system`: an automatic notice with no human author, such as an assignment or a status change.",
                          "example": "agent"
                        },
                        "isInternal": {
                          "type": "boolean",
                          "description": "Whether the message is team-only: an internal note or a team-only system notice. The customer never sees it.",
                          "example": false
                        },
                        "authorPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the author, a customer or a teammate. Null for system notices.",
                          "example": "principal_01m8rxy505fewvz41crbgqs67r"
                        },
                        "authorName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Author's display name: the account name, else the profile's display name. Null for system notices and for authors with no name.",
                          "example": "Dana Whitfield"
                        },
                        "content": {
                          "type": "string",
                          "description": "Plain-text body. Empty for a message that only embeds a card, such as a shared feedback post. After a text redaction it holds the replacement text, `[Redacted]` by default.",
                          "example": "Thanks for the details. I've reset your invite, so please try the link again."
                        },
                        "systemKind": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Kind of system notice: `chat_ended` (resolved), `chat_reopened`, `assigned`, `assistant_handoff`, `ticket_status_changed`, `ticket_linked`, `ticket_created`, `assistant_action_expired`, `external_linked`, `external_unlinked`, `external_status_changed`, `priority_changed`, `snoozed`, `csat_submitted` or `away_reply`. Null for messages that aren't system notices, and for notices stored without a kind, such as a team assignment.",
                          "example": "assigned"
                        },
                        "systemActorPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the teammate who resolved or reopened the conversation, on `chat_ended` and `chat_reopened` notices. Null on other messages, on notices caused by automation or the customer, and on older notices.",
                          "example": "principal_01m8rxy505fewvz41pk221r0d3"
                        },
                        "emailAuth": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "spf": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "SPF result: `pass`, `fail` or `none` (no result).",
                              "example": "pass"
                            },
                            "dkim": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "DKIM result: `pass`, `fail` or `none` (no result).",
                              "example": "pass"
                            },
                            "dmarc": {
                              "type": "string",
                              "enum": [
                                "pass",
                                "fail",
                                "none"
                              ],
                              "description": "DMARC result: `pass`, `fail` or `none` (no result).",
                              "example": "none"
                            }
                          },
                          "required": [
                            "spf",
                            "dkim",
                            "dmarc"
                          ],
                          "description": "SPF, DKIM and DMARC results that the receiving mail server reported for an inbound email. Null for messages that didn't arrive by email."
                        },
                        "widgetMetadata": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Host-page context that the widget sent with a visitor's message, such as `pageUrl` and the browser, as key-value pairs. Only string values are returned. Null when none was sent.",
                          "example": {
                            "pageUrl": "https://app.example.com/settings/billing",
                            "browser": "Firefox 133"
                          }
                        },
                        "embeds": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "description": "Type of the embedded record, such as `post`.",
                                "example": "post"
                              },
                              "id": {
                                "type": "string",
                                "description": "ID of the embedded record, as stored in the message.",
                                "example": "post_01m8rxy505fewvz428qxstz0z3"
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ]
                          },
                          "description": "Cards embedded at the top level of the message's rich content, in order, such as a shared feedback post. Empty for plain messages."
                        },
                        "attachments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "fileId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "ID of the stored file. Null for attachments written before the file pipeline and for inline images taken from rich content.",
                                "example": "file_01m8rxy505fewvz41w7gqgp4p1"
                              },
                              "name": {
                                "type": "string",
                                "description": "File name.",
                                "example": "invoice-2026-03.pdf"
                              },
                              "contentType": {
                                "type": "string",
                                "description": "MIME type of the file.",
                                "example": "application/pdf"
                              },
                              "size": {
                                "type": "number",
                                "description": "File size in bytes.",
                                "example": 48213
                              }
                            },
                            "required": [
                              "fileId",
                              "name",
                              "contentType",
                              "size"
                            ]
                          },
                          "description": "Files attached to the message, in the order they were attached. Empty for text-only messages and once a redaction removed them."
                        },
                        "reactions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "emoji": {
                                "type": "string",
                                "description": "Reaction emoji. One of 👍, ❤️, 🎉, 😄, 🤔 and 👀.",
                                "example": "👍"
                              },
                              "count": {
                                "type": "number",
                                "description": "Number of teammates who reacted with this emoji.",
                                "example": 2
                              },
                              "reacted": {
                                "type": "boolean",
                                "description": "Whether the caller is one of them.",
                                "example": true
                              }
                            },
                            "required": [
                              "emoji",
                              "count",
                              "reacted"
                            ]
                          },
                          "description": "Teammate reactions, one entry per emoji in use, sorted by emoji. Team-only. Empty when nobody reacted."
                        },
                        "flaggedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the caller saved the message for later, in ISO 8601 UTC. Personal to the caller. Null when the caller hasn't saved it.",
                          "example": "2026-03-14T09:30:12.000Z"
                        },
                        "sendStatus": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "scheduled",
                            "recalled"
                          ],
                          "description": "Delivery state. `sent`: in the thread, and visible to the customer unless it's internal. `scheduled`: a reply held for undo-send or a scheduled send; the customer doesn't see it until it's released. `recalled`: a held reply that was recalled before it went out.",
                          "example": "sent"
                        },
                        "scheduledSendAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a held reply is or was due to go out, in ISO 8601 UTC. Kept after the reply is released or recalled. Null for messages that were never held.",
                          "example": "2026-03-14T09:27:23.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Time the message was posted, in ISO 8601 UTC. For a held reply that was released, the release time.",
                          "example": "2026-03-14T09:26:53.000Z"
                        },
                        "editedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time the body was last edited, in ISO 8601 UTC. Null if it was never edited.",
                          "example": "2026-03-14T09:41:05.000Z"
                        },
                        "redactedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "Time a teammate redacted the message's text or attachments, in ISO 8601 UTC. Null if it was never redacted.",
                          "example": "2026-03-15T11:02:44.000Z"
                        },
                        "redactedByPrincipalId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Principal ID of the teammate who redacted the message. Null if it was never redacted.",
                          "example": "principal_01m8rxy505fewvz41pk221r0d3"
                        },
                        "redactedByName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Display name of the teammate who redacted the message. Null if it was never redacted or the teammate has no name.",
                          "example": "Priya Natarajan"
                        },
                        "redactionReason": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Reason the teammate gave for the redaction. Null if the message was never redacted.",
                          "example": "Customer shared a card number"
                        }
                      },
                      "required": [
                        "id",
                        "conversationId",
                        "senderType",
                        "isInternal",
                        "authorPrincipalId",
                        "authorName",
                        "content",
                        "systemKind",
                        "systemActorPrincipalId",
                        "emailAuth",
                        "widgetMetadata",
                        "embeds",
                        "attachments",
                        "reactions",
                        "flaggedAt",
                        "sendStatus",
                        "scheduledSendAt",
                        "createdAt",
                        "editedAt",
                        "redactedAt",
                        "redactedByPrincipalId",
                        "redactedByName",
                        "redactionReason"
                      ],
                      "description": "The message after redaction."
                    },
                    "removedFiles": {
                      "type": "integer",
                      "minimum": 0,
                      "description": "Attachment files deleted. Their stored objects are removed after the request commits.",
                      "example": 1
                    },
                    "clearedSummary": {
                      "type": "boolean",
                      "description": "True when a cached conversation summary was deleted because the text was redacted.",
                      "example": true
                    }
                  },
                  "required": [
                    "message",
                    "removedFiles",
                    "clearedSummary"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The conversation does not exist, or the message does not exist in it or is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The message is a system notice, which cannot be redacted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/releases": {
      "get": {
        "operationId": "listQuillsVerifiedReleases",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "List verified releases",
        "description": "Lists the workspace's 50 most recently verified releases with their approval status, newest `verifiedAt` first. There is no paging. Requires the `quills:read` permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "approved",
                "shipped"
              ],
              "description": "Only releases in this status"
            },
            "required": false,
            "description": "Only releases in this status",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "description": "Only the release with this version",
              "example": "v2.14.0"
            },
            "required": false,
            "description": "Only the release with this version",
            "name": "version",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Verified releases for this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Verified release ID",
                            "example": "verified_release_01jd3k8m2q5r7t9v1w3x5y7z9a"
                          },
                          "version": {
                            "type": "string",
                            "description": "Release version, unique in the workspace. A second verify call with the same version returns this release.",
                            "example": "v2.14.0"
                          },
                          "title": {
                            "type": "string",
                            "description": "Release title, used as the changelog entry title and in requester notifications. Defaults to `Release <version>`.",
                            "example": "Faster board filters"
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "github_release",
                              "github_tag",
                              "github_deployment",
                              "manual"
                            ],
                            "description": "What verified the release. `github_release`: a published GitHub release. `github_tag`: a pushed release tag. `github_deployment`: a successful production deployment. `manual`: a teammate recorded it."
                          },
                          "externalUrl": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Link to the release at its source, such as the GitHub release page. Null when none was given.",
                            "example": "https://github.com/example/app/releases/tag/v2.14.0"
                          },
                          "commitSha": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Commit SHA the release was built from. Null when none was given.",
                            "example": "3f9c2a7e1b4d8f6a0c5e9b2d7a1f4c8e6b3d0a9f"
                          },
                          "taskIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "IDs of the tasks the release delivers, deduplicated. Feedback posts linked to these tasks are part of the release.",
                            "example": [
                              "tz4a98xxat96iws9zmbrgj3a"
                            ]
                          },
                          "postIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "IDs of the feedback posts the release ships: posts linked to `taskIds` plus posts named directly. Deleted posts are left out.",
                            "example": [
                              "post_01jd3k8m2q5r7t9v1w3x5y7z9b"
                            ]
                          },
                          "ticketIds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "IDs of the support tickets the release resolves: tickets linked to the release's posts plus tickets named directly. Deleted tickets are left out.",
                            "example": [
                              "ticket_01jd3k8m2q5r7t9v1w3x5y7z9c"
                            ]
                          },
                          "changelogEntryId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "ID of the changelog entry drafted for the release. It stays unpublished until the release is approved. Null when the entry was deleted.",
                            "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9d"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "approved",
                              "shipped"
                            ],
                            "description": "Approval state. `draft`: recorded, nothing published or sent. `approved`: approved but not shipped; the approve operation moves a release from `draft` straight to `shipped`. `shipped`: changelog published, linked items updated and requesters notified."
                          },
                          "verifiedAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the release was recorded, in ISO 8601 UTC",
                            "example": "2026-11-18T14:32:05.000Z"
                          },
                          "approvedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When a teammate approved the release, in ISO 8601 UTC. Null until approved.",
                            "example": "2026-11-19T09:10:00.000Z"
                          },
                          "shippedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "When the release was shipped, in ISO 8601 UTC. Null until shipped.",
                            "example": "2026-11-19T09:10:00.000Z"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time",
                            "description": "When the release row was created, in ISO 8601 UTC",
                            "example": "2026-11-18T14:32:05.000Z"
                          }
                        },
                        "required": [
                          "id",
                          "version",
                          "title",
                          "source",
                          "externalUrl",
                          "commitSha",
                          "taskIds",
                          "postIds",
                          "ticketIds",
                          "changelogEntryId",
                          "status",
                          "verifiedAt",
                          "approvedAt",
                          "shippedAt",
                          "createdAt"
                        ]
                      },
                      "description": "Up to 50 verified releases, newest first"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/releases/verify": {
      "post": {
        "operationId": "createQuillsVerifiedRelease",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Record a verified release and draft its approval-pending changelog entry",
        "description": "Creates a verified release in `draft` status and an unpublished changelog entry for it. The release covers the feedback posts linked to `taskIds`, the posts in `postIds`, and the support tickets linked to those posts or named in `ticketIds`. The changelog draft is the `content` sent or, without it, Markdown that lists the shipped posts grouped by board and the resolved tickets. Nothing is published and no customer is notified until the release is approved. Requires the `quills:manage_settings` permission. Records a `release.verified` event when it creates the release. Idempotent by `version`: if a release with that version exists, it is returned unchanged with `created: false`, the rest of the body is ignored and no event is recorded.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Release version, unique in the workspace. Leading and trailing spaces are trimmed.",
                    "example": "v2.14.0"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Release title for the changelog entry and notifications. Defaults to `Release <version>`.",
                    "example": "Faster board filters"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50000,
                    "description": "Markdown body for the changelog draft, up to 50,000 characters. Omit it to generate one from the release's posts and tickets.",
                    "example": "# Faster board filters\n\n## Roadmap\n\n- **Filter by tag**"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "github_release",
                      "github_tag",
                      "github_deployment",
                      "manual"
                    ],
                    "default": "manual",
                    "description": "What verified the release. `github_release`: a published GitHub release. `github_tag`: a pushed release tag. `github_deployment`: a successful production deployment. `manual`: a teammate recorded it."
                  },
                  "externalUrl": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2000,
                    "format": "uri",
                    "description": "Link to the release at its source, using http or https. Omit or send null for none.",
                    "example": "https://github.com/example/app/releases/tag/v2.14.0"
                  },
                  "commitSha": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 128,
                    "description": "Commit SHA the release was built from. Omit or send null for none.",
                    "example": "3f9c2a7e1b4d8f6a0c5e9b2d7a1f4c8e6b3d0a9f"
                  },
                  "taskIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "maxItems": 200,
                    "default": [],
                    "description": "IDs of the tasks the release delivers. Feedback posts linked to these tasks join the release.",
                    "example": [
                      "tz4a98xxat96iws9zmbrgj3a"
                    ]
                  },
                  "postIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `post` prefix. Requests also accept the bare UUID.",
                      "example": "post_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 200,
                    "default": [],
                    "description": "IDs of feedback posts to include besides those linked to `taskIds`. Deleted posts are skipped.",
                    "example": [
                      "post_01jd3k8m2q5r7t9v1w3x5y7z9b"
                    ]
                  },
                  "ticketIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "TypeID with the `ticket` prefix. Requests also accept the bare UUID.",
                      "example": "ticket_01h455vb4pex5vsknk084sn02q"
                    },
                    "maxItems": 200,
                    "default": [],
                    "description": "IDs of support tickets to include besides those linked to the release's posts. Deleted tickets are skipped.",
                    "example": [
                      "ticket_01jd3k8m2q5r7t9v1w3x5y7z9c"
                    ]
                  }
                },
                "required": [
                  "version"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The verified release draft",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "release": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Verified release ID",
                          "example": "verified_release_01jd3k8m2q5r7t9v1w3x5y7z9a"
                        },
                        "version": {
                          "type": "string",
                          "description": "Release version, unique in the workspace. A second verify call with the same version returns this release.",
                          "example": "v2.14.0"
                        },
                        "title": {
                          "type": "string",
                          "description": "Release title, used as the changelog entry title and in requester notifications. Defaults to `Release <version>`.",
                          "example": "Faster board filters"
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "github_release",
                            "github_tag",
                            "github_deployment",
                            "manual"
                          ],
                          "description": "What verified the release. `github_release`: a published GitHub release. `github_tag`: a pushed release tag. `github_deployment`: a successful production deployment. `manual`: a teammate recorded it."
                        },
                        "externalUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Link to the release at its source, such as the GitHub release page. Null when none was given.",
                          "example": "https://github.com/example/app/releases/tag/v2.14.0"
                        },
                        "commitSha": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Commit SHA the release was built from. Null when none was given.",
                          "example": "3f9c2a7e1b4d8f6a0c5e9b2d7a1f4c8e6b3d0a9f"
                        },
                        "taskIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "IDs of the tasks the release delivers, deduplicated. Feedback posts linked to these tasks are part of the release.",
                          "example": [
                            "tz4a98xxat96iws9zmbrgj3a"
                          ]
                        },
                        "postIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "IDs of the feedback posts the release ships: posts linked to `taskIds` plus posts named directly. Deleted posts are left out.",
                          "example": [
                            "post_01jd3k8m2q5r7t9v1w3x5y7z9b"
                          ]
                        },
                        "ticketIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "IDs of the support tickets the release resolves: tickets linked to the release's posts plus tickets named directly. Deleted tickets are left out.",
                          "example": [
                            "ticket_01jd3k8m2q5r7t9v1w3x5y7z9c"
                          ]
                        },
                        "changelogEntryId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the changelog entry drafted for the release. It stays unpublished until the release is approved. Null when the entry was deleted.",
                          "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9d"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "approved",
                            "shipped"
                          ],
                          "description": "Approval state. `draft`: recorded, nothing published or sent. `approved`: approved but not shipped; the approve operation moves a release from `draft` straight to `shipped`. `shipped`: changelog published, linked items updated and requesters notified."
                        },
                        "verifiedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the release was recorded, in ISO 8601 UTC",
                          "example": "2026-11-18T14:32:05.000Z"
                        },
                        "approvedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When a teammate approved the release, in ISO 8601 UTC. Null until approved.",
                          "example": "2026-11-19T09:10:00.000Z"
                        },
                        "shippedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the release was shipped, in ISO 8601 UTC. Null until shipped.",
                          "example": "2026-11-19T09:10:00.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the release row was created, in ISO 8601 UTC",
                          "example": "2026-11-18T14:32:05.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "version",
                        "title",
                        "source",
                        "externalUrl",
                        "commitSha",
                        "taskIds",
                        "postIds",
                        "ticketIds",
                        "changelogEntryId",
                        "status",
                        "verifiedAt",
                        "approvedAt",
                        "shippedAt",
                        "createdAt"
                      ],
                      "description": "The new release, or the existing release with this version"
                    },
                    "created": {
                      "type": "boolean",
                      "description": "True when this call created the release; false when a release with the same version already existed"
                    }
                  },
                  "required": [
                    "release",
                    "created"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task, post, or ticket not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/releases/{releaseId}/approve": {
      "post": {
        "operationId": "approveQuillsVerifiedRelease",
        "tags": [
          "Changelog and releases"
        ],
        "summary": "Approve and ship a verified release",
        "description": "Approves a verified release and ships it in one transaction. It gives the release's changelog entry the final title (and `content`, when sent) and publishes it, dated now, if it isn't published yet. It recollects the release's posts and tickets, so posts newly linked to its tasks, and new voters and followers, are included. It moves each linked post that is not deleted to the first post status in the `complete` category, if the workspace has one. It closes each linked open ticket with the first status in the `closed` category and adds a system message to the ticket.\n\nUnless `notify` is false, it then sends one in-app notification per affected customer who allows them: post authors, voters, followers who get status updates, and ticket requesters. Blocked, test and service principals are skipped. Each message quotes the customer's original request and lists their shipped items. A customer is notified at most once per release.\n\nRequires the `quills:manage_settings` permission. Records a `release.shipped` event, and `changelog.published` when it publishes the entry. A shipped release cannot be approved again (409).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the verified release to approve",
              "example": "verified_release_01jd3k8m2q5r7t9v1w3x5y7z9a"
            },
            "required": true,
            "description": "ID of the verified release to approve",
            "name": "releaseId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Final release title. It replaces the release and changelog titles and is used in the notifications. Omit it to keep the release's title.",
                    "example": "Faster board filters"
                  },
                  "content": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50000,
                    "description": "Markdown body for the published changelog entry. Omit it to publish the generated draft unchanged.",
                    "example": "# Faster board filters\n\n## Roadmap\n\n- **Filter by tag**"
                  },
                  "notify": {
                    "type": "boolean",
                    "default": true,
                    "description": "Whether to send the in-app notifications. `false` ships the release without notifying anyone.",
                    "example": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Shipped release summary and delivery counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "release": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Verified release ID",
                          "example": "verified_release_01jd3k8m2q5r7t9v1w3x5y7z9a"
                        },
                        "version": {
                          "type": "string",
                          "description": "Release version, unique in the workspace. A second verify call with the same version returns this release.",
                          "example": "v2.14.0"
                        },
                        "title": {
                          "type": "string",
                          "description": "Release title, used as the changelog entry title and in requester notifications. Defaults to `Release <version>`.",
                          "example": "Faster board filters"
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "github_release",
                            "github_tag",
                            "github_deployment",
                            "manual"
                          ],
                          "description": "What verified the release. `github_release`: a published GitHub release. `github_tag`: a pushed release tag. `github_deployment`: a successful production deployment. `manual`: a teammate recorded it."
                        },
                        "externalUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Link to the release at its source, such as the GitHub release page. Null when none was given.",
                          "example": "https://github.com/example/app/releases/tag/v2.14.0"
                        },
                        "commitSha": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Commit SHA the release was built from. Null when none was given.",
                          "example": "3f9c2a7e1b4d8f6a0c5e9b2d7a1f4c8e6b3d0a9f"
                        },
                        "taskIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "IDs of the tasks the release delivers, deduplicated. Feedback posts linked to these tasks are part of the release.",
                          "example": [
                            "tz4a98xxat96iws9zmbrgj3a"
                          ]
                        },
                        "postIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "IDs of the feedback posts the release ships: posts linked to `taskIds` plus posts named directly. Deleted posts are left out.",
                          "example": [
                            "post_01jd3k8m2q5r7t9v1w3x5y7z9b"
                          ]
                        },
                        "ticketIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "IDs of the support tickets the release resolves: tickets linked to the release's posts plus tickets named directly. Deleted tickets are left out.",
                          "example": [
                            "ticket_01jd3k8m2q5r7t9v1w3x5y7z9c"
                          ]
                        },
                        "changelogEntryId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "ID of the changelog entry drafted for the release. It stays unpublished until the release is approved. Null when the entry was deleted.",
                          "example": "changelog_01jd3k8m2q5r7t9v1w3x5y7z9d"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "approved",
                            "shipped"
                          ],
                          "description": "Approval state. `draft`: recorded, nothing published or sent. `approved`: approved but not shipped; the approve operation moves a release from `draft` straight to `shipped`. `shipped`: changelog published, linked items updated and requesters notified."
                        },
                        "verifiedAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the release was recorded, in ISO 8601 UTC",
                          "example": "2026-11-18T14:32:05.000Z"
                        },
                        "approvedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When a teammate approved the release, in ISO 8601 UTC. Null until approved.",
                          "example": "2026-11-19T09:10:00.000Z"
                        },
                        "shippedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the release was shipped, in ISO 8601 UTC. Null until shipped.",
                          "example": "2026-11-19T09:10:00.000Z"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the release row was created, in ISO 8601 UTC",
                          "example": "2026-11-18T14:32:05.000Z"
                        }
                      },
                      "required": [
                        "id",
                        "version",
                        "title",
                        "source",
                        "externalUrl",
                        "commitSha",
                        "taskIds",
                        "postIds",
                        "ticketIds",
                        "changelogEntryId",
                        "status",
                        "verifiedAt",
                        "approvedAt",
                        "shippedAt",
                        "createdAt"
                      ],
                      "description": "The release in `shipped` status"
                    },
                    "shippedPostCount": {
                      "type": "integer",
                      "description": "Number of feedback posts moved to the shipped status",
                      "example": 3
                    },
                    "closedTicketCount": {
                      "type": "integer",
                      "description": "Number of open support tickets closed. Tickets already in a closed status are not counted.",
                      "example": 2
                    },
                    "notifiedCount": {
                      "type": "integer",
                      "description": "Number of customers sent an in-app notification",
                      "example": 14
                    },
                    "changelogPublishedNow": {
                      "type": "boolean",
                      "description": "True when this call published the changelog entry; false when it was already published"
                    }
                  },
                  "required": [
                    "release",
                    "shippedPostCount",
                    "closedTicketCount",
                    "notifiedCount",
                    "changelogPublishedNow"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No verified release with this ID in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The release was already shipped",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/quills/{workspaceId}/context": {
      "get": {
        "operationId": "getQuillsWorkspaceContext",
        "tags": [
          "Inbox and views"
        ],
        "summary": "Get the caller's Albus workspace context",
        "description": "Uses the existing albus account, workspace membership, roles and API-key scope. Initializes Albus defaults and the caller's actor when needed. Requires workspace:read and quills:read.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
              "example": "tz4a98xxat96iws9zmbrgj3a"
            },
            "required": true,
            "description": "ID of the workspace. The caller must be a member with the permission that the action needs.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace and actor for Albus features",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuillsWorkspaceContext"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Workspace archived or insufficient permission or API-key scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/custom-field/project/{projectId}": {
      "get": {
        "operationId": "getCustomFieldsByProject",
        "tags": [
          "Custom Fields"
        ],
        "summary": "List custom fields",
        "description": "Lists a project's custom field definitions, sorted by position. Requires the `project:read` workspace permission and access to the project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List of custom field definitions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomFieldDefinition"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/custom-field/project/{projectId}/values": {
      "get": {
        "operationId": "getCustomFieldValuesByProject",
        "tags": [
          "Custom Fields"
        ],
        "summary": "List project custom field values",
        "description": "Lists the stored custom field values of every task in a project, in no particular order, each with its field's name, type, position and options. Tasks without a stored value for a field have no entry for it. Requires the `task:read` workspace permission and access to the project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List of custom field values for the project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomFieldValue"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/custom-field/task/{taskId}": {
      "get": {
        "operationId": "getCustomFieldValuesByTask",
        "tags": [
          "Custom Fields"
        ],
        "summary": "List task custom field values",
        "description": "Lists a task's stored custom field values, each with its field's name, type, position and options. Requires the `task:read` workspace permission and access to the task's project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the task.",
              "example": "bkh59p9dpz3efjy7e59v55jd"
            },
            "required": true,
            "description": "ID of the task.",
            "name": "taskId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List of custom field values for the task",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomFieldValue"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/custom-field/project/{projectId}/filter-values": {
      "get": {
        "operationId": "getCustomFieldFilterValues",
        "tags": [
          "Custom Fields"
        ],
        "summary": "List custom field filter values",
        "description": "Lists, for each custom field of a project, the distinct non-empty values its tasks currently have, for building filters. Requires the `task:read` workspace permission and access to the project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Distinct values used for each custom field",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomFieldFilterValues"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing read permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/custom-field": {
      "post": {
        "operationId": "createCustomField",
        "tags": [
          "Custom Fields"
        ],
        "summary": "Create custom field",
        "description": "Creates a custom field at the end of the project's field list. When a default value is given, every existing task in the project without a value gets it. Requires the `project:update` workspace permission and access to the project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "description": "ID of the project to add the field to.",
                    "example": "cef5d6uaajgxwpe38vkp4khl"
                  },
                  "name": {
                    "type": "string",
                    "description": "Display name of the field. Cannot be blank.",
                    "example": "Story points"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "date",
                      "dropdown",
                      "boolean",
                      "multiselect"
                    ],
                    "description": "Value type: `text` (free text), `number` (a finite decimal number), `date` (`YYYY-MM-DD` or an ISO 8601 timestamp), `dropdown` (one option), `boolean` (`true` or `false`), or `multiselect` (a JSON array of options).",
                    "example": "number"
                  },
                  "required": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether every task must have a value. Defaults to false. A required field needs a default value.",
                    "example": false
                  },
                  "defaultValue": {
                    "type": "string",
                    "description": "Value new tasks start with, written in the field type's format. When set, existing tasks in the project that have no value get it too.",
                    "example": "3"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Options for `dropdown` and `multiselect` fields, in display order. A dropdown needs at least one option and a multiselect at least two distinct ones.",
                    "example": [
                      "Low",
                      "Medium",
                      "High"
                    ]
                  }
                },
                "required": [
                  "projectId",
                  "name",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The created custom field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomFieldDefinition"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, blank name, or a default value that does not fit the field type or options",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/custom-field/reorder/{projectId}": {
      "put": {
        "operationId": "reorderCustomFields",
        "tags": [
          "Custom Fields"
        ],
        "summary": "Reorder custom fields",
        "description": "Sets new positions for some or all of a project's custom fields in one transaction and returns every field of the project, sorted by position. Requires the `project:update` workspace permission and access to the project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the project.",
              "example": "cef5d6uaajgxwpe38vkp4khl"
            },
            "required": true,
            "description": "ID of the project.",
            "name": "projectId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "ID of a custom field in the project.",
                          "example": "ga74wz2otc2lghrx19chi8ni"
                        },
                        "position": {
                          "type": "number",
                          "description": "New position of the field. Fields are listed in ascending position order.",
                          "example": 1
                        }
                      },
                      "required": [
                        "id",
                        "position"
                      ]
                    },
                    "description": "Fields to move with their new positions. Fields not listed keep their positions. All updates apply in one transaction."
                  }
                },
                "required": [
                  "fields"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The reordered custom fields",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReorderCustomFieldsResponse"
                }
              }
            }
          },
          "400": {
            "description": "A custom field does not belong to this project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/custom-field/value": {
      "put": {
        "operationId": "setCustomFieldValue",
        "tags": [
          "Custom Fields"
        ],
        "summary": "Set custom field value",
        "description": "Creates or replaces a task's value for a custom field. The value is validated against the field type and options. Repeating the same request leaves the same value. Requires the `task:update` workspace permission and access to the task's project.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {
                    "type": "string",
                    "description": "ID of the task.",
                    "example": "bkh59p9dpz3efjy7e59v55jd"
                  },
                  "fieldId": {
                    "type": "string",
                    "description": "ID of a custom field in the task's project.",
                    "example": "ga74wz2otc2lghrx19chi8ni"
                  },
                  "value": {
                    "type": "string",
                    "description": "New value as a string in the field type's format, such as `5`, `true`, `2026-12-15`, `High` or `[\"High\",\"Urgent\"]`. Leading and trailing spaces are trimmed. An empty string clears an optional field. Hidden options cannot be newly selected.",
                    "example": "5"
                  }
                },
                "required": [
                  "taskId",
                  "fieldId",
                  "value"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved custom field value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetCustomFieldValueResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, empty value for a required field, value that does not fit the field type, or an unknown or hidden option",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing task:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Task not found, or the custom field is not in the task's project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/custom-field/{id}": {
      "delete": {
        "operationId": "deleteCustomField",
        "tags": [
          "Custom Fields"
        ],
        "summary": "Delete custom field",
        "description": "Deletes a custom field and its values on every task, and returns the deleted definition. Requires the `project:update` workspace permission and access to the project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the custom field definition.",
              "example": "ga74wz2otc2lghrx19chi8ni"
            },
            "required": true,
            "description": "ID of the custom field definition.",
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted custom field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomFieldDefinition"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Custom field not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateCustomField",
        "tags": [
          "Custom Fields"
        ],
        "summary": "Update custom field",
        "description": "Updates a custom field's name, required flag, default, or options; omitted fields keep their values. The type can't change, except between dropdown and multiselect. Options that tasks still use can't be removed or renamed; the request is rejected instead of changing task values. Requires the `project:update` workspace permission and access to the project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the custom field definition.",
              "example": "ga74wz2otc2lghrx19chi8ni"
            },
            "required": true,
            "description": "ID of the custom field definition.",
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New name for the field. Cannot be blank.",
                    "example": "Story points"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "number",
                      "date",
                      "dropdown",
                      "boolean",
                      "multiselect"
                    ],
                    "description": "Only `dropdown` and `multiselect` can switch between each other. Task values are converted, and switching to `dropdown` is rejected while a task has more than one option picked. Any other type change is rejected.",
                    "example": "multiselect"
                  },
                  "required": {
                    "type": "boolean",
                    "description": "Whether every task must have a value. Turning it on needs a default, which fills tasks that have no value yet.",
                    "example": true
                  },
                  "defaultValue": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Value new tasks start with. Send `null` or an empty string to clear it. Multiselect defaults are a JSON array of options.",
                    "example": "Medium"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The full option list for dropdown and multiselect fields, in display order. Adding and reordering options is always allowed. Removing or renaming an option that a task still uses is rejected with 400, so task values are never changed silently.",
                    "example": [
                      "Low",
                      "Medium",
                      "High",
                      "Urgent"
                    ]
                  },
                  "hiddenOptions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Options to retire without removing them: tasks keep their existing selections, but hidden options can't be picked anew or used as the default. Must be a subset of `options`. Omit to keep the current hidden options that are still options.",
                    "example": [
                      "Low"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated custom field",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomFieldDefinition"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, a type change, or removing an option that tasks still use",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "No access to the project, or missing project:update permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Custom field not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/import/projects": {
      "post": {
        "operationId": "listImportSourceProjects",
        "tags": [
          "Import"
        ],
        "summary": "List projects in an import source",
        "description": "Signs in to PLANKA, Plane, Linear, Jira, Trello or another albus instance and lists the projects that can be imported. Nothing is written. The credentials are used only for this request; they are never stored, logged, or returned. The source has 90 seconds to answer. Requires the `workspace:manage_settings` and `project:create` workspace permissions and an active workspace plan.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of the workspace you plan to import into. Used to check your permissions.",
                    "example": "cfklow33tpuxgpxko9nxqllg"
                  },
                  "connection": {
                    "$ref": "#/components/schemas/ImportConnection"
                  }
                },
                "required": [
                  "workspaceId",
                  "connection"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Projects available in the source",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportSourceProjectList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, credentials the source rejected, or a destination this server may not reach",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "402": {
            "description": "Workspace plan has expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing workspace:manage_settings or project:create permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The source could not be reached or answered with an error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/import/runs": {
      "post": {
        "operationId": "startImportRun",
        "tags": [
          "Import"
        ],
        "summary": "Start an import",
        "description": "Imports the selected source projects into the workspace as new albus projects. The source is signed in to and its project list checked before the run is created; the import then runs in the background, one project at a time, so poll getImportRun for progress. Only one import can run in a workspace at a time. The credentials are held in memory only while the import runs; they are never stored, logged, or returned. Imported tasks do not send notifications or trigger integrations; each saved project publishes a `project.updated` event. Requires the `workspace:manage_settings` and `project:create` workspace permissions and an active workspace plan.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of the workspace to import into. Each source project becomes a new project in it.",
                    "example": "cfklow33tpuxgpxko9nxqllg"
                  },
                  "connection": {
                    "$ref": "#/components/schemas/ImportConnection"
                  },
                  "projectIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    "minItems": 1,
                    "maxItems": 50,
                    "description": "Source project IDs from listImportSourceProjects, imported in this order. 1 to 50 unique IDs of up to 512 characters each.",
                    "example": [
                      "1357924680",
                      "2468013579"
                    ]
                  },
                  "includeComments": {
                    "type": "boolean",
                    "default": true,
                    "description": "Import task comments too. Defaults to true.",
                    "example": true
                  }
                },
                "required": [
                  "workspaceId",
                  "connection",
                  "projectIds"
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The import started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportRunEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, credentials the source rejected, a destination this server may not reach, or a selected project the source no longer lists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "402": {
            "description": "Workspace plan has expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing workspace:manage_settings or project:create permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another import is already running in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "This server is already running its maximum number of imports, or the API key exceeded its rate limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The source could not be reached or answered with an error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "The server is restarting and not starting new imports",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/import/runs/{workspaceId}": {
      "get": {
        "operationId": "listImportRuns",
        "tags": [
          "Import"
        ],
        "summary": "List imports",
        "description": "Lists the workspace's 20 most recent imports, newest first. A run whose server stopped reporting progress is returned, and saved, as failed. Requires the `workspace:manage_settings` and `project:create` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Recent imports",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportRunList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing workspace:manage_settings or project:create permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/import/trello/authorize-url/{workspaceId}": {
      "get": {
        "operationId": "getTrelloAuthorizeUrl",
        "tags": [
          "Import"
        ],
        "summary": "Get the Trello authorize link",
        "description": "Returns the link to Trello's authorize page for this server's Trello app, where the user approves read access and copies a token for startImportRun. null when the server has no TRELLO_API_KEY. Requires the `workspace:manage_settings` and `project:create` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The Trello authorize link",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrelloAuthorizeUrl"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing workspace:manage_settings or project:create permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/import/runs/{workspaceId}/{runId}": {
      "get": {
        "operationId": "getImportRun",
        "tags": [
          "Import"
        ],
        "summary": "Get an import",
        "description": "Returns the progress and outcome of one import, including each project's status, counts and warnings. A run whose server stopped reporting progress is returned, and saved, as failed. Requires the `workspace:manage_settings` and `project:create` workspace permissions.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace the import belongs to.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace the import belongs to.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the import run.",
              "example": "h7i3jtaehpaixygugf24uy51"
            },
            "required": true,
            "description": "ID of the import run.",
            "name": "runId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The import",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportRunEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing workspace:manage_settings or project:create permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found, or no import with this ID in the workspace (`Import not found`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/user/me": {
      "get": {
        "operationId": "getCurrentUser",
        "tags": [
          "User"
        ],
        "summary": "Get current user",
        "description": "Returns the signed-in user's profile and instance role, with the profile fields a custom OAuth/OIDC provider manages for them. Works with a session or an API key.",
        "responses": {
          "200": {
            "description": "Current user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentUser"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "The authenticated user no longer exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/user/avatar": {
      "put": {
        "operationId": "uploadUserAvatar",
        "tags": [
          "User"
        ],
        "summary": "Upload avatar",
        "description": "Stores a base64 encoded avatar (PNG, JPEG, or WebP, up to 512KB) for the current user and returns its public URL. Replaces any existing avatar and issues it a new ID, so the old URL stops working. The user's `image` is not changed by this request. Refused when the custom OAuth/OIDC provider manages the profile picture.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contentType": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "MIME type of the image: `image/png`, `image/jpeg` or `image/webp`. Case and surrounding spaces are ignored, and `image/jpg` is read as `image/jpeg`. The image bytes must match this type.",
                    "example": "image/png"
                  },
                  "data": {
                    "type": "string",
                    "maxLength": 700076,
                    "description": "Base64 encoded image bytes. A `data:<type>;base64,` prefix and whitespace are removed before decoding. The decoded image must not be empty and must be at most 512 KB.",
                    "example": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="
                  }
                },
                "required": [
                  "contentType",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Avatar stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserAvatar"
                }
              }
            }
          },
          "400": {
            "description": "Unsupported content type, data that is not valid base64, an empty image, an image over the size limit, or bytes that don't match the declared type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The custom OAuth/OIDC provider manages the profile picture (code `PROFILE_FIELD_MANAGED_BY_PROVIDER`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "408": {
            "description": "Request body timed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "Request body exceeds the upload limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteUserAvatar",
        "tags": [
          "User"
        ],
        "summary": "Delete avatar",
        "description": "Removes the uploaded avatar of the current user, so its URL stops working. Succeeds even when there was nothing to remove. The user's `image` is not changed by this request. When the custom OAuth/OIDC provider manages the profile picture, removal is allowed only while the user's picture is empty or an uploaded avatar.",
        "responses": {
          "200": {
            "description": "Avatar removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserAvatarDeleted"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The custom OAuth/OIDC provider manages the profile picture and the user's picture comes from the provider (code `PROFILE_FIELD_MANAGED_BY_PROVIDER`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/user/sessions": {
      "get": {
        "operationId": "listOwnSessions",
        "tags": [
          "User"
        ],
        "summary": "List your active sessions",
        "description": "Lists the current user's unexpired sessions with device, IP address, and activity, marking the one making the request. The current session comes first, then the others from most to least recently active. Tokens are never returned. The list is not paginated. Requires a user session; API keys are rejected.",
        "responses": {
          "200": {
            "description": "Active sessions, current first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveSessionList"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated with an API key instead of a user session (code `SESSION_REQUIRED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/user/sessions/{sessionId}": {
      "delete": {
        "operationId": "revokeOwnSession",
        "tags": [
          "User"
        ],
        "summary": "Sign out one of your sessions",
        "description": "Ends another of the current user's sessions by ID and closes its realtime connections. The session is deleted, so its token stops working at once. To end every other session use better-auth's `POST /api/auth/revoke-other-sessions`; to end the current one, sign out. Requires a user session; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the session to sign out, as returned by `listOwnSessions`.",
              "example": "soermrtacx0z70uq94qjhn8o"
            },
            "required": true,
            "description": "ID of the session to sign out, as returned by `listOwnSessions`.",
            "name": "sessionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Session signed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokedSessions"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated with an API key instead of a user session (code `SESSION_REQUIRED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Session not found among the current user's sessions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The session is the one making the request; sign out to end it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/overview": {
      "get": {
        "operationId": "getAdminOverview",
        "tags": [
          "Admin"
        ],
        "summary": "Get the administration overview",
        "description": "Returns a summary for the administration home page: user and workspace counts, the five newest users and administrative actions, compact service checks, and configuration warnings. Activity is based on session refreshes within 30 days and excludes deactivated accounts. The service checks run on every request, as for the system status. No credentials or audit metadata are returned. Requires all four instance permissions: `users:read`, `workspaces:read`, `audit:read`, and `system:read`; API keys are rejected.",
        "responses": {
          "200": {
            "description": "Instance overview",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOverview"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/access": {
      "get": {
        "operationId": "getAdminAccess",
        "tags": [
          "Admin"
        ],
        "summary": "Get your instance permissions",
        "description": "Returns the instance permissions the signed-in user's roles grant: every permission for the built-in `admin` role, the combined permissions of their custom roles, or an empty list for users with only the `user` role. Permissions are read from the stored role on each request. Needs a user session but no instance permission; API keys are rejected.",
        "responses": {
          "200": {
            "description": "The caller's instance permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceAccess"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/users": {
      "get": {
        "operationId": "listAdminUsers",
        "tags": [
          "Admin"
        ],
        "summary": "List instance users",
        "description": "Lists the user accounts on this instance one page at a time, newest account first, guests included. Optional filters narrow the list by a case-insensitive name or email search, account status, instance role and email verification, and `total` counts every match. Each user includes their linked sign-in methods and when one of their sessions was last refreshed. Requires the `users:read` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Text matched case-insensitively against any part of the user's name or email. Leading and trailing spaces are ignored; omit it to list every user.",
              "example": "ada"
            },
            "required": false,
            "description": "Text matched case-insensitively against any part of the user's name or email. Leading and trailing spaces are ignored; omit it to list every user.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deactivated"
              ],
              "description": "Account status filter: `active` for users who can sign in, `deactivated` for users an administrator has blocked. Omit it for both. A ban that has expired counts as active.",
              "example": "active"
            },
            "required": false,
            "description": "Account status filter: `active` for users who can sign in, `deactivated` for users an administrator has blocked. Omit it for both. A ban that has expired counts as active.",
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "Instance role filter: `admin`, a custom role name, or `user` for everyone without an administrator or custom role. Omit it for every role.",
              "example": "admin"
            },
            "required": false,
            "description": "Instance role filter: `admin`, a custom role name, or `user` for everyone without an administrator or custom role. Omit it for every role.",
            "name": "role",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ],
              "description": "Email verification filter: `true` for users whose email is verified, `false` for users whose email is not. Omit it for both.",
              "example": "false"
            },
            "required": false,
            "description": "Email verification filter: `true` for users whose email is verified, `false` for users whose email is not. Omit it for both.",
            "name": "emailVerified",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1,
              "description": "Page number, starting at 1. Defaults to 1.",
              "example": 1
            },
            "required": false,
            "description": "Page number, starting at 1. Defaults to 1.",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Number of users per page, from 1 to 100. Defaults to 20.",
              "example": 20
            },
            "required": false,
            "description": "Number of users per page, from 1 to 100. Defaults to 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Users matching the search",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query: a search longer than 200 characters, an unknown status or `emailVerified` value, a role longer than 64 characters, or a page or limit outside its range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createAdminUser",
        "tags": [
          "Admin"
        ],
        "summary": "Create a user",
        "description": "Creates an account with an instance role and returns it. No password is set or returned. When password sign-in and password registration are both available, the account starts with an unverified email and the user is emailed a single-use link, valid for 2 days, to choose their own password; `passwordSetupEmail` says whether it was sent, and a failed email does not undo the account. When password registration or the login form is disabled, the account is created with a verified email so the user can sign in with single sign-on, and no email is sent. Registration restrictions do not apply to administrators. Records `user.created` in the audit log. Requires the `users:create` instance permission; API keys are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Display name of the new user. Surrounding spaces are removed.",
                    "example": "Ada Lovelace"
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 254,
                    "format": "email",
                    "description": "Email address of the new user, stored in lowercase. They sign in with it and receive their password link there. Must not belong to another user.",
                    "example": "ada@example.com"
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Instance role of the new user, with the same rules as for updates. Defaults to the instance's default role for new users.",
                    "example": "user"
                  }
                },
                "required": [
                  "name",
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedAdminUser"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name, email or role, an unknown role (code UNKNOWN_ROLE), or a disposable email address on an instance that blocks them (code DISPOSABLE_EMAIL_NOT_ALLOWED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `users:create` instance permission (code INSTANCE_PERMISSION_REQUIRED), asked for `admin` without being an administrator (code ADMIN_ROLE_REQUIRED), asked for a role with permissions they lack (code ROLE_EXCEEDS_YOUR_PERMISSIONS), or used an API key (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "A user with this email address already exists (code USER_ALREADY_EXISTS)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/workspaces": {
      "get": {
        "operationId": "listAdminWorkspaces",
        "tags": [
          "Admin"
        ],
        "summary": "List instance workspaces",
        "description": "Lists the workspaces on this instance one page at a time, newest first, archived ones included, with their owners, member and project counts and archive state. An optional case-insensitive search matches the name or slug, and `total` counts every match. The administrator does not need to be a member. Requires the `workspaces:read` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Text matched case-insensitively against any part of the workspace name or slug. Leading and trailing spaces are ignored; omit it to list every workspace.",
              "example": "acme"
            },
            "required": false,
            "description": "Text matched case-insensitively against any part of the workspace name or slug. Leading and trailing spaces are ignored; omit it to list every workspace.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1,
              "description": "Page number, starting at 1. Defaults to 1.",
              "example": 1
            },
            "required": false,
            "description": "Page number, starting at 1. Defaults to 1.",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "description": "Number of workspaces per page, from 1 to 100. Defaults to 20.",
              "example": 20
            },
            "required": false,
            "description": "Number of workspaces per page, from 1 to 100. Defaults to 20.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspaces matching the search",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminWorkspaceList"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query: a search longer than 200 characters, or a page or limit outside its range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/workspaces/{workspaceId}/members": {
      "get": {
        "operationId": "listAdminWorkspaceMembers",
        "tags": [
          "Admin"
        ],
        "summary": "List workspace members",
        "description": "Lists every member of a workspace with their role, earliest to join first, whether or not the administrator belongs to it. Requires the `workspaces:read` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace members",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminWorkspaceMember"
                  },
                  "description": "Every member of the workspace, earliest to join first."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No workspace has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "addAdminWorkspaceMember",
        "tags": [
          "Admin"
        ],
        "summary": "Add a user to a workspace",
        "description": "Adds an existing user to a workspace with the given role and returns the updated member list. Project access left over from an earlier membership is cleared, so they start with access to every project. Publishes a `project_members.updated` event for the projects they can access, updates the seat count of an active team subscription, and records `workspace.member_added` in the audit log. Requires the `workspaces:manage` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of an existing user to add to the workspace.",
                    "example": "vpptt8t3d7ft91y45poatb3p"
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Workspace role to give the member: a built-in role (`viewer`, `collaborator`, `member` or `admin`) or the name of one of the workspace's custom roles. `owner` and comma-separated lists are rejected; use the ownership transfer to make someone the owner.",
                    "example": "member"
                  }
                },
                "required": [
                  "userId",
                  "role"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated workspace members",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminWorkspaceMember"
                  },
                  "description": "Every member of the workspace, earliest to join first."
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or a role that is not a built-in or custom role of the workspace, including `owner`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No workspace or user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The user is already a member of the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/workspaces/{workspaceId}/roles": {
      "get": {
        "operationId": "listAdminWorkspaceRoles",
        "tags": [
          "Admin"
        ],
        "summary": "List assignable workspace roles",
        "description": "Lists the roles an administrator can give members of a workspace: the built-in `viewer`, `collaborator`, `member` and `admin` roles, then the workspace's custom roles in alphabetical order. `owner` is not listed; ownership is changed with the ownership transfer instead. Requires the `workspaces:read` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Assignable role names",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Role names an administrator can assign in the workspace: `viewer`, `collaborator`, `member` and `admin`, then the workspace's custom roles in alphabetical order. `owner` is never included.",
                  "example": [
                    "viewer",
                    "collaborator",
                    "member",
                    "admin",
                    "designer"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No workspace has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/workspaces/{workspaceId}/members/{userId}/role": {
      "put": {
        "operationId": "updateAdminWorkspaceMemberRole",
        "tags": [
          "Admin"
        ],
        "summary": "Change a workspace member's role",
        "description": "Changes a workspace member's role and returns the updated member list. Use the ownership transfer to make someone the owner; the only owner's role can't be changed. When the role actually changes, the member's open realtime connections are told to reload their permissions, the seat count of an active team subscription is updated, and `workspace.member_role_changed` is recorded in the audit log. Sending the current role changes nothing. Requires the `workspaces:manage` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the member's user account.",
              "example": "vpptt8t3d7ft91y45poatb3p"
            },
            "required": true,
            "description": "ID of the member's user account.",
            "name": "userId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Workspace role to give the member: a built-in role (`viewer`, `collaborator`, `member` or `admin`) or the name of one of the workspace's custom roles. `owner` and comma-separated lists are rejected; use the ownership transfer to make someone the owner.",
                    "example": "member"
                  }
                },
                "required": [
                  "role"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated workspace members",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminWorkspaceMember"
                  },
                  "description": "Every member of the workspace, earliest to join first."
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or a role that is not a built-in or custom role of the workspace, including `owner`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No workspace has this ID, or the user is not a member of it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The member is the only owner; transfer ownership first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/workspaces/{workspaceId}/members/{userId}": {
      "delete": {
        "operationId": "removeAdminWorkspaceMember",
        "tags": [
          "Admin"
        ],
        "summary": "Remove a workspace member",
        "description": "Removes a member from a workspace and returns the updated member list. Their account and their other memberships stay. The only owner can't be removed. Their project access in the workspace is cleared, a `project_members.updated` event is published, their open realtime connections to the workspace are closed unless they are an instance administrator, the seat count of an active team subscription is updated, and `workspace.member_removed` is recorded in the audit log. Requires the `workspaces:manage` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the member's user account.",
              "example": "vpptt8t3d7ft91y45poatb3p"
            },
            "required": true,
            "description": "ID of the member's user account.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated workspace members",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminWorkspaceMember"
                  },
                  "description": "Every member of the workspace, earliest to join first."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No workspace has this ID, or the user is not a member of it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The member is the only owner; transfer ownership first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/system": {
      "get": {
        "operationId": "getAdminSystemStatus",
        "tags": [
          "Admin"
        ],
        "summary": "Get system status",
        "description": "Returns the health of this API instance and the services it uses: version, uptime, database, WebSockets, Redis fan-out, SMTP, object storage, sign-in options, integration providers and setup diagnostics. The checks run on every request and each gives up after 3 seconds, so one unreachable service can't block the response. Realtime numbers cover only the API instance that answers. Only statuses, counts and short error categories are returned, never hosts, credentials or secrets. Requires the `system:read` instance permission; API keys are rejected.",
        "responses": {
          "200": {
            "description": "Status of this instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSystemStatus"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/system/test-email": {
      "post": {
        "operationId": "sendAdminTestEmail",
        "tags": [
          "Admin"
        ],
        "summary": "Send a test email",
        "description": "Sends a test email to the calling administrator's own address to check the SMTP settings. There is no recipient parameter and no request body. Limited to 5 per administrator every 10 minutes on each API instance. Records `email.test_sent` in the audit log. Requires the `system:read` instance permission; API keys are rejected.",
        "responses": {
          "200": {
            "description": "The mail server accepted the test email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminTestEmailResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "SMTP is not configured on this instance (code SMTP_NOT_CONFIGURED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Too many test emails (code RATE_LIMITED); retry after the number of seconds in the `Retry-After` header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "The mail server did not accept the test email (code SMTP_SEND_FAILED); the message includes the SMTP error code",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/workspaces/{workspaceId}/owner": {
      "put": {
        "operationId": "transferAdminWorkspaceOwnership",
        "tags": [
          "Admin"
        ],
        "summary": "Transfer workspace ownership",
        "description": "Makes an existing member the only owner of a workspace, for example when the previous owner has left, and returns the updated member list. Previous owners become admins, and the new owner's project restrictions are cleared. Publishes a `project_access.updated` event and records `workspace.owner_transferred` in the audit log. Requires the `workspaces:manage` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "minLength": 1,
                    "description": "ID of an existing member who becomes the only owner. Previous owners become admins.",
                    "example": "dvbh5d4ue1zvi3duyefsoqma"
                  }
                },
                "required": [
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated workspace members",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdminWorkspaceMember"
                  },
                  "description": "Every member of the workspace, earliest to join first."
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or the member is already the only owner",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No workspace has this ID, or the user is not a member of it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/workspaces/{workspaceId}/archive": {
      "post": {
        "operationId": "archiveAdminWorkspace",
        "tags": [
          "Admin"
        ],
        "summary": "Archive a workspace",
        "description": "Archives a workspace: disables it without deleting anything. Its members, API keys, MCP clients, public links, calendar feeds, notifications, and integrations stop working, and requests for it return 403 with the code WORKSPACE_ARCHIVED. Open realtime connections to it are closed. Publishes a `workspace.archived` event and records `workspace.archived` in the audit log. Restore it to undo. Requires the `workspaces:archive` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The workspace's archive state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminWorkspaceArchiveState"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No workspace has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace is already archived (code WORKSPACE_ALREADY_ARCHIVED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/workspaces/{workspaceId}/restore": {
      "post": {
        "operationId": "restoreAdminWorkspace",
        "tags": [
          "Admin"
        ],
        "summary": "Restore an archived workspace",
        "description": "Restores an archived workspace so it is usable again, with all of its data, members, and integrations as they were. `archivedAt` in the response is null. Members' open clients are told the workspace is back, a `workspace.restored` event is published, and `workspace.restored` is recorded in the audit log. Requires the `workspaces:archive` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The workspace's archive state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminWorkspaceArchiveState"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No workspace has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace is not archived (code WORKSPACE_NOT_ARCHIVED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/workspaces/{workspaceId}": {
      "delete": {
        "operationId": "deleteAdminWorkspace",
        "tags": [
          "Admin"
        ],
        "summary": "Delete a workspace",
        "description": "Permanently deletes a workspace and everything in it, archived or not, the same way its owner can: projects, tasks, members, invitations and uploaded files go, and open realtime connections are closed. Uploaded files are removed in the background. The administrator does not need to be a member. Publishes a `workspace.deleted` event and records `workspace.deleted` in the audit log with the member and project counts. Requires the `workspaces:delete` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminDeletedWorkspace"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No workspace has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The workspace still has an active subscription (code WORKSPACE_HAS_ACTIVE_SUBSCRIPTION)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/audit-log": {
      "get": {
        "operationId": "listAdminAuditLog",
        "tags": [
          "Admin"
        ],
        "summary": "List the admin audit log",
        "description": "Lists recorded administrative actions one page at a time, newest first. Optional filters match an exact action or a whole category, the acting user, and the target type and ID; `total` counts every match. Entries never contain passwords, tokens, reset links, or API key values. Requires the `audit:read` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "pattern": "^[a-z_]+(\\.[a-z_]+)?$",
              "description": "Action filter: an exact action such as `user.deleted`, or a category such as `user` to match every `user.*` action.",
              "example": "user"
            },
            "required": false,
            "description": "Action filter: an exact action such as `user.deleted`, or a category such as `user` to match every `user.*` action.",
            "name": "action",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "ID of the user who performed the action.",
              "example": "vpptt8t3d7ft91y45poatb3p"
            },
            "required": false,
            "description": "ID of the user who performed the action.",
            "name": "actorId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 100,
              "description": "Kind of target the action was about, such as `user`, `workspace`, `role`, `webhook` or `instance`.",
              "example": "user"
            },
            "required": false,
            "description": "Kind of target the action was about, such as `user`, `workspace`, `role`, `webhook` or `instance`.",
            "name": "targetType",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "ID of the target the action was about, such as a user ID.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": false,
            "description": "ID of the target the action was about, such as a user ID.",
            "name": "targetId",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000000,
              "default": 1,
              "description": "Page number, starting at 1. Defaults to 1.",
              "example": 1
            },
            "required": false,
            "description": "Page number, starting at 1. Defaults to 1.",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25,
              "description": "Number of entries per page, from 1 to 100. Defaults to 25.",
              "example": 25
            },
            "required": false,
            "description": "Number of entries per page, from 1 to 100. Defaults to 25.",
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Audit log entries, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminAuditLog"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query: an action that is not lowercase letters and underscores with at most one dot, a filter that is too long, or a page or limit outside its range",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/users/{userId}/password-reset-email": {
      "post": {
        "operationId": "sendAdminUserPasswordReset",
        "tags": [
          "Admin"
        ],
        "summary": "Email a password reset link",
        "description": "Emails the user a single-use link to choose a new password, valid for the regular password reset lifetime. The link is never returned to the administrator, and the current password keeps working until it is changed. Records `user.password_reset_sent` in the audit log. Requires the `users:credentials` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The email was sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminEmailSent"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The user is a guest without an email address (code GUEST_ACCOUNT), or password sign-in is disabled on this instance (code PASSWORD_SIGN_IN_DISABLED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The SMTP server did not accept the email (code EMAIL_DELIVERY_FAILED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Email delivery is not configured on this instance (code EMAIL_DELIVERY_NOT_CONFIGURED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/users/{userId}/verification-email": {
      "post": {
        "operationId": "sendAdminUserVerificationEmail",
        "tags": [
          "Admin"
        ],
        "summary": "Email a verification link",
        "description": "Emails the user a link, valid for 24 hours, that confirms their email address. The link is never returned to the administrator. Records `user.verification_sent` in the audit log. Requires the `users:credentials` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The email was sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminEmailSent"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The address is already verified (code EMAIL_ALREADY_VERIFIED), or the user is a guest without an email address (code GUEST_ACCOUNT)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          },
          "502": {
            "description": "The SMTP server did not accept the email (code EMAIL_DELIVERY_FAILED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "Email delivery is not configured on this instance (code EMAIL_DELIVERY_NOT_CONFIGURED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/admin/users/{userId}/email-verified": {
      "put": {
        "operationId": "markAdminUserEmailVerified",
        "tags": [
          "Admin"
        ],
        "summary": "Mark an email as verified",
        "description": "Marks a non-guest user's email address as verified without asking them, for example so a single sign-on identity with the same address can link to the account. The request is idempotent: an address that is already verified is left as it is, and only an actual change records `user.email_verified` in the audit log. Requires the `users:credentials` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The email is verified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminEmailVerified"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Guest accounts have no email address to verify (code GUEST_ACCOUNT)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/users/{userId}/avatar": {
      "put": {
        "operationId": "setAdminUserAvatar",
        "tags": [
          "Admin"
        ],
        "summary": "Set a user's avatar",
        "description": "Stores a base64-encoded image (PNG, JPEG, or WebP, up to 512KB) for the user, makes it their profile picture, and returns its path. Not available when the identity provider manages the user's picture. Records `user.avatar_changed` in the audit log. Requires the `users:update` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contentType": {
                    "type": "string",
                    "maxLength": 64,
                    "description": "MIME type of the image: `image/png`, `image/jpeg` or `image/webp`. Case and surrounding spaces are ignored, and `image/jpg` is read as `image/jpeg`. The image bytes must match this type.",
                    "example": "image/png"
                  },
                  "data": {
                    "type": "string",
                    "maxLength": 700076,
                    "description": "Base64 encoded image bytes. A `data:<type>;base64,` prefix and whitespace are removed before decoding. The decoded image must not be empty and must be at most 512 KB.",
                    "example": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="
                  }
                },
                "required": [
                  "contentType",
                  "data"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The new picture",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserAvatar"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or an image that is not PNG, JPEG or WebP, is not valid base64, is empty, is over the size limit, or does not match its declared type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `users:update` instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), the identity provider manages the user's picture (code PROFILE_FIELD_MANAGED_BY_PROVIDER), or the request used an API key (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "The request body is larger than the upload limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "removeAdminUserAvatar",
        "tags": [
          "Admin"
        ],
        "summary": "Remove a user's avatar",
        "description": "Removes the user's profile picture and any picture uploaded for them, and says whether there was one to remove. A picture managed by the identity provider can't be removed, but an earlier upload can. Records `user.avatar_removed` in the audit log when something was removed. Requires the `users:update` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Picture removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUserAvatarRemoved"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `users:update` instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), the identity provider manages the user's picture (code PROFILE_FIELD_MANAGED_BY_PROVIDER), or the request used an API key (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/users/{userId}": {
      "patch": {
        "operationId": "updateAdminUser",
        "tags": [
          "Admin"
        ],
        "summary": "Update a user",
        "description": "Changes a user's name, email, or instance role and returns the user. Omitted fields keep their value, and sending the current values changes nothing. A new email address is stored in lowercase and must be verified again. You can't change your own role or remove the role of the last administrator. A role change is recorded in the audit log as `user.role_changed`, and name or email changes as `user.updated`. Requires the `users:update` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "New display name. Surrounding spaces are removed. Rejected when the identity provider manages the user's name.",
                    "example": "Ada King"
                  },
                  "email": {
                    "type": "string",
                    "maxLength": 254,
                    "format": "email",
                    "description": "New email address. Changing it marks the email as unverified until the user confirms it. It can't belong to another user.",
                    "example": "ada.king@example.com"
                  },
                  "role": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Instance role: `admin` administers the instance, `user` has no instance permissions, or the name of a custom role. Only administrators can assign `admin`, and nobody can assign a role with permissions they don't have.",
                    "example": "support"
                  }
                },
                "description": "Fields to change. Send at least one; omitted fields keep their value."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUser"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or empty body, an unknown role (code UNKNOWN_ROLE), a change to your own role (code YOU_CANNOT_CHANGE_YOUR_OWN_ROLE), or removing the last administrator (code CANNOT_REMOVE_LAST_ADMIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `users:update` instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), the role is `admin` and the caller is not an administrator (code ADMIN_ROLE_REQUIRED), the role has permissions the caller lacks (code ROLE_EXCEEDS_YOUR_PERMISSIONS), the identity provider manages the user's name (code PROFILE_FIELD_MANAGED_BY_PROVIDER), or the request used an API key (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Another user has this email address (code USER_ALREADY_EXISTS)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteAdminUser",
        "tags": [
          "Admin"
        ],
        "summary": "Delete a user",
        "description": "Permanently deletes a user's account, the same way they could themselves: workspaces where they are the only member are deleted, and they leave the others. Their sessions end and their realtime connections close. Fails while they are the only owner of a workspace with other members. Records `user.deleted` in the audit log. Requires the `users:delete` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminDeletedUser"
                }
              }
            }
          },
          "400": {
            "description": "You can't delete yourself (code YOU_CANNOT_REMOVE_YOURSELF) or the last administrator (code CANNOT_REMOVE_LAST_ADMIN)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The user is the only owner of a workspace with other members (code SOLE_WORKSPACE_OWNER), or a workspace that would be deleted has an active subscription (code WORKSPACE_HAS_ACTIVE_SUBSCRIPTION)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/users/{userId}/deactivate": {
      "post": {
        "operationId": "deactivateAdminUser",
        "tags": [
          "Admin"
        ],
        "summary": "Deactivate a user",
        "description": "Deactivates a user: blocks them from signing in until reactivated, with no end date, ends all of their sessions and closes their realtime connections, and returns the user. Their data and workspace memberships stay. Records `user.deactivated` in the audit log unless the user was already deactivated without an end date. Requires the `users:disable` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deactivated user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUser"
                }
              }
            }
          },
          "400": {
            "description": "You can't deactivate yourself (code YOU_CANNOT_BAN_YOURSELF)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/users/{userId}/reactivate": {
      "post": {
        "operationId": "reactivateAdminUser",
        "tags": [
          "Admin"
        ],
        "summary": "Reactivate a user",
        "description": "Reactivates a deactivated user so they can sign in again, clears the deactivation reason and end date, and returns the user. Reactivating an active user changes nothing. Records `user.reactivated` in the audit log when the user was deactivated. Requires the `users:disable` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The reactivated user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminUser"
                }
              }
            }
          },
          "400": {
            "description": "You can't reactivate yourself (code YOU_CANNOT_UNBAN_YOURSELF)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/roles": {
      "get": {
        "operationId": "listInstanceRoles",
        "tags": [
          "Admin"
        ],
        "summary": "List custom instance roles",
        "description": "Lists the custom instance roles in alphabetical order, with their permissions and how many users have each. The built-in `admin` (every permission) and `user` (none) roles are not listed. Requires the `users:read` instance permission; API keys are rejected.",
        "responses": {
          "200": {
            "description": "Custom instance roles by name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceRoleList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "operationId": "createInstanceRole",
        "tags": [
          "Admin"
        ],
        "summary": "Create a custom instance role",
        "description": "Creates a custom instance role that grants a set of instance permissions, and returns it. Assign it to users by name. Records `role.created` in the audit log. Requires the `roles:manage` instance permission, which only the built-in `admin` role has; API keys are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{1,31}$",
                    "description": "Name of the role: 2 to 32 lowercase letters, digits and hyphens, starting with a letter. `admin` and `user` are reserved.",
                    "example": "support"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "users:read",
                        "users:create",
                        "users:update",
                        "users:disable",
                        "users:delete",
                        "users:credentials",
                        "users:sessions",
                        "users:api_keys",
                        "workspaces:read",
                        "workspaces:manage",
                        "workspaces:archive",
                        "workspaces:delete",
                        "audit:read",
                        "system:read",
                        "instance:settings"
                      ]
                    },
                    "maxItems": 30,
                    "description": "Instance permissions the role grants. Duplicates are removed and the list is stored in a fixed order. `roles:manage` belongs to the built-in admin role only.",
                    "example": [
                      "users:read",
                      "users:credentials",
                      "audit:read"
                    ]
                  }
                },
                "required": [
                  "name",
                  "permissions"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceRole"
                }
              }
            }
          },
          "400": {
            "description": "A name that is not 2 to 32 lowercase letters, digits or hyphens starting with a letter, or an unknown permission, including `roles:manage`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The name is reserved for a built-in role (code ROLE_NAME_RESERVED), another role has it (code ROLE_NAME_TAKEN), or users already have a role with this name (code ROLE_NAME_IN_USE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/roles/{roleId}": {
      "put": {
        "operationId": "updateInstanceRole",
        "tags": [
          "Admin"
        ],
        "summary": "Update a custom instance role",
        "description": "Replaces a custom role's name and permissions, and returns the role. Users who have it keep it under the new name, and permission changes apply to their next request. Records `role.updated` in the audit log with the rename and the added and removed permissions; a request that changes nothing records nothing. Requires the `roles:manage` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the custom instance role.",
              "example": "lwsddfbnw8ypo2y9nfsqay3p"
            },
            "required": true,
            "description": "ID of the custom instance role.",
            "name": "roleId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9-]{1,31}$",
                    "description": "Name of the role: 2 to 32 lowercase letters, digits and hyphens, starting with a letter. `admin` and `user` are reserved.",
                    "example": "support"
                  },
                  "permissions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "users:read",
                        "users:create",
                        "users:update",
                        "users:disable",
                        "users:delete",
                        "users:credentials",
                        "users:sessions",
                        "users:api_keys",
                        "workspaces:read",
                        "workspaces:manage",
                        "workspaces:archive",
                        "workspaces:delete",
                        "audit:read",
                        "system:read",
                        "instance:settings"
                      ]
                    },
                    "maxItems": 30,
                    "description": "Instance permissions the role grants. Duplicates are removed and the list is stored in a fixed order. `roles:manage` belongs to the built-in admin role only.",
                    "example": [
                      "users:read",
                      "users:credentials",
                      "audit:read"
                    ]
                  }
                },
                "required": [
                  "name",
                  "permissions"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceRole"
                }
              }
            }
          },
          "400": {
            "description": "A name that is not 2 to 32 lowercase letters, digits or hyphens starting with a letter, or an unknown permission, including `roles:manage`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No custom role has this ID (code ROLE_NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The new name is reserved for a built-in role (code ROLE_NAME_RESERVED), another role has it (code ROLE_NAME_TAKEN), or users already have a role with this name (code ROLE_NAME_IN_USE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "deleteInstanceRole",
        "tags": [
          "Admin"
        ],
        "summary": "Delete a custom instance role",
        "description": "Deletes a custom role that no user has and that is not the default role for new users. Records `role.deleted` in the audit log. Requires the `roles:manage` instance permission; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the custom instance role.",
              "example": "lwsddfbnw8ypo2y9nfsqay3p"
            },
            "required": true,
            "description": "ID of the custom instance role.",
            "name": "roleId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deleted role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedInstanceRole"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No custom role has this ID (code ROLE_NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Users still have this role (code ROLE_IN_USE), or it is the default role for new users (code ROLE_IS_DEFAULT)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/settings": {
      "get": {
        "operationId": "getInstanceSettings",
        "tags": [
          "Admin"
        ],
        "summary": "Get instance settings",
        "description": "Returns the instance-wide settings with environment overrides applied, which settings an environment variable locks, and the choices for the default role and turned-off integrations. Requires the `instance:settings` instance permission; API keys are rejected.",
        "responses": {
          "200": {
            "description": "Instance settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceSettings"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "patch": {
        "operationId": "updateInstanceSettings",
        "tags": [
          "Admin"
        ],
        "summary": "Update instance settings",
        "description": "Changes one or more instance-wide settings and returns all of them. Other API instances apply a change within a few seconds. Changed settings are recorded in the audit log as `instance.settings_updated`; a request that changes nothing records nothing. Requires the `instance:settings` instance permission; API keys are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "instanceName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 60,
                    "description": "Name of the instance, shown in page titles and email headers and subjects. Surrounding spaces are removed. Empty or null restores albus.",
                    "example": "Acme Projects"
                  },
                  "registrationEnabled": {
                    "type": "boolean",
                    "description": "Whether anyone can create an account. When false, only people with a valid invitation can. Locked when `DISABLE_REGISTRATION=true`.",
                    "example": true
                  },
                  "passwordRegistrationEnabled": {
                    "type": "boolean",
                    "description": "Whether new accounts can sign up with a password. When false, new accounts must use a social or OIDC provider. Locked when `DISABLE_PASSWORD_REGISTRATION=true`.",
                    "example": true
                  },
                  "requireEmailVerification": {
                    "type": "boolean",
                    "description": "Whether new password sign-ups must confirm their email before they can sign in. Turning it on requires email delivery to be configured.",
                    "example": false
                  },
                  "defaultRole": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Instance role given to new users: `user` or a custom role name, never `admin`. You can only choose a role whose permissions you have.",
                    "example": "user"
                  },
                  "workspaceCreationRestricted": {
                    "type": "boolean",
                    "description": "Whether only administrators can create workspaces. Locked when `DISABLE_WORKSPACE_CREATION=true`.",
                    "example": false
                  },
                  "disabledIntegrations": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 32,
                    "description": "Integration provider types to turn off, such as `slack` or `github`; see `integrationProviders` in the response for the valid types. Replaces the whole list; send an empty array to turn every provider back on. Turned-off providers stop syncing and delivering, and projects can't connect them.",
                    "example": [
                      "telegram"
                    ]
                  }
                },
                "description": "Settings to change. Send at least one; omitted settings keep their value."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or empty body, `admin` as the default role (code ADMIN_DEFAULT_ROLE), an unknown role (code UNKNOWN_ROLE), an unknown integration type (code UNKNOWN_INTEGRATION), or email verification without SMTP (code EMAIL_DELIVERY_NOT_CONFIGURED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), chose a default role with permissions they lack (code ROLE_EXCEEDS_YOUR_PERMISSIONS), or used an API key (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "An environment variable locks the setting (code SETTING_LOCKED_BY_ENV)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/providers/smtp": {
      "get": {
        "operationId": "getAdminSmtpProviderConfig",
        "tags": [
          "Admin"
        ],
        "summary": "Get SMTP provider configuration",
        "description": "Returns the saved SMTP settings, or the ones set by environment variables when `lockedByEnv` is true. The password is never returned; `hasPassword` says whether one is stored. Requires the `instance:settings` instance permission; API keys are rejected.",
        "responses": {
          "200": {
            "description": "SMTP configuration view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSmtpProviderConfig"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateAdminSmtpProviderConfig",
        "tags": [
          "Admin"
        ],
        "summary": "Save SMTP provider configuration",
        "description": "Replaces the saved SMTP settings, encrypted at rest, and returns them with the password redacted. Omitted optional fields take their defaults, except the password, which is kept when omitted. Repeating the same request leaves the same settings. Requires the `instance:settings` instance permission; API keys are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "host": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "SMTP server host name.",
                    "example": "smtp.example.com"
                  },
                  "port": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 65535,
                    "default": 587,
                    "description": "SMTP server port.",
                    "example": 587
                  },
                  "secure": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether to use TLS from the start (usually port 465) instead of upgrading with STARTTLS.",
                    "example": false
                  },
                  "username": {
                    "type": "string",
                    "maxLength": 255,
                    "default": "",
                    "description": "User name for SMTP authentication. Empty for none.",
                    "example": "mailer@example.com"
                  },
                  "password": {
                    "type": "string",
                    "maxLength": 512,
                    "description": "Password for SMTP authentication. Omit it to keep the stored password; send an empty string to remove it.",
                    "example": "correct-horse-battery-staple"
                  },
                  "from": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 255,
                    "description": "Sender address for outgoing email.",
                    "example": "Projects <noreply@example.com>"
                  }
                },
                "required": [
                  "host",
                  "from"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved SMTP configuration view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSmtpProviderConfig"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "`SMTP_HOST` is set, so environment variables control the SMTP configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/providers/oidc": {
      "get": {
        "operationId": "getAdminOidcProviderConfig",
        "tags": [
          "Admin"
        ],
        "summary": "Get OIDC provider configuration",
        "description": "Returns the saved OIDC single sign-on settings, or the ones set by environment variables when `lockedByEnv` is true. The client secret is never returned; `hasClientSecret` says whether one is stored. Requires the `instance:settings` instance permission; API keys are rejected.",
        "responses": {
          "200": {
            "description": "OIDC configuration view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOidcProviderConfig"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "put": {
        "operationId": "updateAdminOidcProviderConfig",
        "tags": [
          "Admin"
        ],
        "summary": "Save OIDC provider configuration",
        "description": "Replaces the saved OIDC single sign-on settings, encrypted at rest, and returns them with the client secret redacted. Omitted optional fields take their defaults, except the client secret, which is kept when omitted. Repeating the same request leaves the same settings. Requires the `instance:settings` instance permission; API keys are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "issuer": {
                    "type": "string",
                    "maxLength": 512,
                    "format": "uri",
                    "description": "Issuer or discovery URL of the OIDC provider.",
                    "example": "https://id.example.com/realms/acme"
                  },
                  "clientId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "description": "OAuth client ID registered with the provider.",
                    "example": "acme-web"
                  },
                  "clientSecret": {
                    "type": "string",
                    "maxLength": 512,
                    "description": "OAuth client secret. Omit it to keep the stored secret; send an empty string to remove it.",
                    "example": "s3cr3t-value-from-provider"
                  },
                  "scopes": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255,
                    "default": "openid email profile groups",
                    "description": "Space-separated OAuth scopes to request at sign-in.",
                    "example": "openid email profile groups"
                  },
                  "groupsClaim": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "default": "groups",
                    "description": "Name of the ID token claim that lists the user's groups.",
                    "example": "groups"
                  },
                  "lockProfileFields": {
                    "type": "boolean",
                    "default": false,
                    "description": "Whether profile fields that come from the provider are locked against editing.",
                    "example": false
                  }
                },
                "required": [
                  "issuer",
                  "clientId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved OIDC configuration view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminOidcProviderConfig"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "`CUSTOM_OAUTH_CLIENT_ID` or `OIDC_CLIENT_ID` is set, so environment variables control the OIDC configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/webhooks": {
      "get": {
        "tags": [
          "Admin"
        ],
        "operationId": "listInstanceWebhooks",
        "summary": "List instance webhooks",
        "description": "Lists the instance webhooks, newest first, without their signing secrets. Instance webhooks receive administrative audit log events. `signingConfigured` says whether webhooks can be created. Requires the `instance:settings` instance permission and a user session; API keys are rejected.",
        "responses": {
          "200": {
            "description": "Instance webhooks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceWebhookList"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No instance webhook has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Admin"
        ],
        "operationId": "createInstanceWebhook",
        "summary": "Create an instance webhook",
        "description": "Creates a webhook that receives each new audit log entry in the selected categories as a signed JSON POST request, and returns its signing secret, which is shown only once. The URL must resolve to a public address and use HTTPS in production. Failed deliveries are retried up to 3 attempts in total. Recorded in the audit log as `webhook.created`. Requires the `instance:settings` instance permission and a user session; API keys are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "URL that receives the deliveries as signed JSON POST requests. It must resolve to a public address, use HTTPS in production, and have no credentials or fragment.",
                    "example": "https://hooks.example.com/support/audit"
                  },
                  "categories": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "user",
                        "session",
                        "api_key",
                        "workspace",
                        "role",
                        "instance",
                        "email",
                        "webhook"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 8,
                    "description": "Audit log categories to deliver, matched against the part of the action before the dot: `user`, `session`, `api_key`, `workspace`, `role`, `instance`, `email` or `webhook`. Duplicates are removed.",
                    "example": [
                      "user",
                      "workspace"
                    ]
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether the webhook receives deliveries. Disabling it fails its queued deliveries.",
                    "example": true
                  }
                },
                "required": [
                  "url",
                  "categories",
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created webhook and one-time secret",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceWebhookSecret"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or a URL that is not HTTPS in production, has credentials or a fragment, or does not resolve to a public address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No instance webhook has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Signing secrets can't be stored because `NOTIFICATION_SECRET_ENCRYPTION_KEY` is not set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/webhooks/{webhookId}": {
      "put": {
        "tags": [
          "Admin"
        ],
        "operationId": "updateInstanceWebhook",
        "summary": "Update an instance webhook",
        "description": "Replaces a webhook's URL, categories and enabled state. Disabling the webhook, or enabling a disabled one, fails the deliveries still queued from before. The signing secret does not change. Recorded in the audit log as `webhook.updated`. Requires the `instance:settings` instance permission and a user session; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the instance webhook.",
              "example": "gnm03jdrqyti0vfrx300a17l"
            },
            "required": true,
            "description": "ID of the instance webhook.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "URL that receives the deliveries as signed JSON POST requests. It must resolve to a public address, use HTTPS in production, and have no credentials or fragment.",
                    "example": "https://hooks.example.com/support/audit"
                  },
                  "categories": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "user",
                        "session",
                        "api_key",
                        "workspace",
                        "role",
                        "instance",
                        "email",
                        "webhook"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 8,
                    "description": "Audit log categories to deliver, matched against the part of the action before the dot: `user`, `session`, `api_key`, `workspace`, `role`, `instance`, `email` or `webhook`. Duplicates are removed.",
                    "example": [
                      "user",
                      "workspace"
                    ]
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether the webhook receives deliveries. Disabling it fails its queued deliveries.",
                    "example": true
                  }
                },
                "required": [
                  "url",
                  "categories",
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated webhook",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, or a URL that is not HTTPS in production, has credentials or a fragment, or does not resolve to a public address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No instance webhook has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "tags": [
          "Admin"
        ],
        "operationId": "deleteInstanceWebhook",
        "summary": "Delete an instance webhook",
        "description": "Deletes a webhook together with its queued and past deliveries. Recorded in the audit log as `webhook.deleted`. Requires the `instance:settings` instance permission and a user session; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the instance webhook.",
              "example": "gnm03jdrqyti0vfrx300a17l"
            },
            "required": true,
            "description": "ID of the instance webhook.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted webhook id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceWebhookQueued"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No instance webhook has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/webhooks/{webhookId}/rotate-secret": {
      "post": {
        "tags": [
          "Admin"
        ],
        "operationId": "rotateInstanceWebhookSecret",
        "summary": "Rotate a webhook signing secret",
        "description": "Replaces a webhook's signing secret and returns the new one, which is shown only once. Every delivery sent after the change, including queued ones, is signed with the new secret. Recorded in the audit log as `webhook.secret_rotated`. Requires the `instance:settings` instance permission and a user session; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the instance webhook.",
              "example": "gnm03jdrqyti0vfrx300a17l"
            },
            "required": true,
            "description": "ID of the instance webhook.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook and one-time secret",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceWebhookSecret"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No instance webhook has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Signing secrets can't be stored because `NOTIFICATION_SECRET_ENCRYPTION_KEY` is not set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/webhooks/{webhookId}/test": {
      "post": {
        "tags": [
          "Admin"
        ],
        "operationId": "testInstanceWebhook",
        "summary": "Queue a test webhook delivery",
        "description": "Queues a `webhook.test` event for the webhook, whatever categories it has selected, and returns the delivery ID. Delivery happens in the background; check the delivery list for the result. Requires the `instance:settings` instance permission and a user session; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the instance webhook.",
              "example": "gnm03jdrqyti0vfrx300a17l"
            },
            "required": true,
            "description": "ID of the instance webhook.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Queued delivery id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstanceWebhookQueued"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No instance webhook has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The webhook is disabled; enable it before sending a test",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/webhooks/{webhookId}/deliveries": {
      "get": {
        "tags": [
          "Admin"
        ],
        "operationId": "listInstanceWebhookDeliveries",
        "summary": "List recent webhook deliveries",
        "description": "Lists the webhook's 20 most recent deliveries, newest first, without payloads, URLs, secrets or response bodies. Only the newest 20 finished deliveries are kept. Requires the `instance:settings` instance permission and a user session; API keys are rejected.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "ID of the instance webhook.",
              "example": "gnm03jdrqyti0vfrx300a17l"
            },
            "required": true,
            "description": "ID of the instance webhook.",
            "name": "webhookId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Recent deliveries",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InstanceWebhookDelivery"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the `instance:settings` instance permission (code INSTANCE_PERMISSION_REQUIRED), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No instance webhook has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/users/{userId}/sessions": {
      "get": {
        "operationId": "listAdminUserSessions",
        "tags": [
          "Admin"
        ],
        "summary": "List a user's sessions",
        "description": "Lists a user's signed-in sessions with device, IP address, and activity. Session tokens are never returned. `current` marks the administrator's own session. Requires the `users:sessions` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Active sessions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveSessionList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      },
      "delete": {
        "operationId": "revokeAdminUserSessions",
        "tags": [
          "Admin"
        ],
        "summary": "Sign out all of a user's sessions",
        "description": "Ends every session of a user immediately, closes their realtime connections, and returns how many sessions ended. When administrators target themselves, their current session is kept. API keys keep working; revoke them separately. Records `session.revoked_all` in the audit log when at least one session ended. Requires the `users:sessions` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Sessions signed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokedSessions"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/users/{userId}/sessions/{sessionId}": {
      "delete": {
        "operationId": "revokeAdminUserSession",
        "tags": [
          "Admin"
        ],
        "summary": "Sign out one of a user's sessions",
        "description": "Ends one of a user's sessions immediately and closes its realtime connections. The administrator's own current session can't be ended here; sign out instead. Records `session.revoked` in the audit log. Requires the `users:sessions` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the session to sign out.",
              "example": "soermrtacx0z70uq94qjhn8o"
            },
            "required": true,
            "description": "ID of the session to sign out.",
            "name": "sessionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Session signed out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokedSessions"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID, or the user has no session with this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The session is the administrator's current session; sign out instead",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/users/{userId}/api-keys": {
      "get": {
        "operationId": "listAdminUserApiKeys",
        "tags": [
          "Admin"
        ],
        "summary": "List a user's API keys",
        "description": "Lists a user's API keys, newest first, with their name, first characters, status, and dates. The key and its hash are never returned. Requires the `users:api_keys` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "API keys, newest first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminApiKeyList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/admin/users/{userId}/api-keys/{apiKeyId}": {
      "delete": {
        "operationId": "revokeAdminUserApiKey",
        "tags": [
          "Admin"
        ],
        "summary": "Revoke a user's API key",
        "description": "Deletes a user's API key so requests with it fail immediately, and closes realtime connections opened with it. Records `api_key.revoked` in the audit log with the key's ID and name. Requires the `users:api_keys` instance permission; API keys are rejected. The caller must hold every instance permission the user holds, unless the caller is a built-in administrator.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the user.",
              "example": "dvbh5d4ue1zvi3duyefsoqma"
            },
            "required": true,
            "description": "ID of the user.",
            "name": "userId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "ID of the API key to revoke.",
              "example": "wu1eutp17e82v57sxvtkz4tg"
            },
            "required": true,
            "description": "ID of the API key to revoke.",
            "name": "apiKeyId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "API key revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminRevokedApiKey"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the required instance permission (code INSTANCE_PERMISSION_REQUIRED), the user holds instance permissions the caller lacks (code USER_HAS_MORE_PERMISSIONS), or the request used an API key instead of a user session (code SESSION_REQUIRED)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No user has this ID, or the user has no API key with this ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/plugins": {
      "get": {
        "operationId": "listPlugins",
        "tags": [
          "Plugins"
        ],
        "summary": "List plugins",
        "description": "Lists the plugins installed on this instance with the settings each one declares. With `workspaceId`, each plugin also includes whether it is on in that workspace and its current settings; this requires membership in the workspace, and a non-member gets 404. Secret settings are never returned.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "Include whether each plugin is enabled in this workspace, and its settings. Requires membership.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": false,
            "description": "Include whether each plugin is enabled in this workspace, and its settings. Requires membership.",
            "name": "workspaceId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Installed plugins",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PluginList"
                }
              }
            }
          },
          "400": {
            "description": "The query failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The workspace is archived, or the API key is not valid for it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/plugins/{pluginId}/workspace/{workspaceId}": {
      "put": {
        "operationId": "updateWorkspacePlugin",
        "tags": [
          "Plugins"
        ],
        "summary": "Update a plugin in a workspace",
        "description": "Turns a plugin on or off in a workspace and saves its settings, returning the plugin's state there. Omitted fields keep their current value; sent settings are merged over the stored ones and checked against what the plugin declares. Turning a plugin on requires every required setting to have a value. Publishes a `workspace_plugin.updated` event. Requires the `workspace:manage_settings` workspace permission.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "ID of a plugin installed on this instance.",
              "example": "acme-standup"
            },
            "required": true,
            "description": "ID of a plugin installed on this instance.",
            "name": "pluginId",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "ID of the workspace.",
              "example": "cfklow33tpuxgpxko9nxqllg"
            },
            "required": true,
            "description": "ID of the workspace.",
            "name": "workspaceId",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkspacePlugin"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The plugin's state in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspacePluginState"
                }
              }
            }
          },
          "400": {
            "description": "The body failed validation, or settings failed the plugin's checks (JSON with a message per field)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PluginSettingsError"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Missing the `workspace:manage_settings` permission or API key scope, or the workspace is archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No plugin with this ID is installed, or the workspace was not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The stored settings kept changing during the update; retry it",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    },
    "/plugins/{pluginId}/data": {
      "delete": {
        "operationId": "purgePluginData",
        "tags": [
          "Plugins"
        ],
        "summary": "Delete a plugin's data",
        "description": "Delete everything a plugin stored and its settings in every workspace. Only works for a plugin that is no longer installed: remove it from kaneo.config.ts, or turn a built-in plugin off there, and restart albus first. Requires a signed-in session with the instance:settings permission; API keys are rejected. This cannot be undone.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9-]{0,63}$",
              "description": "The plugin's ID: lowercase letters, digits and dashes, like kaneo-plugin-task-progress.",
              "example": "acme-standup"
            },
            "required": true,
            "description": "The plugin's ID: lowercase letters, digits and dashes, like kaneo-plugin-task-progress.",
            "name": "pluginId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Rows deleted from each table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PluginDataPurge"
                }
              }
            }
          },
          "400": {
            "description": "The plugin ID is not lowercase letters, digits and dashes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The caller lacks the instance:settings permission or is authenticated with an API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The plugin is still installed, or plugins are turned off with DISABLE_PLUGINS",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/ApiKeyRateLimited"
          }
        }
      }
    }
  },
  "webhooks": {},
  "tags": [
    {
      "name": "Authentication",
      "description": "The current session, the device authorization page and OAuth ID tokens. Sign-in itself uses the account endpoints under /auth."
    },
    {
      "name": "User",
      "description": "The signed-in user's profile, avatar and active sessions."
    },
    {
      "name": "Workspaces",
      "description": "List workspaces and their members, check your capabilities and project access, and map identity provider groups to roles."
    },
    {
      "name": "Organization Management",
      "description": "Workspace membership, invitations, roles and teams, served by the account endpoints under /auth/organization. Workspaces are called organizations there."
    },
    {
      "name": "Invitations",
      "description": "Workspace invitations waiting for the signed-in user."
    },
    {
      "name": "Notifications",
      "description": "In-app notifications for the signed-in user."
    },
    {
      "name": "Notification Preferences",
      "description": "How the signed-in user is notified, overall and per workspace."
    },
    {
      "name": "Conversations",
      "description": "Customer conversations and their messages, tags, custom attributes and state."
    },
    {
      "name": "Tickets",
      "description": "Tickets, with their statuses, types and stage labels."
    },
    {
      "name": "Inbox and views",
      "description": "The teammate inbox: queues and counts, saved views, macros (saved replies), workspace search and batched reads."
    },
    {
      "name": "Inbox settings and channels",
      "description": "Support settings: the email channel and sending domains, office hours, routing, away replies, spam filtering, CSAT surveys, SLA defaults and support reports."
    },
    {
      "name": "Automation and SLAs",
      "description": "Workflows that act on events automatically, their runs, and SLA policies."
    },
    {
      "name": "Support notifications",
      "description": "A teammate's support notifications, notification preferences and push devices."
    },
    {
      "name": "AI assistant",
      "description": "The AI assistant: its knowledge, guidance, skills and connectors, suggested replies and drafts, and the actions it proposes for review."
    },
    {
      "name": "Help center",
      "description": "Help center articles and categories as teammates write and organize them, with translations, review dates, search synonyms and article feedback."
    },
    {
      "name": "Status page",
      "description": "The status page: components, groups, incidents, updates, templates and subscribers."
    },
    {
      "name": "Feedback boards",
      "description": "Feedback boards and posts, with votes, comments, tags, statuses, moderation, merge suggestions, feedback signals and links to projects and tasks."
    },
    {
      "name": "Roadmaps",
      "description": "Roadmaps, their columns and the posts on them."
    },
    {
      "name": "Changelog and releases",
      "description": "Changelog entries, their subscribers and engagement, and verified releases."
    },
    {
      "name": "Contacts and companies",
      "description": "Customers and companies, their custom attributes and tags, segments, and customer context from connected tools."
    },
    {
      "name": "Teammates and teams",
      "description": "Teammates as support shows them, support teams bound to workspace teams, and @-mention suggestions."
    },
    {
      "name": "Projects",
      "description": "Create, update, reorder, archive, move and delete projects, with their backgrounds and public project pages."
    },
    {
      "name": "Tasks",
      "description": "Tasks on project boards: create, read, update, move, bulk edit, import and export, with attachments and descriptions."
    },
    {
      "name": "Columns",
      "description": "The board columns of a project."
    },
    {
      "name": "Labels",
      "description": "Labels on tasks and in workspaces."
    },
    {
      "name": "Comments",
      "description": "Comments on tasks."
    },
    {
      "name": "Activity",
      "description": "Task and workspace activity, including comments in a task's activity feed."
    },
    {
      "name": "Time Entries",
      "description": "Time tracked on tasks."
    },
    {
      "name": "Task Relations",
      "description": "Links between two tasks, read from either side."
    },
    {
      "name": "External Links",
      "description": "Links from a task to outside resources, added by hand or by a connected integration."
    },
    {
      "name": "Custom Fields",
      "description": "Custom fields of a project and their values on tasks."
    },
    {
      "name": "Workflow Rules",
      "description": "Rules that move a task to a column when an integration event fires."
    },
    {
      "name": "Search",
      "description": "Search tasks, projects, workspaces, comments and activity in one workspace."
    },
    {
      "name": "Calendar feeds",
      "description": "iCalendar feeds of a project's scheduled tasks. The feed URL carries a secret token instead of a credential."
    },
    {
      "name": "Import",
      "description": "Import projects from other tools in the background."
    },
    {
      "name": "Integrations",
      "description": "Connections from support to outside tools: setup, OAuth connection flows, provider credentials and sync with issue trackers."
    },
    {
      "name": "Webhooks and apps",
      "description": "Outgoing webhooks and their deliveries, the outbox event feed, and sidebar apps. App endpoints need an API key that an active app of the workspace holds."
    },
    {
      "name": "Integration sync",
      "description": "Rules that keep a project's tasks in sync with issues in a connected tool, and the review of paused links."
    },
    {
      "name": "GitHub",
      "description": "Connect a project to a GitHub repository."
    },
    {
      "name": "GitLab",
      "description": "Connect a project to a GitLab project."
    },
    {
      "name": "Gitea",
      "description": "Connect a project to a Gitea repository."
    },
    {
      "name": "Tangled",
      "description": "Connect a project to a Tangled repository, and receive its signed webhooks."
    },
    {
      "name": "Generic Webhook",
      "description": "A project's outgoing webhook for task events."
    },
    {
      "name": "Slack",
      "description": "Send a project's task events to Slack."
    },
    {
      "name": "Discord",
      "description": "Send a project's task events to Discord."
    },
    {
      "name": "Mattermost",
      "description": "Send a project's task events to Mattermost."
    },
    {
      "name": "Telegram",
      "description": "Send a project's task events to Telegram."
    },
    {
      "name": "MCP",
      "description": "OAuth client registration and consent for MCP clients."
    },
    {
      "name": "Plugins",
      "description": "Installed plugins and their settings in each workspace."
    },
    {
      "name": "Settings and domains",
      "description": "Workspace settings for branding, email brands and templates, the portal and the widget, with custom domains, portal invites and usage."
    },
    {
      "name": "Reporting and insights",
      "description": "Reports and analytics, feedback insights and scoring factors, and surveys."
    },
    {
      "name": "Privacy and audit",
      "description": "Customer data access and erasure requests, retention schedules and the audit log."
    },
    {
      "name": "Files",
      "description": "Upload URLs and stored files for attachments, images and workspace logos."
    },
    {
      "name": "Data transfer and jobs",
      "description": "Imports, exports, scheduled backups and the list of background jobs."
    },
    {
      "name": "Admin",
      "description": "Instance administration: users, workspaces, roles, settings, mail, webhooks and the audit log. Needs instance permissions."
    },
    {
      "name": "Instance",
      "description": "Whether the server is set up."
    },
    {
      "name": "Config",
      "description": "Public settings that clients read before sign-in: the name, sign-in methods and enabled features."
    },
    {
      "name": "Desktop",
      "description": "Turns a desktop sign-in token into the desktop app's session cookie."
    },
    {
      "name": "Assets",
      "description": "Downloads of uploaded files. A file of a public project needs no sign-in."
    },
    {
      "name": "Widget (public)",
      "description": "Endpoints that the embeddable chat and feedback widget calls. They take a widget session token, not an API key."
    },
    {
      "name": "Customer portal (public)",
      "description": "Endpoints that the customer portal, the public help center, the status page and the public changelog call. Some need the customer's own session."
    },
    {
      "name": "Signed callbacks",
      "description": "Endpoints that outside services and browsers call: provider webhooks, inbound mail, OAuth redirects and portal sign-in links. Each one checks a signature, secret, signed token or one-time code."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Account and access",
      "tags": [
        "Authentication",
        "User",
        "Workspaces",
        "Organization Management",
        "Invitations",
        "Notifications",
        "Notification Preferences"
      ]
    },
    {
      "name": "Support",
      "tags": [
        "Conversations",
        "Tickets",
        "Inbox and views",
        "Inbox settings and channels",
        "Automation and SLAs",
        "Support notifications"
      ]
    },
    {
      "name": "AI",
      "tags": [
        "AI assistant"
      ]
    },
    {
      "name": "Self-service",
      "tags": [
        "Help center",
        "Status page"
      ]
    },
    {
      "name": "Feedback and releases",
      "tags": [
        "Feedback boards",
        "Roadmaps",
        "Changelog and releases"
      ]
    },
    {
      "name": "Contacts",
      "tags": [
        "Contacts and companies",
        "Teammates and teams"
      ]
    },
    {
      "name": "Projects",
      "tags": [
        "Projects",
        "Tasks",
        "Columns",
        "Labels",
        "Comments",
        "Activity",
        "Time Entries",
        "Task Relations",
        "External Links",
        "Custom Fields",
        "Workflow Rules",
        "Search",
        "Calendar feeds",
        "Import"
      ]
    },
    {
      "name": "Integrations",
      "tags": [
        "Integrations",
        "Webhooks and apps",
        "Integration sync",
        "GitHub",
        "GitLab",
        "Gitea",
        "Tangled",
        "Generic Webhook",
        "Slack",
        "Discord",
        "Mattermost",
        "Telegram",
        "MCP",
        "Plugins"
      ]
    },
    {
      "name": "Workspace and admin",
      "tags": [
        "Settings and domains",
        "Reporting and insights",
        "Privacy and audit",
        "Files",
        "Data transfer and jobs",
        "Admin",
        "Instance",
        "Config",
        "Desktop",
        "Assets"
      ]
    },
    {
      "name": "Public endpoints",
      "tags": [
        "Widget (public)",
        "Customer portal (public)",
        "Signed callbacks"
      ]
    }
  ]
}
