# Backlog

A board's backlog in rank order: its sections, ranking tasks and moving them out of sprints.

## Get a board's backlog

`GET /orgs/{org}/boards/{board}/backlog`

Scope: `boards:read`

The backlog as its page shows it to the token's person: a scrum board's active and future sprints and then the backlog (tasks in no open sprint and not done), a kanban board's board and backlog sections; each with its counts and the first 100 tasks above subtask level in rank order. Read more of a section with its section call. The filters are the backlog toolbar's.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]
- `board` (string (uuid), required): The board's id.

### Query parameters

- `q` (string): More conditions in the query language, as the board's filter panel adds them (the board's own filter always applies). [at most 2000 characters]
- `custom_filters` (string): Custom filter ids, comma-separated; all must match. Without it, the board's saved view's; empty for none. [at most 4000 characters]
- `people` (string): People's ids (or unassigned), comma-separated: tasks of any of them. Without it, the board's saved view's. [at most 4000 characters]
- `search` (string): Part of a summary, or a task key (as the board's search box). [at most 255 characters]

### Request

```sh
curl -X GET "https://projqo.example/api/v1/orgs/{org}/boards/6f1c2a9e-3b7d-4e21-9a55-0c8d2f4b7e10/backlog" \
  -H "Authorization: Bearer $PROJQO_TOKEN"
```

### Answer: 200

```json
{
  "kind": "scrum",
  "filtered": false,
  "estimation": {
    "method": "story_points",
    "label": "Story points"
  },
  "sections": [
    {
      "id": "backlog",
      "kind": "backlog",
      "sprint": null,
      "total": 1,
      "shown": 1,
      "counts": {
        "todo": 1,
        "in_progress": 0,
        "done": 0
      },
      "items": [
        {
          "id": "6f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
          "key": "WEB-12",
          "summary": "The sign-in button does nothing on Safari",
          "rank": "0|i0000g:",
          "column": "4b5c6d7e-8f9a-4b0c-8d1e-2f3a4b5c6d7e",
          "type": {
            "id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
            "name": "Bug",
            "level": 0
          },
          "status": {
            "id": "3d4e5f6a-7b8c-4d9e-8f0a-2b3c4d5e6f7a",
            "name": "In progress",
            "category": "in_progress"
          },
          "priority": {
            "id": "4e5f6a7b-8c9d-4e0f-9a1b-3c4d5e6f7a8b",
            "name": "High"
          },
          "assignee": {
            "id": "8d0e5f7a-1c2b-4d3e-8f9a-0b1c2d3e4f5a",
            "name": "Priya Shah"
          },
          "parent": null,
          "labels": [
            "safari"
          ],
          "due": "2026-12-15",
          "overdue": false,
          "estimate": 3,
          "subtasks": null,
          "flagged": false,
          "done": false
        }
      ],
      "next_cursor": null
    }
  ]
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation.
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).

## List a backlog section's tasks

`GET /orgs/{org}/boards/{board}/backlog/sections/{section}/tasks`

Scope: `boards:read`

One section of the backlog (a sprint by its id, backlog, or a kanban board's board) in rank order, 100 a page: the first page without a cursor, then each next_cursor. Give the same filters as the backlog call.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]
- `board` (string (uuid), required): The board's id.
- `section` (string, required): A sprint's id, backlog, or board. [1 to 64 characters]

### Query parameters

- `q` (string): More conditions in the query language, as the board's filter panel adds them (the board's own filter always applies). [at most 2000 characters]
- `custom_filters` (string): Custom filter ids, comma-separated; all must match. Without it, the board's saved view's; empty for none. [at most 4000 characters]
- `people` (string): People's ids (or unassigned), comma-separated: tasks of any of them. Without it, the board's saved view's. [at most 4000 characters]
- `search` (string): Part of a summary, or a task key (as the board's search box). [at most 255 characters]
- `cursor` (string): The next_cursor of the previous page; leave it out for the first page. [at most 1000 characters]

### Request

```sh
curl -X GET "https://projqo.example/api/v1/orgs/{org}/boards/6f1c2a9e-3b7d-4e21-9a55-0c8d2f4b7e10/backlog/sections/{section}/tasks" \
  -H "Authorization: Bearer $PROJQO_TOKEN"
```

### Answer: 200

```json
{
  "items": [
    {
      "id": "6f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
      "key": "WEB-12",
      "summary": "The sign-in button does nothing on Safari",
      "rank": "0|i0000g:",
      "column": "4b5c6d7e-8f9a-4b0c-8d1e-2f3a4b5c6d7e",
      "type": {
        "id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
        "name": "Bug",
        "level": 0
      },
      "status": {
        "id": "3d4e5f6a-7b8c-4d9e-8f0a-2b3c4d5e6f7a",
        "name": "In progress",
        "category": "in_progress"
      },
      "priority": {
        "id": "4e5f6a7b-8c9d-4e0f-9a1b-3c4d5e6f7a8b",
        "name": "High"
      },
      "assignee": {
        "id": "8d0e5f7a-1c2b-4d3e-8f9a-0b1c2d3e4f5a",
        "name": "Priya Shah"
      },
      "parent": null,
      "labels": [
        "safari"
      ],
      "due": "2026-12-15",
      "overdue": false,
      "estimate": 3,
      "subtasks": null,
      "flagged": false,
      "done": false
    }
  ],
  "next_cursor": null
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation.
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).

## Rank tasks in the backlog

`POST /orgs/{org}/boards/{board}/backlog/rank`

Scope: `boards:write`

Moves tasks (one or several, in the order given) within their backlog section, as dragging them on the backlog does: just before or after a task, or to the top or bottom of their section, in the one rank. Needs Edit tasks on each.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]
- `board` (string (uuid), required): The board's id.

