Skip to main content
POST
Create task

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Path Parameters

project_reference
string
required

Project slug, UUID, or domain that identifies the project.

Query Parameters

source_target_kind
string

Source to write: project or preview_branch. Defaults to project.

target_branch_id
string<uuid> | null

Preview branch to write when source_target_kind is preview_branch.

Body

application/json
id
string
required

Stable task identifier used in MCP and project source.

Required string length: 1 - 128
Pattern: ^[a-z0-9][a-z0-9-]*$
name
string
required

Human-readable task name.

Minimum string length: 1
description
string | null

Optional short description of what the task does.

schedulable
boolean

Whether the task can be used from schedulers and cron definitions. Defaults to true.

Response

Created task document

Task definition including editable source content.

id
string
required

Task identifier.

name
string
required

Human-readable task name.

description
string | null
required

Short description of what the task does.

target
string
required

Execution target that implements the task.

source_path
string
required

Source file path where the task definition lives.

source
string
required

Task source code or structured document content.

schedulable
boolean
required

Whether the task can be used from schedulers.

edit_mode
enum<string>
required

Editing mode supported for the task definition.

Available options:
structured,
source_only
source_only_reasons
string[]
required

Reasons why the task can only be edited as raw source, when applicable.