Skip to content

Move a project to another workflow

POST
/projects/{id}/workflow
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/projects/example/workflow \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "fingerprint": "example", "mapping": { "additionalProperty": "example" }, "workflowId": "example" }'

Moves the project to another workflow after its preview: every task, subtasks included, takes the mapped status of the new workflow, with one activity entry per task, the project’s delegation stages and saved view filters follow, and the project’s activity records the change. Send the same workflowId and mapping as the preview, with its fingerprint; a stale fingerprint or a blocker answers 422. Requires the projects.manage permission.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

Media typeapplication/json
object
fingerprint
required

The fingerprint of the preview; the change is refused when the project or the mapping changed since.

string
>= 1 characters
mapping

Statuses mapped by hand, keyed by the id of a status the project’s tasks hold, each to a status of the target workflow by id or name. A status left out maps automatically: the one with the same name, then the first of the nearest category.

object
key
additional properties
string
>= 1 characters
workflowId
required

The workflow the project moves to, from GET /workflows.

string
>= 1 characters

Example generated

{
"fingerprint": "example",
"mapping": {
"additionalProperty": "example"
},
"workflowId": "example"
}

How many tasks moved and the project’s workflow now.

Media typeapplication/json
object
data
required
object
movedTasks
required
integer
>= -9007199254740991 <= 9007199254740991
workflow
required
object
id
required
string
name
required
string

Example generated

{
"data": {
"movedTasks": 1,
"workflow": {
"id": "example",
"name": "example"
}
}
}

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"
}
}

The preview has blockers or is stale.

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.