Skip to main content
POST
Create a task on a factory
The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.

v2 compatibility notes

POST /api/v2/factories/createTask creates a software task in BACKLOG on a factory and answers 201 with the new FactoryTaskDetail. The body takes factoryId, title (1–200 characters, not blank), priority (low, medium, high or urgent), and optionally description (at most 20,000 characters) and tags (at most 20, each 1–64 characters). Any other key is 400 bad_request. You cannot set a project, a GitHub link or an assignee here. You must be able to read the factory (factories:read at its home org unit); otherwise the answer is 404 resource_missing with Factory not found. Console files a task created without a project under the legacy software project, and so does this route. As in Console, you need factories:manage both at the factory’s home and at that project’s home, which is the deployment root. Without both, the answer is 403 with requiredPermission: "factories:manage" and nothing is written. The task records your External App or API key as its creator. Creating a task schedules nothing and starts no factory work. Send an Idempotency-Key so a retry can’t create a second task.

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Headers

Idempotency-Key
string

Path Parameters

factoryId
string
required
Minimum string length: 1

Body

application/json
title
string
required

1-200 characters, not blank.

Required string length: 1 - 200
Pattern: \S
priority
enum<string>
required
Available options:
low,
medium,
high,
urgent
description
string

At most 20,000 characters.

Maximum string length: 20000
tags
string[]

At most 20 tags of 1-64 characters each, none blank.

Maximum array length: 20
Required string length: 1 - 64
Pattern: \S

Response

The task as written

data
object
required

A factory task with its description (null when it has none). Tasks are written with createTask, updateTask, assignTask and transitionTask; starting factory work is done by a person in Console.

meta
object
required