Skip to main content
PATCH
/
api
/
v1
/
tasks
/
{id}
/
priority
Reprioritize a task by placing it between two neighbors. Cascades to dependent tasks (`blocked_by` pushed below, `blocks` pushed above) so dependency ordering invariants stay intact. Returns the new priority key plus any cascaded entries. See `docs/tasks/priority-cascade.md`.
curl --request PATCH \
  --url https://api.backside.app/api/v1/tasks/{id}/priority \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "after_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "before_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "cascaded": [
    {
      "new_priority_key": "<string>",
      "reason": "<string>",
      "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "new_priority_key": "<string>",
  "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Task ID

Body

application/json

Body of PATCH /api/v1/tasks/{id}/priority. At least one of the two neighbor IDs must be present.

after_task_id
string<uuid> | null

Place the target immediately after this task (target's key > this task's key). NULL with before_task_id set means "move to top".

before_task_id
string<uuid> | null

Place the target immediately before this task (target's key < this task's key). NULL with after_task_id set means "move to bottom".

Response

Result of a successful reprioritize call.

cascaded
object[]
required

Tasks whose keys were also rewritten to preserve dependency order. Ordered by their new position.

new_priority_key
string
required
task_id
string<uuid>
required