---
title: "Assign users to a tag."
method: PUT
path: "/api/v1/projects/{projectId}/labels"
tags: ["Tags"]
---

# Assign users to a tag.

`PUT /api/v1/projects/{projectId}/labels`

## Request

- Base URL: `https://app.customgpt.ai`
- URL: `https://app.customgpt.ai/api/v1/projects/{projectId}/labels`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/poll-the-people/apis/customgpt-ai/docs/api/v1/projects/:projectId/labels/put.ts> (a function with typed inputs; its response is checked against the schema)

Sets which users are assigned to each tag. The provided user list becomes the source of truth - users not included in the list are removed from that tag, and new users are added.

Tags are called *labels* in the API, so paths and fields use `label` (for example `labelId` and `labels`).

Notes: Requires Custom plan.

Warning: This is a replacement operation, not an append. Users not included in the request will be removed from the tag.

## Path parameters

- `projectId` integer, required

## Request body

- object
  - `labels` object[]: List of tags with users to assign
    - `id` integer: Tag ID (must belong to this project)
    - `users` string[]: List of user emails to assign to this tag

## Response `200`

Update tags and assigned users for a project

- object
  - `status` 'error' | 'success': The status of the response
  - `data` object
    - `current_page` integer: The page number of this response. The first page is 1.
    - `data` ProjectLabelUsers[]
      - `id` integer: Tag ID
      - `name` string: Tag name
      - `users` string[]: List of user emails assigned to this tag for the project
    - `first_page_url` string: The first page url
    - `from` integer: The first item number of the current page
    - `last_page` integer: Total number of pages available. Pagination is complete when the requested `page` equals `last_page`.
    - `last_page_url` string: The last page url
    - `next_page_url` string: The next page url
    - `path` string: The current page url
    - `per_page` integer: Number of results returned per page.
    - `prev_page_url` string: The previous page url
    - `to` integer: The last item number of the current page
    - `total` integer: The total number of items

## Other responses

- `400`: Bad Argument
- `401`: API Token is either missing or invalid
- `403`: Source labeling feature is not enabled for this account.
- `404`: Agent not found
- `429`: Too many requests. You have exceeded your API rate limit.
- `500`: Internal Server Error

## Changes

- **2026-11-03** `77aab4354382`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/poll-the-people/apis/customgpt-ai/changes/api/v1/projects/:projectId/labels/put.md)

---

[API](https://skmtc.dev/poll-the-people/apis/customgpt-ai.md) - [All operations](https://skmtc.dev/poll-the-people/apis/customgpt-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/poll-the-people/apis/customgpt-ai/revisions/77aab4354382?raw)
