Skip to content

Start re-deriving the project's Priority Orbit from its open tickets — deriveprojectprioritization

POST
/projects/{id}/prioritization/derive
curl --request POST \
--url https://example.com/api/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/prioritization/derive \
--cookie sb-access-token=<sb-access-token>

Starts one AI pass over the project’s OPEN tickets to REPLACE the stored derivation and answers 202 immediately with the new run’s id — the model pass itself runs detached from this request and can take minutes on a large project. Poll GET /prioritization/progress for the real phase; GET /prioritization for the finished derivation. Manual only — nothing re-derives on a schedule or on read. Error codes: PRIORITIZATION_NOT_CONFIGURED (503, no Anthropic API key available), NO_OPEN_TICKETS (409, nothing to prioritize), PRIORITIZATION_RUNNING (409, a run is already in flight for this project). A background model failure (PRIORITIZATION_FAILED) surfaces as a failed row on GET /prioritization/progress, not as an HTTP response from this endpoint.

id
required
string format: uuid

Project UUID

The derivation started; the model pass continues in the background

Media type application/json

The derivation was accepted and started; the model pass continues detached from this response. Poll GET /prioritization/progress with run_id to follow it.

object
run_id
required
string format: uuid
phase
required
string
Allowed values: starting

Not authenticated

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
reconnect

True if re-linking GitHub may fix the issue

boolean

Forbidden

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

The project has no open tickets to prioritize, or a derivation is already running

Rate limited

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
retryAfter

Seconds until the rate limit resets

number
Retry-After
string

No API key configured