### Body

- `tasks` (array of string, required): The tasks (ids or keys), in the order they land. [1 to 500 items]
- `before` (string): Just before this task (id or key). [1 to 60 characters]
- `after` (string): Just after this task (id or key). [1 to 60 characters]
- `at` (string): The top or the bottom of the column or section. [one of: top, bottom]

### Request

```sh
curl -X POST "https://projqo.example/api/v1/orgs/{org}/boards/6f1c2a9e-3b7d-4e21-9a55-0c8d2f4b7e10/backlog/rank" \
  -H "Authorization: Bearer $PROJQO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "tasks": [
    "string"
  ],
  "before": "string",
  "after": "string",
  "at": "top"
}'
```

### Answer: 200

```json
{
  "items": [
    {
      "id": "6f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
      "key": "WEB-12",
      "rank": "0|i0000h:",
      "sprint": null
    }
  ]
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation. refused: The token's person can see the thing but may not do this; the message says why. read_only: The organisation is read-only (over the Free plan's people, or a payment is overdue).
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 409 `archived`: archived: The item (or its project) is archived, so it can't be changed. conflict: The thing changed since it was read, or the change clashes with its state.
- 413 `too_large`: too_large: The body or a file is larger than allowed.
- 415 `unsupported_media_type`: unsupported_media_type: The body isn't JSON.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).

## Move tasks to the backlog

`POST /orgs/{org}/boards/{board}/backlog/tasks`

Scope: `boards:write`

Takes tasks out of their sprint into the backlog, as dragging them there does, optionally at a place (before or after a task, or the top or bottom of the backlog). Needs Edit tasks on each; a task leaving an active sprint is recorded in the sprint's report.

### Path parameters

- `org` (string, required): The organisation's id (or its address name). [1 to 100 characters]
- `board` (string (uuid), required): The board's id.

### Body

- `tasks` (array of string, required): The tasks (ids or keys), in the order they land. [1 to 500 items]
- `before` (string): Just before this task (id or key). [1 to 60 characters]
- `after` (string): Just after this task (id or key). [1 to 60 characters]
- `at` (string): The top or the bottom of the column or section. [one of: top, bottom]

### Request

```sh
curl -X POST "https://projqo.example/api/v1/orgs/{org}/boards/6f1c2a9e-3b7d-4e21-9a55-0c8d2f4b7e10/backlog/tasks" \
  -H "Authorization: Bearer $PROJQO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "tasks": [
    "string"
  ],
  "before": "string",
  "after": "string",
  "at": "top"
}'
```

### Answer: 200

```json
{
  "items": [
    {
      "id": "6f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
      "key": "WEB-12",
      "rank": "0|i0000h:",
      "sprint": null
    }
  ]
}
```

### Errors

- 400 `invalid`: invalid: A value is wrong or missing, or a parameter is unknown. Every problem is in details.
- 401 `invalid_token`: invalid_token: No token was sent, or it is wrong, expired or revoked, or its person is no longer a member (or is now a guest).
- 403 `insufficient_scope`: insufficient_scope: The token doesn't have the scope this call needs (named in WWW-Authenticate). api_off: The organisation's admins have switched the API off. suspended: projqo has suspended the organisation. refused: The token's person can see the thing but may not do this; the message says why. read_only: The organisation is read-only (over the Free plan's people, or a payment is overdue).
- 404 `not_found`: not_found: Nothing is at this address, or the token's person can't see it: the answer is the same.
- 409 `archived`: archived: The item (or its project) is archived, so it can't be changed. conflict: The thing changed since it was read, or the change clashes with its state.
- 413 `too_large`: too_large: The body or a file is larger than allowed.
- 415 `unsupported_media_type`: unsupported_media_type: The body isn't JSON.
- 429 `rate_limited`: rate_limited: Too many calls in this minute, for the token or for the whole organisation.
- 500 `internal`: internal: Something went wrong on projqo's side (never your mistake).
