# Tags

Source: https://projectfeed.app/docs/api/tags

Manage the workspace and project tags you apply to tasks and posts.

-   [Plan Free for reads, Pro or Enterprise for API key writes](https://projectfeed.app/docs/billing)
-   [Scopes tags:read, tasks:read, posts:read, tags:write, projects:write](https://projectfeed.app/docs/api/scopes)

## Native session access

GET and POST /api/v1/tags accept native session tokens. Send Authorization: Bearer with X-Project-Feed-Workspace. Reads require active workspace membership and omit inaccessible project tags. Creation uses the same workspace and project admin checks as API keys; viewers cannot write. Send an Idempotency-Key on creation and reuse it with the same body when retrying. Other catalog routes remain closed to session tokens.

For a task tag picker, pass the task's projectId to the list endpoint. It returns workspace tags plus that project's tags, including id, name, color, scope, and projectId. Follow nextCursor while hasMore is true. For a task without a project, use scope=workspace.

## Endpoints

Signed-in sessions can read accessible tags and manage tags within their project permissions. Workspace viewers cannot create, edit, delete, or promote tags. Promotion still requires permission to manage workspace tags. Tag edits, deletion, and promotion have no revision precondition; refresh state after an unknown outcome before retrying.

### GET /api/v1/tags

Any of these scopes

tags:read

tasks:read

posts:read

Query parameters

-   `projectId` string
    
    Only the tags usable in this project: workspace tags plus that project's own tags. Returns 404 when the project does not exist and 403 when it is private and the key's user is not in it.
    
-   `q` string
    
    Words to find in tag names, up to 100 characters. Matches are read as a window of up to 500 tags and ordered by sort and order, so the response may carry truncated: true
    
-   `scope` string
    
    workspace or project. With projectId, project means that project's own tags
    
-   `sort` string
    
    created (default), name, or usage. name and usage read a window of up to 500 tags, and the response then may carry truncated: true
    
-   `order` string
    
    asc or desc. The default is desc for usage and asc for the other sorts
    
-   `limit` number
    
    Number of tags per page (max 200, default 100)
    
-   `cursor` string
    
    The nextCursor value from the previous page
    
-   `fields` string
    
    Comma-separated fields to return. id is always included. See Choosing fields in Conventions.
    

Request

curl

```
curl --request GET \
  --url 'https://projectfeed.app/api/v1/tags' \
  --header 'Authorization: Bearer pf_YOUR_API_KEY'
```

Response

JSON

```
{
  "tags": [
    {
      "id": "tag_abc123",
      "name": "design",
      "color": "#F59E0B",
      "description": "Design work",
      "scope": "workspace",
      "projectId": null,
      "usageCount": 12,
      "createdAt": 1779600000000,
      "updatedAt": 1779600000000
    },
    {
      "id": "tag_def456",
      "name": "backend",
      "color": null,
      "description": null,
      "scope": "project",
      "projectId": "prj_abc123",
      "usageCount": 4,
      "createdAt": 1779600000000,
      "updatedAt": 1779680000000
    }
  ],
  "hasMore": false,
  "nextCursor": null
}
```

### GET /api/v1/tags/:id

Any of these scopes

tags:read

tasks:read

posts:read

Path parameters

-   `id` string required
    
    Tag ID (URL path)
    

Query parameters

-   `fields` string
    
    Comma-separated fields to return. id is always included. See Choosing fields in Conventions.
    

Request

curl

```
curl --request GET \
  --url 'https://projectfeed.app/api/v1/tags/tag_abc123' \
  --header 'Authorization: Bearer pf_YOUR_API_KEY'
```

Response

JSON

```
{
  "id": "tag_abc123",
  "name": "design",
  "color": "#F59E0B",
  "description": "Design work",
  "scope": "workspace",
  "projectId": null,
  "usageCount": 12,
  "createdAt": 1779600000000,
  "updatedAt": 1779600000000
}
```

### POST /api/v1/tags

Any of these scopes

tags:write

projects:write

Body parameters

-   `name` string required
    
    Tag name, up to 50 characters after cleanup. It is saved in lowercase with spaces turned into hyphens, and characters other than letters, numbers, and hyphens are dropped. A name already in use returns 400.
    
-   `color` string
    
    Hex color with six digits, such as #3B82F6
    
-   `description` string
    
    Description, up to 500 characters
    
-   `projectId` string
    
    Create a project tag in this project
    

Request

curl

```
curl --request POST \
  --url 'https://projectfeed.app/api/v1/tags' \
  --header 'Authorization: Bearer pf_YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "design",
  "color": "#F59E0B",
  "description": "Design work"
}'
```

Response

JSON

```
{
  "id": "tag_abc123",
  "name": "design",
  "color": "#F59E0B",
  "description": "Design work",
  "scope": "workspace",
  "projectId": null,
  "usageCount": 0,
  "createdAt": 1779600000000,
  "updatedAt": 1779600000000
}
```

### PATCH /api/v1/tags/:id

Any of these scopes

tags:write

projects:write

Path parameters

-   `id` string required
    
    Tag ID (URL path)
    

Body parameters

-   `name` string
    
    New name, cleaned up the same way as on create
    
-   `color` string
    
    New hex color with six digits
    
-   `description` string
    
    New description, up to 500 characters
    
-   `expectedUpdatedAt` number
    
    The tag's updatedAt from your last read. If the tag changed since, the request returns 412 and nothing is written. An If-Match header with the ETag does the same.
    

Request

curl

```
curl --request PATCH \
  --url 'https://projectfeed.app/api/v1/tags/tag_abc123' \
  --header 'Authorization: Bearer pf_YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "design",
  "color": "#F59E0B"
}'
```

Response

JSON

```
{
  "id": "tag_abc123",
  "name": "design",
  "color": "#F59E0B",
  "description": "Design work",
  "scope": "workspace",
  "projectId": null,
  "usageCount": 12,
  "createdAt": 1779600000000,
  "updatedAt": 1779680000000
}
```

### DELETE /api/v1/tags/:id

Any of these scopes

tags:write

projects:write

Path parameters

-   `id` string required
    
    Tag ID (URL path)
    

Request

curl

```
curl --request DELETE \
  --url 'https://projectfeed.app/api/v1/tags/tag_abc123' \
  --header 'Authorization: Bearer pf_YOUR_API_KEY'
```

Response

JSON

```
{ "id": "tag_abc123", "deleted": true }
```

### POST /api/v1/tags/:id/promote

Any of these scopes

tags:write

projects:write

Path parameters

-   `id` string required
    
    Tag ID (URL path)
    

Request

curl

```
curl --request POST \
  --url 'https://projectfeed.app/api/v1/tags/tag_abc123/promote' \
  --header 'Authorization: Bearer pf_YOUR_API_KEY'
```

Response

JSON

```
{
  "id": "tag_def456",
  "name": "backend",
  "color": null,
  "description": null,
  "scope": "workspace",
  "projectId": null,
  "usageCount": 4,
  "createdAt": 1779600000000,
  "updatedAt": 1779690000000
}
```

## Tag object

Responses that contain a tag object use this shape. The list endpoint wraps tag objects in a paginated result; deletion returns only the tag ID and a deletion flag.

`id`

The tag ID.

`name`

Lowercase, with hyphens instead of spaces.

`color`

Hex color, or null when none is set.

`description`

Text or null.

`scope`

`workspace` or `project`.

`projectId`

The owning project for a project tag, otherwise null.

`usageCount`

How many posts use the tag. Tags on tasks are not counted.

`createdAt`, `updatedAt`

Unix timestamps in milliseconds. updatedAt equals createdAt until the tag is edited or promoted.

## Workspace and project tags

A workspace tag can be used in every project. A project tag belongs to one project and can only be applied to tasks and posts in that project. Promoting a project tag makes it a workspace tag and keeps it on everything it was already applied to.

A name that is already taken returns 400. A project tag cannot reuse the name of a workspace tag or of another tag in its project.

## Who can change tags

The key's user needs the same rights as in the app. Every workspace member can read the tags they can see. Changes depend on the tag.

-   Workspace tags: workspace owners and admins can create, rename, and delete them.
-   Project tags: workspace owners and admins, and admins of that project, can create, rename, and delete them. Viewers cannot.
-   Promoting a project tag: workspace owners and admins only.

A key without the right role gets 403. Project tags in projects the key's user cannot open are left out of the list.

## Scopes and plans

Listing tags needs any one of `tags:read`, `tasks:read`, or `posts:read`, so a key that already reads tasks or posts can read the catalog. Creating, renaming, deleting, and promoting needs `tags:write` or `projects:write`. Free workspace keys are read-only, and of the scopes on this page only `tasks:read` and `posts:read` are available to them. See [Scopes](https://projectfeed.app/docs/api/scopes).

## Limits

-   Names: up to 50 characters.
-   Descriptions: up to 500 characters.
-   Colors: six-digit hex values such as #3B82F6.
-   List page size: 200 tags at most, 100 by default.
-   A task holds up to 100 tags. One request that sets tags on a task or post can name up to 50 in total across tagIds and tagNames.

The list uses cursor pagination, described in [Conventions](https://projectfeed.app/docs/api/conventions#pagination). A page can hold fewer tags than limit when some project tags are hidden from the key's user, so keep following `nextCursor` until `hasMore` is false.

## Next steps

-   [Tags on a task](https://projectfeed.app/docs/api/tasks#task-tags): add, replace, and remove the tags on one task.
-   [Posts](https://projectfeed.app/docs/api/posts): replace the tags on a post.
