Create task

http
POST /projects/{project_reference}/tasks

Create a task source file in the project source or a preview branch when a new unit of work must be runnable or schedulable; returns the task source document. Requires project.runs.write.

Parameters

NameInRequiredDescription
project_referencepathYesProject slug, UUID, or domain that identifies the project.
source_target_kindquerySource to write: project or preview_branch. Defaults to project.
target_branch_idqueryPreview branch to write when source_target_kind is preview_branch.

Request body

FieldTypeRequiredDescription
idstringYesStable task identifier used in MCP and project source.
namestringYesHuman-readable task name.
descriptionstring,nullOptional short description of what the task does.
schedulablebooleanWhether the task can be used from schedulers and cron definitions. Defaults to true.

Responses

StatusDescription
201Created task document
400Bad request
401Unauthorized
403Forbidden
409Conflict