> ## Documentation Index
> Fetch the complete documentation index at: https://learn.biq.li/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a tag

> Change a tag's display name or color.

`PATCH /v1/tag/{tag_id}` requires **Tags: Write** (`tags.update`).

```json theme={null}
{"display_name":"Organic social","color":"green"}
```

Both fields are optional, but at least one is required. Renaming also regenerates normalized `name`. `color` accepts `blue`, `green`, `yellow`, `red`, `gray`, `purple`, `pink`, `cyan`, or `null`. Use `gray` or `null` for the default gray style; the response returns that default as `null`. Unsupported colors return `422 validation_error`. Success returns the updated complete tag; conflicts return `409 tag_name_taken`.

## Shared API behavior

Authentication is workspace-scoped; see [Authentication](/docs/api-reference/authentication). Errors use the standard envelope and request IDs described in [Errors](/docs/api-reference/errors), and requests are subject to [Rate limits](/docs/api-reference/rate-limits).


## OpenAPI

````yaml PATCH /v1/tag/{tag}
openapi: 3.1.0
info:
  title: Biqli API
  version: 1.0.0
  description: Workspace-scoped REST API for Biqli.
servers:
  - url: https://biq.li/api
security:
  - bearerAuth: []
paths:
  /v1/tag/{tag}:
    parameters:
      - $ref: '#/components/parameters/TagId'
    patch:
      tags:
        - Tags
      summary: Update a tag
      description: Requires tags.update.
      operationId: tag.update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagPatch'
      responses:
        '200':
          description: Updated tag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    TagId:
      name: tag
      in: path
      required: true
      schema:
        type: string
        pattern: ^biq_tag_[0-9A-HJKMNP-TV-Z]{26}$
  schemas:
    TagPatch:
      type: object
      additionalProperties: false
      minProperties: 1
      properties:
        display_name:
          type: string
          minLength: 2
          maxLength: 100
        color:
          $ref: '#/components/schemas/TagColorInput'
    TagResponse:
      type: object
      required:
        - tag
        - status
      properties:
        tag:
          $ref: '#/components/schemas/Tag'
        status:
          type: string
          const: success
    TagColorInput:
      type:
        - string
        - 'null'
      enum:
        - blue
        - green
        - yellow
        - red
        - gray
        - purple
        - pink
        - cyan
        - null
      description: >-
        Supported dashboard color. gray and null both select the default gray
        style, which responses represent as null.
    Tag:
      type: object
      required:
        - id
        - name
        - display_name
        - links_count
      properties:
        id:
          type: string
          pattern: ^biq_tag_[0-9A-HJKMNP-TV-Z]{26}$
        name:
          type: string
        display_name:
          type: string
        color:
          $ref: '#/components/schemas/TagColor'
        links_count:
          type: integer
          minimum: 0
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
    ApiError:
      type: object
      required:
        - error
        - request_id
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - invalid_token
                - insufficient_scope
                - upgrade_required
                - quota_exceeded
                - resource_not_found
                - domain_taken
                - alias_taken
                - external_id_taken
                - folder_name_taken
                - tag_name_taken
                - pixel_name_taken
                - biolink_name_taken
                - method_not_allowed
                - url_blocked
                - dns_verification_failed
                - validation_error
                - rate_limit_exceeded
                - internal_server_error
            message:
              type: string
            details:
              type: object
              additionalProperties: true
        request_id:
          type: string
          description: Request identifier to include when contacting support.
    TagColor:
      type:
        - string
        - 'null'
      enum:
        - blue
        - green
        - yellow
        - red
        - purple
        - pink
        - cyan
        - null
      description: null represents the default gray style.
  responses:
    Unauthorized:
      $ref: '#/components/responses/ApiErrorResponse'
      description: The workspace API key is missing, invalid, or revoked.
    Forbidden:
      $ref: '#/components/responses/ApiErrorResponse'
      description: >-
        The key lacks a required scope, the workspace must upgrade, or its quota
        is exhausted.
    NotFound:
      $ref: '#/components/responses/ApiErrorResponse'
      description: >-
        The requested resource or referenced public ID is unavailable in the
        key's workspace.
    Conflict:
      $ref: '#/components/responses/ApiErrorResponse'
      description: >-
        A unique alias, external ID, custom domain, or workspace resource name
        is already in use.
    UnprocessableEntity:
      $ref: '#/components/responses/ApiErrorResponse'
      description: >-
        The payload is invalid, a destination was blocked, or domain DNS
        verification is not ready.
    RateLimited:
      description: The workspace exceeded its plan's API rate limit.
      headers:
        RateLimit-Policy:
          description: Current IETF HTTPAPI quota policy as a structured field.
          schema:
            type: string
            example: '"workspace-api";q=1000;w=60'
        RateLimit:
          description: Current IETF HTTPAPI service limit as a structured field.
          schema:
            type: string
            example: '"workspace-api";r=0;t=17'
        Retry-After:
          description: Seconds to wait before retrying the request.
          schema:
            type: integer
            minimum: 0
            example: 17
        X-RateLimit-Limit:
          description: Legacy maximum request count for the current window.
          schema:
            type: integer
            minimum: 1
            example: 1000
        X-RateLimit-Remaining:
          description: Legacy remaining request count.
          schema:
            type: integer
            minimum: 0
            example: 0
        X-RateLimit-Reset:
          description: Legacy reset time as a UTC Unix timestamp.
          schema:
            type: integer
            format: int64
            example: 1788126519
        X-Biq-Request-Id:
          description: Request identifier for support and tracing.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      $ref: '#/components/responses/ApiErrorResponse'
      description: The request failed unexpectedly.
    ApiErrorResponse:
      description: API error.
      headers:
        X-Biq-Request-Id:
          description: Request identifier for support and tracing.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Workspace API key
      description: A workspace API key beginning with biqli_.

````