API de Hub
Tus scripts y servicios actúan en tu nombre con los mismos permisos que tu agente.
Dirección base: https://hub.n1.team/api/v1. Guarda la clave en el servidor o en un script local. Esta API es para clientes de servidor; las peticiones cross-origin del navegador no están admitidas. El /api interno de la aplicación no es un contrato público.
Empezar
Crea una clave personal en la página Agentes. Guárdala como N1_HUB_KEY donde se ejecuta tu script. Es la misma clave que para MCP; las cookies y el token de arranque de emergencia no se aceptan.
Crear una tarea
curl --fail-with-body -X POST 'https://hub.n1.team/api/v1/tasks' \
-H "Authorization: Bearer $N1_HUB_KEY" \
-H 'Content-Type: application/json' \
--data '{"title":"Comprobar el recorrido"}'HTTP 200 devuelve la tarea. El mismo título de la misma persona en diez minutos devuelve la tarea existente. Una tarea de agente sin motivo de aceptación entra en clasificación.
Leer una tarea
curl --fail-with-body -X GET 'https://hub.n1.team/api/v1/tasks/HUB-123' \
-H "Authorization: Bearer $N1_HUB_KEY"Cambiar una tarea
curl --fail-with-body -X PATCH 'https://hub.n1.team/api/v1/tasks/HUB-123' \
-H "Authorization: Bearer $N1_HUB_KEY" \
-H 'Content-Type: application/json' \
--data '{"plannedStart":"2026-11-02","dueDate":"2026-11-06"}'plannedStart y dueDate son fechas sin hora; null borra esa fecha. El inicio no puede ser posterior al plazo; las fechas no se mueven solas. Para proteger el texto de otra edición, envía expectedDescription con la descripción original. Para las fechas, envía expectedDates con los dos valores originales de plannedStart y dueDate. Un 409 deja todos los campos de la tarea sin cambios.
Leer una métrica
curl --fail-with-body -X POST 'https://hub.n1.team/api/v1/metrics/query' \
-H "Authorization: Bearer $N1_HUB_KEY" \
-H 'Content-Type: application/json' \
--data '{"product":"your-product","ref":"events.count:open","days":28}'Sustituye product por el código de tu producto y ref por una referencia de métrica de Hub. days vale 28 por defecto y 730 como máximo. En su lugar puedes enviar from y to (YYYY-MM-DD), como máximo 730 días incluidos. Los números traen su fuente, la fecha de los datos, los huecos y las reservas. Un hueco es null, no cero. Las métricas de dinero usan major units; amounts indica la escala.
Proceso de trabajo del equipo
curl --fail-with-body -X GET 'https://hub.n1.team/api/v1/workflow' \
-H "Authorization: Bearer $N1_HUB_KEY"PUT /workflow guarda la config completa y el expectedVersion obligatorio tomado de la lectura. Lo cambia el propietario o su agente con reason; un 409 por datos viejos no crea una versión parcial. Puedes añadir, renombrar y reordenar columnas y tipos. Quitar IDs existentes o cambiar la categoría de una columna existente se rechaza. Los campos columnId y taskTypeId se añaden a las tareas; status conserva la categoría para clientes antiguos. La configuración no arranca agentes ni los reasigna.
Contrato y límites
Hasta 120 solicitudes por minuto y clave, compartidas con MCP. Cuerpo de la petición: hasta 256 KiB; Content-Type: application/json. Siguen las cuotas del equipo y los permisos de producto. Revocar la clave, quitar a la persona del equipo y estrechar el acceso surten efecto en la siguiente solicitud. Las respuestas privadas no deben guardarse en caché.
Esta versión crea, lee y cambia una tarea, lee una métrica numérica y configura el proceso de trabajo del equipo y la planificación de sprints. GET /planning lee los ajustes; PUT /planning los cambia como propietario. GET /cycles y /cycles/{ref} leen los ciclos; PATCH /cycles/{ref} cambia el objetivo. Los permisos coinciden con MCP. La ficha trae contadores, no el historial, los comentarios ni los adjuntos; la métrica no trae anotaciones de tareas. Las colecciones con cursor y el resto de operaciones llegan aparte. v1 puede añadir campos; un cambio incompatible exige una versión nueva.
Errores
La respuesta contiene code, message y hint (una cadena o null). 400: solicitud no válida; 401: clave no aceptada; 403: acción prohibida; 404: objeto no disponible; 409: la descripción, las fechas de planificación o la versión del proceso ya cambiaron; 413/415: cuerpo o formato; 429: límite de ritmo o cuota (Retry-After en el límite de ritmo); 500: error interno. No repitas a ciegas una escritura cuyo resultado desconoces.
{"code":"unauthorized","message":"…","hint":null}Las lecturas se pueden reintentar: respeta Retry-After en un 429 y usa una espera con variación ante 5xx temporales. Crear tareas no admite Idempotency-Key: evitar duplicados recientes por título no es una garantía general de idempotencia. Tras un tiempo de espera al escribir, comprueba primero el resultado en Hub.
Referencia de campos
Los nombres de campo, los obligatorios, los valores permitidos y los límites de abajo salen de los mismos esquemas que validan las solicitudes. Importa OpenAPI en Postman o en un generador de clientes. Las respuestas son JSON; las fechas y las horas son cadenas ISO. Al soporte le pasas el X-Request-Id, nunca la clave.
McpUpdateAcknowledgement
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"updateId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"keyId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"updateId",
"keyId"
],
"additionalProperties": false
}PlanningInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"kanban",
"cycles"
]
},
"cycleWeeks": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cycleStartDay": {
"type": "integer",
"minimum": 1,
"maximum": 7
},
"timeZone": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"triage": {
"type": "boolean"
},
"staleDays": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"doneArchive": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "after_release"
}
},
"required": [
"mode"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "after_days"
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 365
}
},
"required": [
"mode",
"days"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "manual"
}
},
"required": [
"mode"
],
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
},
"expectedActor": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
}
},
"additionalProperties": false
}CycleGoalInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"goal": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"expectedActor": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
}
},
"required": [
"goal"
],
"additionalProperties": false
}Roadmap
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"productId": {
"type": "string"
},
"product": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"updatedAt": {
"type": [
"string",
"null"
]
},
"author": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"avatarUrl": {
"type": [
"string",
"null"
]
},
"agent": {
"type": [
"string",
"null"
]
}
},
"required": [
"userId",
"name",
"email",
"avatarUrl",
"agent"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"items": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"feature",
"release"
]
},
"title": {
"type": "string"
},
"plannedStart": {
"type": [
"string",
"null"
]
},
"targetDate": {
"type": [
"string",
"null"
]
},
"goal": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"taskCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"archived": {
"type": "boolean"
}
},
"required": [
"id",
"kind",
"title",
"plannedStart",
"targetDate",
"goal",
"taskCount",
"archived"
],
"additionalProperties": false
}
},
"nextOffset": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"total": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"productId",
"product",
"version",
"updatedAt",
"author",
"items",
"nextOffset",
"total"
],
"additionalProperties": false
}RoadmapItem
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"feature",
"release"
]
},
"title": {
"type": "string"
},
"plannedStart": {
"type": [
"string",
"null"
]
},
"targetDate": {
"type": [
"string",
"null"
]
},
"goal": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"taskCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"archived": {
"type": "boolean"
},
"productId": {
"type": "string"
},
"version": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"description": {
"type": "string"
},
"taskKeys": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string"
}
},
"tasks": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"title": {
"type": "string"
},
"status": {
"type": "string"
}
},
"required": [
"key",
"title",
"status"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"kind",
"title",
"plannedStart",
"targetDate",
"goal",
"taskCount",
"archived",
"productId",
"version",
"description",
"taskKeys",
"tasks"
],
"additionalProperties": false
}RoadmapSave
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"feature",
"release"
]
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"default": "",
"type": "string",
"maxLength": 5000
},
"goal": {
"default": null,
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 80
},
{
"type": "null"
}
]
},
"plannedStart": {
"default": null,
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"targetDate": {
"default": null,
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"tasks": {
"default": [],
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"archived": {
"default": false,
"type": "boolean"
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"expectedVersion": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"expectedProductId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"kind",
"title",
"description",
"goal",
"plannedStart",
"targetDate",
"tasks",
"archived",
"expectedVersion"
],
"additionalProperties": false
}TaskTransitionPreviewInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expectedActor": {
"description": "Optional original user/workspace binding, not an identity to act as. A mismatch rejects the request with 403 before writes; key-bound clients may omit it.",
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"expectedStageRevision": {
"description": "Read the task first and pass its stageRevision to reject a changed stage, executor, assignment source, task type, product or site context. Legacy omission remains unconditional.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedWorkflowVersion": {
"description": "Pass the workflowVersion from a transition preview to reject changed process rules before writing.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"taskTypeId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"assignee": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"assignmentMode": {
"type": "string",
"const": "process"
},
"comment": {
"type": "string",
"maxLength": 10000
},
"estimate": {
"anyOf": [
{
"type": "string",
"enum": [
"S",
"M",
"L"
]
},
{
"type": "null"
}
]
},
"progression": {
"type": "string",
"const": "next"
},
"reviewDecision": {
"description": "Preview the common Review decision, including restoration of the previous working executor. Do not combine with status, taskTypeId, assignmentMode or estimate.",
"type": "string",
"enum": [
"approve",
"request_changes"
]
}
},
"additionalProperties": false
}TaskTransitionPreview
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"key": {
"type": "string"
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"workflowVersion": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"current": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"columnId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"taskTypeId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"responsibleUserId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"status",
"columnId",
"taskTypeId",
"assignee",
"responsibleUserId"
],
"additionalProperties": false
},
"next": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"columnId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"taskTypeId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"responsibleUserId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"status",
"columnId",
"taskTypeId",
"assignee",
"responsibleUserId"
],
"additionalProperties": false
},
"assignment": {
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"manual",
"process",
"inherited"
]
},
"ruleId": {
"type": [
"string",
"null"
]
},
"ruleKind": {
"anyOf": [
{
"type": "string",
"enum": [
"type_column",
"column",
"type",
"default"
]
},
{
"type": "null"
}
]
},
"workflowVersion": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"source",
"ruleId",
"ruleKind",
"workflowVersion"
],
"additionalProperties": false
}
},
"required": [
"key",
"stageRevision",
"workflowVersion",
"current",
"next",
"assignment"
],
"additionalProperties": false
}ReviewInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"progression": {
"description": "Approve only the current Review stage and advance to the next configured active/review/done column. Omitted preserves legacy approve-to-Done semantics. Explicit columnId wins.",
"type": "string",
"const": "next"
},
"expectedWorkflowVersion": {
"description": "Pass the workflowVersion from a transition preview to reject changed process rules before writing.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"assignee": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"expectedStageRevision": {
"description": "Read the task first and pass its stageRevision to reject a changed stage, executor, assignment source, task type, product or site context. Legacy omission remains unconditional.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"description": "Optional original user/workspace binding, not an identity to act as. A mismatch rejects the request with 403 before writes; key-bound clients may omit it.",
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"decision": {
"type": "string",
"enum": [
"approve",
"request_changes"
]
},
"comment": {
"type": "string",
"maxLength": 10000
}
},
"required": [
"decision"
],
"additionalProperties": false
}CompleteStageInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"runId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"action": {
"type": "string",
"enum": [
"submit",
"approve",
"request_changes"
]
},
"comment": {
"type": "string",
"minLength": 1,
"maxLength": 20000
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"links": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000,
"pattern": "^https?:[/][/][\\s\\S]*"
},
"title": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
"assignee": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"expectedWorkflowVersion": {
"description": "Pass the workflowVersion from a transition preview to reject changed process rules before writing.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
}
},
"required": [
"runId",
"stageRevision",
"action",
"comment"
],
"additionalProperties": false
}NextTaskInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}StageResult
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"task": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"columnId": {
"type": [
"string",
"null"
]
},
"taskTypeId": {
"type": [
"string",
"null"
]
},
"responsible": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"email"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"assignment": {
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"manual",
"process",
"inherited"
]
},
"ruleId": {
"type": [
"string",
"null"
]
},
"ruleKind": {
"anyOf": [
{
"type": "string",
"enum": [
"type_column",
"column",
"type",
"default"
]
},
{
"type": "null"
}
]
},
"workflowVersion": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"source",
"ruleId",
"ruleKind",
"workflowVersion"
],
"additionalProperties": false
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"deliveryMode": {
"type": "string",
"enum": [
"deploy",
"no_deploy"
]
},
"deliveryReason": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"priority": {
"type": "string",
"enum": [
"none",
"low",
"medium",
"high",
"urgent"
]
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"agent"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"product": {
"type": [
"string",
"null"
]
},
"site": {
"type": [
"string",
"null"
]
},
"pageUrl": {
"type": [
"string",
"null"
]
},
"plannedStart": {
"type": [
"string",
"null"
]
},
"dueDate": {
"type": [
"string",
"null"
]
},
"reviewAfter": {
"type": [
"string",
"null"
]
},
"estimate": {
"anyOf": [
{
"type": "string",
"enum": [
"S",
"M",
"L"
]
},
{
"type": "null"
}
]
},
"goal": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"parent": {
"anyOf": [
{
"type": "object",
"properties": {
"key": {
"type": [
"string",
"null"
]
},
"title": {
"type": "string"
}
},
"required": [
"key",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"cycle": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"cycleScopeProduct": {
"type": [
"string",
"null"
]
},
"checklist": {
"anyOf": [
{
"type": "object",
"properties": {
"done": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"done",
"total"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"subtasks": {
"anyOf": [
{
"type": "object",
"properties": {
"done": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"done",
"total"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"comments": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"linkList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
}
},
"required": [
"url",
"title"
],
"additionalProperties": false
}
},
"queries": {
"type": "array",
"items": {
"type": "string"
}
},
"outcome": {
"type": [
"string",
"null"
]
},
"hypothesis": {
"anyOf": [
{
"type": "object",
"properties": {
"metric": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"direction": {
"type": "string",
"enum": [
"increase",
"decrease"
]
},
"minChange": {
"type": "number",
"minimum": 0.01,
"maximum": 10
}
},
"required": [
"metric",
"direction",
"minChange"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"createdBy": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"agent": {
"type": "string"
}
},
"required": [
"name"
],
"additionalProperties": false
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"completedAt": {
"type": [
"string",
"null"
]
},
"archivedAt": {
"type": [
"string",
"null"
]
},
"workingAgent": {
"type": [
"string",
"null"
]
},
"activeRun": {
"anyOf": [
{
"type": "object",
"properties": {
"runId": {
"type": "string"
},
"keyId": {
"type": "string"
},
"columnId": {
"type": [
"string",
"null"
]
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"startedAt": {
"type": "string"
},
"lastSeenAt": {
"type": "string"
}
},
"required": [
"runId",
"keyId",
"columnId",
"stageRevision",
"startedAt",
"lastSeenAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"deduplicated": {
"type": "boolean",
"const": true
}
},
"required": [
"key",
"title",
"description",
"status",
"columnId",
"taskTypeId",
"responsible",
"assignment",
"stageRevision",
"deliveryMode",
"deliveryReason",
"priority",
"labels",
"assignee",
"product",
"site",
"pageUrl",
"plannedStart",
"dueDate",
"reviewAfter",
"estimate",
"goal",
"parent",
"cycle",
"cycleScopeProduct",
"checklist",
"subtasks",
"comments",
"linkList",
"queries",
"outcome",
"hypothesis",
"createdBy",
"createdAt",
"updatedAt",
"completedAt",
"archivedAt",
"workingAgent",
"activeRun"
],
"additionalProperties": false
},
"runId": {
"type": "string"
},
"replayed": {
"type": "boolean"
}
},
"required": [
"task",
"runId",
"replayed"
],
"additionalProperties": false
}Workflow
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"columns": {
"minItems": 5,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"status": {
"type": "string",
"enum": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"label": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 60
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status",
"label"
],
"additionalProperties": false
}
},
"types": {
"maxItems": 24,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"required": [
"id",
"label"
],
"additionalProperties": false
}
},
"primaryColumns": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"additionalProperties": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"required": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
}
},
"required": [
"columns",
"types",
"primaryColumns"
],
"additionalProperties": false
},
"routing": {
"type": "object",
"properties": {
"defaultAssignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"rules": {
"maxItems": 64,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"taskTypeId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"assignee"
],
"additionalProperties": false
}
}
},
"required": [
"rules"
],
"additionalProperties": false
},
"version": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"updatedAt": {
"type": [
"string",
"null"
]
},
"author": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"avatarUrl": {
"type": [
"string",
"null"
]
},
"agent": {
"type": [
"string",
"null"
]
}
},
"required": [
"userId",
"name",
"email",
"avatarUrl",
"agent"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"reason": {
"type": [
"string",
"null"
]
},
"canManage": {
"type": "boolean"
},
"history": {
"type": "array",
"items": {
"type": "object",
"properties": {
"version": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"createdAt": {
"type": "string"
},
"author": {
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"avatarUrl": {
"type": [
"string",
"null"
]
},
"agent": {
"type": [
"string",
"null"
]
}
},
"required": [
"userId",
"name",
"email",
"avatarUrl",
"agent"
],
"additionalProperties": false
},
"via": {
"type": "string",
"enum": [
"web",
"agent"
]
},
"reason": {
"type": [
"string",
"null"
]
},
"inherit": {
"type": "boolean"
}
},
"required": [
"version",
"createdAt",
"author",
"via",
"reason"
],
"additionalProperties": false
}
},
"product": {
"type": [
"string",
"null"
]
},
"inherited": {
"type": "boolean"
},
"source": {
"type": "string",
"enum": [
"workspace",
"product"
]
},
"workflowVersion": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"teamVersion": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"config",
"version",
"updatedAt",
"author",
"reason",
"canManage",
"history"
],
"additionalProperties": false
}WorkflowSave
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"columns": {
"minItems": 5,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"status": {
"type": "string",
"enum": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"label": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 60
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"status",
"label"
],
"additionalProperties": false
}
},
"types": {
"maxItems": 24,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 60
}
},
"required": [
"id",
"label"
],
"additionalProperties": false
}
},
"primaryColumns": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"additionalProperties": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"required": [
"backlog",
"todo",
"in_progress",
"review",
"done"
]
}
},
"required": [
"columns",
"types",
"primaryColumns"
],
"additionalProperties": false
},
"routing": {
"type": "object",
"properties": {
"defaultAssignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"rules": {
"maxItems": 64,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"taskTypeId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"userId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"keyId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"userId",
"keyId"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"assignee"
],
"additionalProperties": false
}
}
},
"required": [
"rules"
],
"additionalProperties": false
},
"product": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"inherit": {
"type": "boolean",
"const": true
},
"expectedVersion": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 500
}
},
"required": [
"expectedVersion"
],
"additionalProperties": false
}TaskInput
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"expectedWorkflowVersion": {
"description": "Pass the workflowVersion from a transition preview to reject changed process rules before writing.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"description": "Optional original user/workspace binding, not an identity to act as. A mismatch rejects the request with 403 before writes; key-bound clients may omit it.",
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"deliveryMode": {
"description": "deploy by default; no_deploy for results needing no deployment. An explicit decision requires deliveryReason.",
"type": "string",
"enum": [
"deploy",
"no_deploy"
]
},
"deliveryReason": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 20000
},
"priority": {
"type": "string",
"enum": [
"none",
"low",
"medium",
"high",
"urgent"
]
},
"labels": {
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{0,23}$"
}
},
"assignee": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"taskTypeId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"responsible": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"site": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"pageUrl": {
"anyOf": [
{
"type": "string",
"maxLength": 2000,
"pattern": "^https?:[/][/][\\s\\S]*"
},
{
"type": "null"
}
]
},
"queries": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"plannedStart": {
"description": "Intended date-only start of work; null clears it. Never inferred from creation or actual execution timestamps. Must not follow dueDate when both dates exist.",
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"dueDate": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"reviewAfter": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"hypothesis": {
"anyOf": [
{
"type": "object",
"properties": {
"metric": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"direction": {
"type": "string",
"enum": [
"increase",
"decrease"
]
},
"minChange": {
"type": "number",
"minimum": 0.01,
"maximum": 10
}
},
"required": [
"metric",
"direction",
"minChange"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"goal": {
"description": "Product objective or key result id; null unlinks. An objective without a metric does not create a hypothesis or measurement.",
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"parent": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"cycle": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"current",
"next",
"previous"
]
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
{
"type": "null"
}
]
},
"cycleScopeProduct": {
"type": "string",
"maxLength": 200
},
"estimate": {
"anyOf": [
{
"type": "string",
"enum": [
"S",
"M",
"L"
]
},
{
"type": "null"
}
]
},
"agentBudget": {
"anyOf": [
{
"type": "object",
"properties": {
"amount": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"currency": {
"type": "string",
"enum": [
"RUB",
"USD",
"EUR",
"GBP"
]
}
},
"required": [
"amount",
"currency"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"links": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000,
"pattern": "^https?:[/][/][\\s\\S]*"
},
"title": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
"comment": {
"description": "Added with the change. An agent closing a task (status \"done\") must give the grounds here: who approved it, what was checked.",
"type": "string",
"minLength": 1,
"maxLength": 10000
},
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
}
},
"required": [
"title"
],
"additionalProperties": false
}TaskUpdate
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"position": {
"description": "Place in the column: {before: key} or {after: key} of a card in the same (destination) column, or {to: \"top\"|\"bottom\"}. Without status it reorders the current column; the agent queue is «К работе» top down.",
"type": "object",
"properties": {
"before": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"after": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"to": {
"type": "string",
"enum": [
"top",
"bottom"
]
}
},
"additionalProperties": false
},
"expectedDelivery": {
"type": "object",
"properties": {
"deliveryMode": {
"type": "string",
"enum": [
"deploy",
"no_deploy"
]
},
"deliveryReason": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
}
},
"required": [
"deliveryMode",
"deliveryReason"
],
"additionalProperties": false
},
"expectedStageRevision": {
"description": "Read the task first and pass its stageRevision to reject a changed stage, executor, assignment source, task type, product or site context. Legacy omission remains unconditional.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"assignmentMode": {
"type": "string",
"const": "process"
},
"expectedAgentBudget": {
"anyOf": [
{
"type": "object",
"properties": {
"amount": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"currency": {
"type": "string",
"enum": [
"RUB",
"USD",
"EUR",
"GBP"
]
}
},
"required": [
"amount",
"currency"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"expectedDescription": {
"description": "Original description baseline. A mismatch rejects the entire update atomically with 409; omitted preserves last-writer behaviour.",
"type": "string",
"maxLength": 20000
},
"expectedDates": {
"description": "Both original nullable planning dates. A mismatch rejects the entire update atomically with 409; omitted preserves last-writer behaviour.",
"type": "object",
"properties": {
"plannedStart": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"dueDate": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
}
},
"required": [
"plannedStart",
"dueDate"
],
"additionalProperties": false
},
"expectedWorkflowVersion": {
"description": "Pass the workflowVersion from a transition preview to reject changed process rules before writing.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"expectedActor": {
"description": "Optional original user/workspace binding, not an identity to act as. A mismatch rejects the request with 403 before writes; key-bound clients may omit it.",
"type": "object",
"properties": {
"userId": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"workspaceId": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"required": [
"userId",
"workspaceId"
],
"additionalProperties": false
},
"deliveryMode": {
"description": "deploy by default; no_deploy for results needing no deployment. An explicit decision requires deliveryReason.",
"type": "string",
"enum": [
"deploy",
"no_deploy"
]
},
"deliveryReason": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 20000
},
"priority": {
"type": "string",
"enum": [
"none",
"low",
"medium",
"high",
"urgent"
]
},
"labels": {
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]{0,23}$"
}
},
"assignee": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"columnId": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
"taskTypeId": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,79}$"
},
{
"type": "null"
}
]
},
"responsible": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"product": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"site": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"pageUrl": {
"anyOf": [
{
"type": "string",
"maxLength": 2000,
"pattern": "^https?:[/][/][\\s\\S]*"
},
{
"type": "null"
}
]
},
"queries": {
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"plannedStart": {
"description": "Intended date-only start of work; null clears it. Never inferred from creation or actual execution timestamps. Must not follow dueDate when both dates exist.",
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"dueDate": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"reviewAfter": {
"anyOf": [
{
"type": "string",
"description": "Real calendar date YYYY-MM-DD, years 0001–9999; no time or timezone.",
"format": "date"
},
{
"type": "null"
}
]
},
"hypothesis": {
"anyOf": [
{
"type": "object",
"properties": {
"metric": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"direction": {
"type": "string",
"enum": [
"increase",
"decrease"
]
},
"minChange": {
"type": "number",
"minimum": 0.01,
"maximum": 10
}
},
"required": [
"metric",
"direction",
"minChange"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"goal": {
"description": "Product objective or key result id; null unlinks. An objective without a metric does not create a hypothesis or measurement.",
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"parent": {
"anyOf": [
{
"type": "string",
"maxLength": 40
},
{
"type": "null"
}
]
},
"cycle": {
"anyOf": [
{
"anyOf": [
{
"type": "string",
"enum": [
"current",
"next",
"previous"
]
},
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
]
},
{
"type": "null"
}
]
},
"cycleScopeProduct": {
"type": "string",
"maxLength": 200
},
"estimate": {
"anyOf": [
{
"type": "string",
"enum": [
"S",
"M",
"L"
]
},
{
"type": "null"
}
]
},
"agentBudget": {
"anyOf": [
{
"type": "object",
"properties": {
"amount": {
"type": "integer",
"minimum": 0,
"maximum": 1000000000000
},
"currency": {
"type": "string",
"enum": [
"RUB",
"USD",
"EUR",
"GBP"
]
}
},
"required": [
"amount",
"currency"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"links": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000,
"pattern": "^https?:[/][/][\\s\\S]*"
},
"title": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
"comment": {
"description": "Added with the change. An agent closing a task (status \"done\") must give the grounds here: who approved it, what was checked.",
"type": "string",
"minLength": 1,
"maxLength": 10000
},
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"outcome": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"type": "null"
}
]
},
"archived": {
"type": "boolean"
}
},
"additionalProperties": false
}Task
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"key": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"triage",
"backlog",
"todo",
"in_progress",
"review",
"done"
]
},
"columnId": {
"type": [
"string",
"null"
]
},
"taskTypeId": {
"type": [
"string",
"null"
]
},
"responsible": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"email"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"assignment": {
"type": "object",
"properties": {
"source": {
"type": "string",
"enum": [
"manual",
"process",
"inherited"
]
},
"ruleId": {
"type": [
"string",
"null"
]
},
"ruleKind": {
"anyOf": [
{
"type": "string",
"enum": [
"type_column",
"column",
"type",
"default"
]
},
{
"type": "null"
}
]
},
"workflowVersion": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"source",
"ruleId",
"ruleKind",
"workflowVersion"
],
"additionalProperties": false
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"deliveryMode": {
"type": "string",
"enum": [
"deploy",
"no_deploy"
]
},
"deliveryReason": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "null"
}
]
},
"priority": {
"type": "string",
"enum": [
"none",
"low",
"medium",
"high",
"urgent"
]
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"assignee": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
},
"agent": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"email",
"agent"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"product": {
"type": [
"string",
"null"
]
},
"site": {
"type": [
"string",
"null"
]
},
"pageUrl": {
"type": [
"string",
"null"
]
},
"plannedStart": {
"type": [
"string",
"null"
]
},
"dueDate": {
"type": [
"string",
"null"
]
},
"reviewAfter": {
"type": [
"string",
"null"
]
},
"estimate": {
"anyOf": [
{
"type": "string",
"enum": [
"S",
"M",
"L"
]
},
{
"type": "null"
}
]
},
"goal": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"parent": {
"anyOf": [
{
"type": "object",
"properties": {
"key": {
"type": [
"string",
"null"
]
},
"title": {
"type": "string"
}
},
"required": [
"key",
"title"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"cycle": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"cycleScopeProduct": {
"type": [
"string",
"null"
]
},
"checklist": {
"anyOf": [
{
"type": "object",
"properties": {
"done": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"done",
"total"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"subtasks": {
"anyOf": [
{
"type": "object",
"properties": {
"done": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"total": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"done",
"total"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"comments": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"linkList": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
}
},
"required": [
"url",
"title"
],
"additionalProperties": false
}
},
"queries": {
"type": "array",
"items": {
"type": "string"
}
},
"outcome": {
"type": [
"string",
"null"
]
},
"hypothesis": {
"anyOf": [
{
"type": "object",
"properties": {
"metric": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"direction": {
"type": "string",
"enum": [
"increase",
"decrease"
]
},
"minChange": {
"type": "number",
"minimum": 0.01,
"maximum": 10
}
},
"required": [
"metric",
"direction",
"minChange"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"createdBy": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"agent": {
"type": "string"
}
},
"required": [
"name"
],
"additionalProperties": false
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"completedAt": {
"type": [
"string",
"null"
]
},
"archivedAt": {
"type": [
"string",
"null"
]
},
"workingAgent": {
"type": [
"string",
"null"
]
},
"activeRun": {
"anyOf": [
{
"type": "object",
"properties": {
"runId": {
"type": "string"
},
"keyId": {
"type": "string"
},
"columnId": {
"type": [
"string",
"null"
]
},
"stageRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"startedAt": {
"type": "string"
},
"lastSeenAt": {
"type": "string"
}
},
"required": [
"runId",
"keyId",
"columnId",
"stageRevision",
"startedAt",
"lastSeenAt"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"deduplicated": {
"type": "boolean",
"const": true
}
},
"required": [
"key",
"title",
"description",
"status",
"columnId",
"taskTypeId",
"responsible",
"assignment",
"stageRevision",
"deliveryMode",
"deliveryReason",
"priority",
"labels",
"assignee",
"product",
"site",
"pageUrl",
"plannedStart",
"dueDate",
"reviewAfter",
"estimate",
"goal",
"parent",
"cycle",
"cycleScopeProduct",
"checklist",
"subtasks",
"comments",
"linkList",
"queries",
"outcome",
"hypothesis",
"createdBy",
"createdAt",
"updatedAt",
"completedAt",
"archivedAt",
"workingAgent",
"activeRun"
],
"additionalProperties": false
}MetricQuery
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ref": {
"type": "string",
"minLength": 3,
"maxLength": 300
},
"from": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"to": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
},
"days": {
"type": "integer",
"minimum": 1,
"maximum": 730
},
"granularity": {
"type": "string",
"enum": [
"day",
"week"
]
},
"compare": {
"type": "boolean"
},
"product": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"ref",
"product"
],
"additionalProperties": false
}MetricSeries
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ref": {
"type": "string"
},
"label": {
"type": "string"
},
"definition": {
"type": "string"
},
"sourceName": {
"type": "string"
},
"caveats": {
"type": "array",
"items": {
"type": "string"
}
},
"kind": {
"type": "string"
},
"lowerIsBetter": {
"type": "boolean"
},
"unit": {
"type": "string",
"const": "currency"
},
"currency": {
"type": "string"
},
"amounts": {
"type": "string",
"enum": [
"major",
"minor"
]
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"granularity": {
"type": "string",
"enum": [
"day",
"week"
]
},
"points": {
"maxItems": 730,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"value": {
"type": [
"number",
"null"
]
}
},
"required": [
"date",
"value"
],
"additionalProperties": false
}
},
"total": {
"type": [
"number",
"null"
]
},
"previous": {
"anyOf": [
{
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"total": {
"type": [
"number",
"null"
]
},
"points": {
"maxItems": 730,
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"value": {
"type": [
"number",
"null"
]
}
},
"required": [
"date",
"value"
],
"additionalProperties": false
}
}
},
"required": [
"from",
"to",
"total",
"points"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"dataThrough": {
"type": [
"string",
"null"
]
},
"band": {
"anyOf": [
{
"type": "object",
"properties": {
"low": {
"type": "number"
},
"high": {
"type": "number"
},
"weeks": {
"type": "number"
},
"latest": {
"type": "object",
"properties": {
"week": {
"type": "string"
},
"start": {
"type": "string"
},
"value": {
"type": [
"number",
"null"
]
}
},
"required": [
"week",
"start",
"value"
],
"additionalProperties": false
},
"outside": {
"type": "boolean"
}
},
"required": [
"low",
"high",
"weeks",
"latest",
"outside"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"note": {
"type": "string"
}
},
"required": [
"ref",
"label",
"definition",
"sourceName",
"caveats",
"kind",
"lowerIsBetter",
"from",
"to",
"granularity",
"points",
"total",
"previous",
"dataThrough"
],
"additionalProperties": false
}Problem
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"unauthorized",
"forbidden",
"not_found",
"invalid_request",
"conflict",
"invalid_json",
"unsupported_media_type",
"payload_too_large",
"rate_limited",
"quota_exceeded",
"internal_error"
]
},
"message": {
"type": "string"
},
"hint": {
"type": [
"string",
"null"
]
}
},
"required": [
"code",
"message",
"hint"
],
"additionalProperties": false
}Para el ciclo de trabajo completo del agente, usa MCP.