# Projects and workflow (API)

> API endpoints to list, read and create projects, read a project's recent activity, and read or change a project's workflow statuses and transitions, task types, labels, sprints and custom fields.

Source: https://docs.sofiaspace.uz/api/projects/

A **project** holds tasks; its **workflow** is the list of **statuses** a task moves through (for example To Do → In Progress → Done) and the **transitions** allowed between them. A task also has a **task type** (Task, Bug, Epic …, shared by the whole workspace), optional **labels**, a **sprint** and **custom fields**. These endpoints read all of that, which you need before creating or moving tasks, and let a project admin set projects up.

**Scope:** reading needs `tasks:read`; creating projects, statuses, transitions and sprints needs `projects:admin`; creating labels needs `tasks:write`. Your role still applies on top of the scope:

- **Creating a project** needs Org Admin, or a workspace role with the **Create projects** permission. Integration accounts are never Org Admins, so give theirs a role with that permission.
- **Changing an existing project's set-up** (statuses, transitions, starting and completing sprints) needs the right to manage that project: an Org Admin, a Project Admin, a role with the project's manage permission, or its creator while still in the project. The `canManage` field tells you.

All examples use the workspace `acme.sofiaspace.uz`, organization ID `6b1f0c3e-2a4d-4c55-9a51-0d3f6a1e7b20` and the project `SALES` (`9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68`).

## List projects

`GET /api/v1/orgs/{orgId}/projects` — **Scope:** `tasks:read` or `dashboards:read`.

The projects in the workspace you can open: the ones you're a member of, and open projects (visibility `ORG`) if you're a full member.

```bash
curl https://acme.sofiaspace.uz/api/v1/orgs/6b1f0c3e-2a4d-4c55-9a51-0d3f6a1e7b20/projects \
  -H "Authorization: Bearer $SOFIA_TOKEN"
```

```json
{
  "projects": [
    {
      "id": "9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68",
      "orgId": "6b1f0c3e-2a4d-4c55-9a51-0d3f6a1e7b20",
      "key": "SALES",
      "name": "Sales pipeline",
      "description": "Deals from the CRM",
      "createdBy": "2c9a7f41-5b3e-4d1a-8f20-7e6b5c4d3a21",
      "createdAt": "2026-04-01T06:00:00Z",
      "canManage": true,
      "avatarVersion": null,
      "templateKey": "kanban",
      "templateVersion": 1,
      "defaultCardFields": null,
      "visibility": "MEMBERS",
      "isMember": true,
      "defaultTeamId": null,
      "color": "blue",
      "viewersCanComment": true,
      "crossProjectBlockerGate": "WARN"
    }
  ]
}
```

