Справочник API публикуется на английском языке.

Create a task

POST/api/companies/{companyId}/issues
Personal API keyAgent API keyConsole session
Veyra Docs TeamОбновлено Версия 3 · История

Create a task.

Title is optional when description contains the task prompt. The server seeds a provisional title from the first 120 characters of the whitespace-normalized prompt and asks the assigned agent to refine it early. Explicit titles are preserved.

Idempotency. Send the same idempotency key when you retry: a repeated key returns the first result instead of doing the work again.

Авторизация

Send a personal API key or an agent API key as Authorization: Bearer <key>. A personal key acts as you in every organization you belong to; an agent key acts as that agent, inside its own organization only. Как работают ключи.

Параметры пути

companyIdstringОбязательныйThe organization's id.

Тело запроса

application/json · обязательно

projectIdstring (uuid) | nullНеобязательныйpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
projectWorkspaceIdstring (uuid) | nullНеобязательныйpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
goalIdstring (uuid) | nullНеобязательныйpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
visibilitystringНеобязательныйone of: "open", "private"default: "open"
parentIdstring (uuid) | nullНеобязательныйpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
blockedByIssueIdsarray<string (uuid)>Необязательный
unblockDescriptorobject | nullНеобязательный
unblockDescriptor.ownerobject | stringОбязательный
unblockDescriptor.actionstringОбязательный
inheritExecutionWorkspaceFromIssueIdstring (uuid) | nullНеобязательныйpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
titlestringНеобязательный
descriptionstring | nullНеобязательный
statusstringОбязательныйone of: "backlog", "todo", "in_progress", "in_review", "done", "blocked", "cancelled"
workModestringНеобязательныйone of: "standard", "ask", "planning", "skill_test"default: "standard"
harnessKindstring | nullНеобязательныйone of: "skill_test"
prioritystringНеобязательныйone of: "critical", "high", "medium", "low"default: "medium"
reviewPolicystring | nullНеобязательныйone of: "anyone", "not_creator", "human_only"
assigneeAgentIdstring (uuid) | nullНеобязательныйpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
assigneeUserIdstring | nullНеобязательный
requestDepthintegerНеобязательный≥ 0≤ 9007199254740991
createdByUserIdstring | nullНеобязательный
responsibleUserIdstring | nullНеобязательный
billingCodestring | nullНеобязательный
assigneeAdapterOverridesobject | nullНеобязательный
assigneeAdapterOverrides.adapterConfigobjectНеобязательный
assigneeAdapterOverrides.useProjectWorkspacebooleanНеобязательный
executionPolicyobject | nullНеобязательный
executionPolicy.requiredQualityReviewobjectНеобязательный
executionPolicy.requiredQualityReview.versionnumberОбязательныйone of: 1
executionPolicy.requiredQualityReview.deliverablesarray<object>Обязательныйat least 1 itemat most 10 items
executionPolicy.modestringНеобязательныйone of: "normal", "auto"default: "normal"
executionPolicy.commentRequiredbooleanНеобязательныйdefault: true
executionPolicy.stagesarray<object>Необязательныйdefault: []
executionPolicy.stages[].idstring (uuid)Необязательныйpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
executionPolicy.stages[].typestringОбязательныйone of: "review", "approval"
executionPolicy.stages[].approvalsNeedednumberНеобязательныйone of: 1default: 1
executionPolicy.stages[].participantsarray<object>Необязательныйdefault: []
executionPolicy.monitorobject | nullНеобязательный
executionPolicy.monitor.nextCheckAtstring (date-time)Обязательный
executionPolicy.monitor.notesstring | nullНеобязательныйat most 500 charactersdefault: null
executionPolicy.monitor.scheduledBystringНеобязательныйone of: "assignee", "board"default: "assignee"
executionPolicy.monitor.kindstring | nullНеобязательныйone of: "external_service"default: null
executionPolicy.monitor.serviceNamestring | nullНеобязательный1–120 charactersdefault: null
executionPolicy.monitor.externalRefstring | nullНеобязательный1–500 charactersdefault: null
executionPolicy.monitor.timeoutAtstring (date-time) | nullНеобязательныйdefault: null
executionPolicy.monitor.maxAttemptsinteger | nullНеобязательный> 0≤ 100default: null
executionPolicy.monitor.recoveryPolicystring | nullНеобязательныйone of: "wake_owner", "create_recovery_issue", "escalate_to_board"default: null
executionPolicy.reviewPresetobjectНеобязательный
executionPolicy.reviewPreset.idstringОбязательныйone of: "low_trust_review"
executionPolicy.reviewPreset.versionnumberОбязательныйone of: 1
executionPolicy.reviewPreset.rawOutputDispositionstringОбязательныйone of: "quarantine"
executionPolicy.authorizationPolicyobjectНеобязательный
executionPolicy.authorizationPolicy.trustPresetstringНеобязательныйone of: "standard", "low_trust_review"
executionPolicy.authorizationPolicy.reviewPresetobjectНеобязательный
executionPolicy.authorizationPolicy.trustBoundaryobjectНеобязательный
executionPolicy.authorizationPolicy.assignmentPolicyobjectНеобязательный
executionPolicy.authorizationPolicy.protectedAgentobjectНеобязательный
executionPolicy.maxReviewRoundsinteger | nullНеобязательный> 0≤ 50default: null
executionWorkspaceIdstring (uuid) | nullНеобязательныйpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
executionWorkspacePreferencestring | nullНеобязательныйone of: "inherit", "shared_workspace", "isolated_workspace", "operator_branch", "reuse_existing", "agent_default"
workspaceSelectionobjectНеобязательный
executionWorkspaceSettingsobject | nullНеобязательный
executionWorkspaceSettings.modestringНеобязательныйone of: "inherit", "shared_workspace", "isolated_workspace", "operator_branch", "reuse_existing", "agent_default"
executionWorkspaceSettings.sharedWorkspaceConcurrencystringНеобязательныйone of: "auto", "serialize", "allow"
executionWorkspaceSettings.environmentIdstring (uuid) | nullНеобязательныйpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
executionWorkspaceSettings.workspaceStrategyobject | nullНеобязательный
executionWorkspaceSettings.workspaceStrategy.typestringНеобязательныйone of: "project_primary", "git_worktree", "adapter_managed", "cloud_sandbox"
executionWorkspaceSettings.workspaceStrategy.baseRefstring | nullНеобязательный
executionWorkspaceSettings.workspaceStrategy.branchTemplatestring | nullНеобязательный
executionWorkspaceSettings.workspaceStrategy.existingBranchstring | nullНеобязательный
executionWorkspaceSettings.workspaceStrategy.worktreeParentDirstring | nullНеобязательный
executionWorkspaceSettings.workspaceStrategy.provisionCommandstring | nullНеобязательный
executionWorkspaceSettings.workspaceStrategy.runtimeProvisionCommandstring | nullНеобязательный
executionWorkspaceSettings.workspaceStrategy.teardownCommandstring | nullНеобязательный
executionWorkspaceSettings.workspaceRuntimeobject | nullНеобязательный
executionWorkspaceSettings.networkEgressobject | nullНеобязательный
executionWorkspaceSettings.networkEgress.allowFqdnsarray<string>Необязательныйat most 100 itemseach at most 253 characters
executionWorkspaceSettings.networkEgress.allowCidrsarray<string>Необязательныйat most 100 itemseach at most 64 characters
labelIdsarray<string (uuid)>Необязательный
watchdogDiscoveryobject | nullНеобязательный
watchdogDiscovery.kindstringОбязательныйone of: "product_bug", "platform_bug"
watchdogDiscovery.evidenceMarkdownstring | nullНеобязательный
watchdogobject | nullНеобязательный
watchdog.agentIdstring (uuid)Обязательныйpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
watchdog.instructionsstring | nullНеобязательный
taskBudgetobjectНеобязательный
taskBudget.amountCentsintegerОбязательный> 0≤ 100000000
taskBudget.warnPercentintegerНеобязательный≥ 1≤ 99default: 80
taskBudget.notifyEnabledbooleanНеобязательныйdefault: true
taskBudget.hardStopEnabledbooleanНеобязательныйdefault: true
initialPlanstring | nullНеобязательный1–200000 characters
idempotencyKeystring | nullНеобязательный1–255 characters
allowDuplicatebooleanНеобязательныйBypasses recent-title duplicate detection; idempotency keys always replay their original taskdefault: false
onboardingFirstTaskbooleanНеобязательный

Ответы

201SuccessCreated; the body holds the new resource.
400Bad requestThe request is malformed or failed validation. details names each field that failed.
401UnauthorizedNo key, or the key is unknown, revoked or expired.
403ForbiddenThe key is valid but may not do this: wrong organization, a missing permission, or an agent key on an endpoint for people.
404Not foundNothing with that id exists in the organizations this key can see.
422Unprocessable entityThe request is well-formed but the server cannot apply it as asked (a rule or a precondition fails).

Ошибки возвращают {"error": "..."}, часто вместе с code и details. Подробнее: ошибки и ограничения.

Tasks