Skip to content

Preview moving a project to another workflow

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

Shows what moving the project to another workflow would do, and writes nothing: for each status its tasks hold (subtasks included), the target status the tasks land in and why, how many tasks move, the target workflow’s statuses and what blocks the change. Send mapping to choose where a status lands. Responds 404 when the member does not reach the project or the workflow does not exist. Requires the projects.manage permission.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

Media typeapplication/json
object
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

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

The preview.

Media typeapplication/json
object
data
required
object
blockers
required

Reasons the change cannot be applied; empty when it can.

Array<string>
fingerprint
required
string
fromWorkflow
required
object
id
required
string
name
required
string
projectId
required
string
rows
required

One row per status the project’s tasks hold, in board order.

Array<object>
object
basis
required

Why the status lands there: chosen by hand, or suggested by the same name or the nearest category; none when nothing fits.

string
Allowed values: same name category none chosen
fromStatus
required
string
fromStatusId
required
string
taskCount
required
integer
>= -9007199254740991 <= 9007199254740991
toStatus
required
string | null
toStatusId
required
string | null
taskCount
required

Every task of the project that moves, subtasks included.

integer
>= -9007199254740991 <= 9007199254740991
toStatuses
required

The statuses of the target workflow, in board order.

Array<object>
object
category
required
string
color
required
string
id
required
string
name
required
string
position
required
integer
>= -9007199254740991 <= 9007199254740991
toWorkflow
required
object
id
required
string
name
required
string

Example

{
"data": {
"rows": [
{
"basis": "same"
}
]
}
}

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 change is refused.

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.