| Field | Meaning |
| --- | --- |
| `key` | The project key; task keys are `KEY-number`, for example `SALES-42` |
| `canManage` | You may change the project's set-up |
| `visibility` | `MEMBERS` (only people given a role) or `ORG` (open to every full member) |
| `isMember` | `false` when you're viewing an open project you haven't joined |
| `viewersCanComment` | Members whose project role can only view may still comment on tasks |
| `crossProjectBlockerGate` | What an unfinished blocker from **another** project does when a task here is moved to a done status: `WARN` (the move goes through; the default) or `BLOCK` (the move is refused). See [Blockers](https://docs.sofiaspace.uz/api/task-comments-links-blockers.md#what-a-blocker-does) |

## Get a project

`GET /api/v1/projects/{projectId}` — **Scope:** `tasks:read` or `dashboards:read`. Returns one project in the same shape. `404` if it doesn't exist or you can't open it.

## Create a project

`POST /api/v1/orgs/{orgId}/projects` — **Scope:** `projects:admin`, and Org Admin or a role with the **Create projects** permission. Honours [`Idempotency-Key`](https://docs.sofiaspace.uz/api/idempotency.md). Returns `201` and the project.

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `key` | string | yes | Up to 10 characters, unique in the workspace, for example `SUPPORT`. Stored as you send it, so send capital letters and digits |
| `name` | string | yes | Project name |
| `description` | string | no | Short description |
| `templateKey` | string | no | `kanban`, `scrum` or `waterfall`. Leave it out for To Do / In Progress / Done |
| `seedPhases` | boolean | no | Waterfall only: also create the five standard phases |
| `locale` | string | no | `uz`, `ru` or `en` — the language of the created statuses and phases |
| `visibility` | string | no | `MEMBERS` (default) or `ORG` |

```bash
curl -X POST https://acme.sofiaspace.uz/api/v1/orgs/6b1f0c3e-2a4d-4c55-9a51-0d3f6a1e7b20/projects \
  -H "Authorization: Bearer $SOFIA_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-project-support-2026" \
  -d '{"key":"SUPPORT","name":"Customer support","templateKey":"kanban","locale":"uz"}'
```

You become a Project Admin of the new project. It starts with the template's statuses and a default board.

Errors:

| Status | `code` | Why |
| --- | --- | --- |
| `400` | `NAME_REQUIRED` | `key` or `name` is blank |
| `400` | `INVALID_ARGUMENT` | `key` is longer than 10 characters, or an unknown `templateKey` or `visibility` |
| `403` | `PROJECT_CREATE_NOT_ALLOWED` | You're not an Org Admin and your role lacks **Create projects** |
| `409` | `ALREADY_EXISTS` | The key is already in use in the workspace |
| `409` | `ENTITLEMENT_DENIED` | The plan's project limit is reached (see [Errors](https://docs.sofiaspace.uz/api/errors.md#plan-limits-and-switched-off-modules)) |
| `429` | `RATE_LIMITED` | More than 30 projects created in an hour |

## List a project's statuses

`GET /api/v1/projects/{projectId}/workflow-statuses` — **Scope:** `tasks:read`.

```bash
curl https://acme.sofiaspace.uz/api/v1/projects/9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68/workflow-statuses \
  -H "Authorization: Bearer $SOFIA_TOKEN"
```

```json
{
  "statuses": [
    { "id": "4f1a2b3c-5d6e-4f70-8a9b-0c1d2e3f4a50", "projectId": "9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68", "name": "To Do", "orderIndex": 0, "isCompletionStatus": false, "createdAt": "2026-04-01T06:00:00Z", "statusGroup": "TODO", "color": null },
    { "id": "5a2b3c4d-6e7f-4a81-9b0c-1d2e3f4a5b61", "projectId": "9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68", "name": "In Progress", "orderIndex": 1, "isCompletionStatus": false, "createdAt": "2026-04-01T06:00:00Z", "statusGroup": "IN_PROGRESS", "color": "blue" },
    { "id": "6b3c4d5e-7f80-4b92-8c1d-2e3f4a5b6c72", "projectId": "9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68", "name": "Done", "orderIndex": 2, "isCompletionStatus": true, "createdAt": "2026-04-01T06:00:00Z", "statusGroup": "DONE", "color": "green" }
  ]
}
```

`statusGroup` is `TODO`, `IN_PROGRESS` or `DONE`; a status in the `DONE` group is a **completion status** (`isCompletionStatus: true`). Match statuses by `id` in your code — names can be renamed and translated.

## Add a status

`POST /api/v1/projects/{projectId}/workflow-statuses` — **Scope:** `projects:admin`, and the right to manage the project. Returns `201` and the status.

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `name` | string | yes | Unique in the project |
| `orderIndex` | integer | no | Position on the board, from 0 |
| `statusGroup` | string | no | `TODO`, `IN_PROGRESS` or `DONE`. Wins over `isCompletionStatus` |
| `isCompletionStatus` | boolean | no | Older way to say `DONE` |
| `color` | string | no | One of `red`, `amber`, `green`, `teal`, `blue`, `violet`, `plum`, `moss`, `slate` |

```bash
curl -X POST https://acme.sofiaspace.uz/api/v1/projects/9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68/workflow-statuses \
  -H "Authorization: Bearer $SOFIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Waiting for payment","orderIndex":2,"statusGroup":"IN_PROGRESS","color":"amber"}'
```

Errors: `400 STATUS_NAME_TAKEN` (`params.name`), `400 NAME_REQUIRED`, `400 INVALID_ARGUMENT` for an unknown colour or group, `403` without the right to manage the project.

If the project's workflow restricts transitions, a new status starts with **no** transitions to or from it — [add transitions](#allow-a-transition) or tasks can't reach it. In a project where every status can move to every other status, the new status is connected to all the others automatically.

## Change a status

`PUT /api/v1/workflow-statuses/{statusId}` — **Scope:** `projects:admin`, and the right to manage the project. Send only what changes: `name`, `orderIndex`, `statusGroup`, `isCompletionStatus`, `color` (`""` clears the colour). Returns the status.

```bash
curl -X PUT https://acme.sofiaspace.uz/api/v1/workflow-statuses/5a2b3c4d-6e7f-4a81-9b0c-1d2e3f4a5b61 \
  -H "Authorization: Bearer $SOFIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"In work"}'
```

Errors: `400 STATUS_NAME_TAKEN`, `400 INVALID_ARGUMENT` for an unknown colour or group.

## Reorder statuses

`PUT /api/v1/projects/{projectId}/workflow-statuses/reorder` — **Scope:** `projects:admin`, and the right to manage the project. Send **every** status ID of the project, each once, in the new order; returns `{"statuses": [...]}`. A list that leaves one out or adds a foreign one is refused with `400`.

```json
{ "statusIds": ["4f1a2b3c-5d6e-4f70-8a9b-0c1d2e3f4a50", "5a2b3c4d-6e7f-4a81-9b0c-1d2e3f4a5b61", "7c4d5e6f-8091-4ca3-9d2e-3f4a5b6c7d83", "6b3c4d5e-7f80-4b92-8c1d-2e3f4a5b6c72"] }
```

## List allowed transitions

`GET /api/v1/projects/{projectId}/workflow-transitions` — **Scope:** `tasks:read`.

```json
{
  "transitions": [
    { "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d", "projectId": "9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68", "fromStatusId": "4f1a2b3c-5d6e-4f70-8a9b-0c1d2e3f4a50", "toStatusId": "5a2b3c4d-6e7f-4a81-9b0c-1d2e3f4a5b61" }
  ]
}
```

A task can move from status A to status B only if there's a transition A → B. When every status connects to every other, all moves are allowed.

## Allow a transition

`POST /api/v1/projects/{projectId}/workflow-transitions` — **Scope:** `projects:admin`, and the right to manage the project. Returns `201` and the transition.

```bash
curl -X POST https://acme.sofiaspace.uz/api/v1/projects/9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68/workflow-transitions \
  -H "Authorization: Bearer $SOFIA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fromStatusId":"5a2b3c4d-6e7f-4a81-9b0c-1d2e3f4a5b61","toStatusId":"7c4d5e6f-8091-4ca3-9d2e-3f4a5b6c7d83"}'
```

Errors: `400 TRANSITION_EXISTS`, `400 TRANSITION_SAME_STATUS`.

## List task types

`GET /api/v1/orgs/{orgId}/task-types` — **Scope:** `tasks:read` or `task:create`.

Task types belong to the workspace, not to one project. Creating a task needs a `taskTypeId`.

```json
{
  "taskTypes": [
    { "id": "1a3c5e7f-9b2d-4f6a-8c1e-3d5f7a9b2c4e", "orgId": "6b1f0c3e-2a4d-4c55-9a51-0d3f6a1e7b20", "name": "Task", "icon": null, "color": null, "iconVersion": null, "usageCount": 318, "createdAt": "2026-03-02T08:00:00Z", "systemKey": null },
    { "id": "2b4d6f8a-0c3e-4a7b-9d2f-4e6a8c0b3d5f", "orgId": "6b1f0c3e-2a4d-4c55-9a51-0d3f6a1e7b20", "name": "Phase", "icon": "flag", "color": "plum", "iconVersion": null, "usageCount": 12, "createdAt": "2026-03-02T08:00:00Z", "systemKey": "phase" }
  ]
}
```

`systemKey` marks built-in types such as `epic` and `phase` (it survives a rename); it's `null` for your own types.

## Labels

`GET /api/v1/projects/{projectId}/labels` — **Scope:** `tasks:read` or `dashboards:read`. Returns `{"labels": [{"id", "projectId", "name", "color"}]}`.

`POST /api/v1/projects/{projectId}/labels` — **Scope:** `tasks:write`. Body `{"name": "vip", "color": "teal"}`; returns `201` and the label. A name already used in the project is refused with `409 ALREADY_EXISTS`. [Put a label on a task](https://docs.sofiaspace.uz/api/tasks.md#add-or-remove-a-label).

## Sprints

`GET /api/v1/projects/{projectId}/sprints` — **Scope:** `tasks:read` or `dashboards:read`. Optional `boardId` query parameter for one board's sprints.

```json
{
  "sprints": [
    { "id": "c5d6e7f8-0912-4a3b-8c4d-5e6f7a8b9c0d", "projectId": "9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68", "boardId": "e7f80912-3a4b-4c5d-9e6f-7a8b9c0d1e2f", "name": "Sprint 14", "goal": "Close Q4 renewals", "state": "ACTIVE", "startDate": "2026-11-10", "endDate": "2026-11-21", "startedAt": "2026-11-10T04:00:00Z", "completedAt": null, "createdAt": "2026-11-07T10:00:00Z" }
  ]
}
```

`state` is `FUTURE`, `ACTIVE` or `COMPLETE`. [Move a task into a sprint](https://docs.sofiaspace.uz/api/tasks.md#move-a-task-to-a-sprint-or-the-backlog).

**Scope `projects:admin`:**

| Endpoint | Body | Does |
| --- | --- | --- |
| `POST /api/v1/projects/{projectId}/sprints` | `{"name", "goal", "startDate", "endDate", "boardId"}` | Creates a future sprint (`201`). Only `name` is required. Dates are `yyyy-MM-dd`; the end can't be before the start. Without `boardId` it goes on the project's default board |
| `POST /api/v1/sprints/{sprintId}/start` | none | Starts a future sprint. Needs the right to manage the project. Without an end date, the end is set from the project's sprint length |
| `POST /api/v1/sprints/{sprintId}/complete` | `{"targetSprintId": "…"}` or none | Completes the active sprint. Needs the right to manage the project. Unfinished tasks move to `targetSprintId` (a future sprint on the same board), or to the backlog without one |

Errors: `409 FAILED_PRECONDITION` when **Sprints** is switched off for the project, when starting a sprint that has no tasks or while another sprint on the board is active, when starting a sprint that isn't future or completing one that isn't active, or when `targetSprintId` isn't a future sprint. `400 DATE_RANGE_INVALID` for an end before the start; `400 SPRINT_WRONG_PROJECT` for a `targetSprintId` from another project.

## Custom fields of a project

`GET /api/v1/projects/{projectId}/custom-fields` — **Scope:** `tasks:read`.

```json
{
  "fields": [
    {
      "projectId": "9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68",
      "fieldId": "f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4a5b",
      "position": 0,
      "showOnCard": true,
      "field": {
        "id": "f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4a5b",
        "orgId": "6b1f0c3e-2a4d-4c55-9a51-0d3f6a1e7b20",
        "name": "Deal value",
        "type": "MONEY",
        "description": null,
        "config": "{\"currency\":\"UZS\"}",
        "options": [],
        "usageCount": 57,
        "deletedAt": null
      }
    }
  ]
}
```

`type` is one of `TEXT`, `URL`, `NUMBER`, `MONEY`, `PROGRESS`, `DATE`, `CHECKBOX`, `DROPDOWN`, `LABELS`, `PEOPLE`. A `DROPDOWN` or `LABELS` field lists its choices in `options` (`id`, `label`, `color`). [Set a field on a task](https://docs.sofiaspace.uz/api/tasks.md#set-custom-field-values).

## Read a project's recent activity

`GET /api/v1/projects/{projectId}/activity` — **Scope:** `tasks:read`. What happened in the project lately, newest first, as in the activity feed of the project's **Summary**: tasks created, moved and finished, comments, and changes of assignee or due date. You need to be able to open the project.

| Parameter | Meaning |
| --- | --- |
| `since` | First day to include, `yyyy-MM-dd`. Default: the last 7 days, today included |
| `tz` | Time zone the days are counted in, for example `Asia/Tashkent`; default UTC |
| `limit` | Events per page; default 25, at most 100 |
| `cursor` | The `next` value of the previous page |

```bash
curl -G https://acme.sofiaspace.uz/api/v1/projects/9d2e7a10-4b6c-4e8f-a1d3-5c7e9b2f4a68/activity \
  -H "Authorization: Bearer $SOFIA_TOKEN" \
  --data-urlencode "since=2026-11-09" \
  --data-urlencode "tz=Asia/Tashkent"
```

```json
{
  "events": [
    {
      "id": "t:8d0f2b4a-6c8e-4a1b-9d3f-5b7d9f1a3c24",
      "at": "2026-11-13T14:02:11Z",
      "actorId": "2c9a7f41-5b3e-4d1a-8f20-7e6b5c4d3a21",
      "kind": "status",
      "itemId": "7c3e9a15-2d4f-4b6a-9e8c-1f3a5b7d9e20",
      "key": "SALES-42",
      "title": "Onboard new customer (deal #1042)",
      "typeId": "1a3c5e7f-9b2d-4f6a-8c1e-3d5f7a9b2c4e",
      "from": "To Do",
      "to": "In Progress"
    },
    {
      "id": "c:1e3a5c7b-9d0f-4b2c-8e4a-6c8e0a2b4d35",
      "at": "2026-11-13T11:20:00Z",
      "actorId": "8e4d2b19-6c7a-4f3e-b1d0-3a5c9e8f7d62",
      "kind": "comment",
      "itemId": "7c3e9a15-2d4f-4b6a-9e8c-1f3a5b7d9e20",
      "key": "SALES-42",
      "title": "Onboard new customer (deal #1042)",
      "typeId": "1a3c5e7f-9b2d-4f6a-8c1e-3d5f7a9b2c4e",
      "excerpt": "Training booked for Monday."
    }
  ],
  "next": "MjAyNi0xMS0xM1QxMToyMDowMFp8YzoxZTNh"
}
```

| `kind` | What happened | Extra fields |
| --- | --- | --- |
| `create` | A task was created | — |
| `status` | A task moved to another status | `from`, `to`: status names |
| `done` | A task moved into a done status | `from`, `to`: status names |
| `comment` | Someone commented | `excerpt`: the first words, as plain text |
| `assign` | The assignee changed | `from`, `to`: user IDs (`null` for nobody) |
| `due` | The due date changed | `from`, `to`: `yyyy-MM-dd` (`null` for none) |
| `bulk` | Five or more events of one kind by one person within a minute, shown as one | `action` (the kind), `count`, `itemIds`, `itemKeys` |

- `next` is `null` on the last page. Paging goes back in time but never before `since`.
- New kinds may be added; skip ones you don't know.
- Events on deleted tasks are left out.

Errors: `404 NOT_FOUND` for no such project, `403` when you can't open it, `400` for a bad `since` or `cursor`. When the reporting engine is busy you get `429`; retry after a second.

For one task's full change history, see [Read a task's activity history](https://docs.sofiaspace.uz/api/task-comments-links-blockers.md#read-a-tasks-activity-history).

## What you can't do with the API

- You can't delete or rename projects, change a project's settings (visibility, colour, **Viewers can comment**, the cross-project blocker setting), delete statuses or transitions, or create task types with a token. Do it in the app: see [Workflows, task types and fields](https://docs.sofiaspace.uz/tasks/workflows-types-fields.md).
- You can't edit, reopen or delete sprints with a token.
- You can't create or change custom-field definitions, or project members and roles.
- You can't list projects you can't open.

## Related

- [Tasks](https://docs.sofiaspace.uz/api/tasks.md)
- [Integrations API](https://docs.sofiaspace.uz/api/integrations.md) — create a task by project key, for other systems
- [Workflows, task types and fields](https://docs.sofiaspace.uz/tasks/workflows-types-fields.md)
- [Sprints](https://docs.sofiaspace.uz/tasks/sprints.md)
