Skip to content

Create internal work tasks from a ticket

POST
/tickets/{id}/work-tasks
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/tickets/example/work-tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "requestKey": "example", "tasks": [ { "description": "example", "projectId": "example", "title": "example" } ] }'

Creates between 1 and 20 client-invisible work tasks, each at its project’s default column, and links them all to the ticket as one all-or-nothing operation; a failure creates nothing. The request is idempotent by requestKey: repeating it with the same tasks returns the tasks the first request created (replayed: true, status 200) and creates nothing, even if two identical requests race or the ticket was merged into another afterwards; the same key with different tasks answers 409. The ticket must not be merged into another or in a terminal status, and no project may be personal, archived, the workspace’s inbox project, or — for a ticket belonging to a client — another client’s project (a clientless/internal project is still a valid target). A request that creates tasks posts one internal note on the ticket listing all of them; a replay posts none. A ticket’s status follows its board only while it has exactly one linked task. Requires the tickets.manage permission and a ticket within the caller’s scope.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

Media typeapplication/json
object
requestKey
required

Idempotency key of 8 to 128 letters, digits, dots, colons, dashes or underscores, generated by the caller (a UUID is fine). Repeating a request with the same key and the same tasks returns the tasks the first request created and creates nothing; the same key with different tasks is refused with CONFLICT.

string
/^[A-Za-z0-9._:-]{8,128}$/
tasks
required

Between 1 and 20 tasks to create and link to the ticket, in order.

Array<object>
>= 1 items <= 20 items
object
description

Task description as Markdown, at most 20000 characters once stored as HTML. GitHub-Flavored Markdown, converted to sanitized HTML for storage. Survives the round trip: headings (the web editor edits h1-h2 and demotes deeper levels to paragraphs), bold, italic, strikethrough, underline as , inline code, fenced code blocks with a language, links, bullet, numbered and nested lists, task lists, blockquotes, horizontal rules, hard line breaks, tables with header rows (merged cells and complex tables use sanitized inline HTML), images served from /api/v1/files/, member mentions written as @Name, and a Loom, Cap (cap.so or the organization’s own Cap server), Figma, YouTube, Google Docs or GitHub pull-request link standing alone in its paragraph, which becomes an embed. Inline HTML passes through the same sanitizer as the editor. Lost: external image URLs (dropped by the sanitizer), link titles, text alignment.

string
projectId
required

Project the task is created in, at that project’s default column. Not a personal project, not the inbox project, and not another client’s project.

string
>= 1 characters
title
required

Title of the internal work task.

string
>= 1 characters <= 500 characters

Example generated

{
"requestKey": "example",
"tasks": [
{
"description": "example",
"projectId": "example",
"title": "example"
}
]
}

The request key had already been honoured; the tasks it created.

Media typeapplication/json
object
data
required

The internal work tasks created from a ticket by one idempotent request.

object
replayed
required

True when the request key had already been honoured and nothing new was created.

boolean
tasks
required

The tasks the request created, in request order.

Array<object>

An internal work task linked to a ticket, with where it sits on its board.

object
completedAt
required
Any of:
string format: date-time
/^(?:(?:\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])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
id
required

TicketPromotion link id.

string
linkedAt
required
string format: date-time
/^(?:(?:\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])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
linkedById
required

Member who linked the task to the ticket.

string
number
required

Workspace-scoped number of the work task.

integer
>= -9007199254740991 <= 9007199254740991
projectId
required

Project whose board holds the task, or null when it sits on no board.

string | null
projectName
required
string | null
statusCategory
required

Category of the board column the task is in.

Any of:
string
Allowed values: BACKLOG UNSTARTED STARTED COMPLETED
statusName
required

Name of the board column the task is in.

string | null
taskId
required

The linked internal work task.

string
title
required
string

Example

{
"data": {
"tasks": [
{
"statusCategory": "BACKLOG"
}
]
}
}

The tasks created and linked to the ticket.

Media typeapplication/json
object
data
required

The internal work tasks created from a ticket by one idempotent request.

object
replayed
required

True when the request key had already been honoured and nothing new was created.

boolean
tasks
required

The tasks the request created, in request order.

Array<object>

An internal work task linked to a ticket, with where it sits on its board.

object
completedAt
required
Any of:
string format: date-time
/^(?:(?:\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])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
id
required

TicketPromotion link id.

string
linkedAt
required
string format: date-time
/^(?:(?:\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])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
linkedById
required

Member who linked the task to the ticket.

string
number
required

Workspace-scoped number of the work task.

integer
>= -9007199254740991 <= 9007199254740991
projectId
required

Project whose board holds the task, or null when it sits on no board.

string | null
projectName
required
string | null
statusCategory
required

Category of the board column the task is in.

Any of:
string
Allowed values: BACKLOG UNSTARTED STARTED COMPLETED
statusName
required

Name of the board column the task is in.

string | null
taskId
required

The linked internal work task.

string
title
required
string

Example

{
"data": {
"tasks": [
{
"statusCategory": "BACKLOG"
}
]
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Conflict.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.