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

# Atualizar tag

> Atualiza uma tag pelo `id` (UUID) ou `key` (string). Apenas os campos enviados no body são alterados.

<Accordion title="Escopo necessário">
`tags:write`
</Accordion>



## OpenAPI

````yaml /pt/api-reference/openapi.json patch /v1/tags/{identifier}
openapi: 3.1.0
info:
  title: OAuth 2.1
  description: Endpoints para registrar aplicativos e gerenciar tokens OAuth 2.1.
  version: 1.0.0
  contact:
    name: Suporte Vendaze
    email: suporte@vendaze.com
servers:
  - url: https://api.vendaze.com
    description: Produção
security:
  - bearerAuth: []
tags:
  - name: OAuth
  - name: Pessoas
  - name: Empresas
  - name: Negócios
  - name: Pipelines
  - name: Tarefas
  - name: Tipos de Tarefas
  - name: Produtos
  - name: Tags
  - name: Listas
  - name: Campos Adicionais
  - name: Webhooks
paths:
  /v1/tags/{identifier}:
    patch:
      tags:
        - Tags
      summary: Atualizar tag
      description: >-
        Atualiza uma tag pelo `id` (UUID) ou `key` (string). Apenas os campos
        enviados no body são alterados.


        <Accordion title="Escopo necessário">

        `tags:write`

        </Accordion>
      operationId: updateTag
      parameters:
        - $ref: '#/components/parameters/identifier'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTagRequest'
      responses:
        '200':
          description: Tag atualizada com sucesso.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    identifier:
      name: identifier
      in: path
      required: true
      schema:
        type: string
      description: '`id` (UUID) ou `key` (string) do campo. Ambos os formatos são aceitos.'
  schemas:
    UpdateTagRequest:
      type: object
      description: >-
        Todos os campos são opcionais. Apenas os campos enviados no body são
        alterados.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 30
          description: Novo nome de exibição.
          example: Lead Frio
        color_text:
          type: string
          nullable: true
          pattern: ^#[0-9a-fA-F]{6}$
          description: >-
            Nova cor do texto em formato hex RGB. Envie `null` para reverter ao
            padrão do workspace.
          example: '#374152'
        color_background:
          type: string
          nullable: true
          pattern: ^#[0-9a-fA-F]{6}$
          description: >-
            Nova cor de fundo em formato hex RGB. Envie `null` para reverter ao
            padrão do workspace.
          example: '#e4e6eb'
    TagResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Tag'
    Tag:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Identificador único da tag.
        name:
          type: string
          maxLength: 30
          description: Nome de exibição da tag.
          example: Lead Quente
        key:
          type: string
          maxLength: 30
          description: >-
            Chave única no workspace. Apenas letras minúsculas, dígitos e
            underscores (ex: `lead_quente`). Usada para referenciar a tag nos
            arrays de associação.
          example: lead_quente
        color_text:
          type: string
          nullable: true
          pattern: ^#[0-9a-fA-F]{6}$
          description: >-
            Cor do texto em formato hex RGB. `null` significa que o padrão do
            workspace é aplicado.
          example: '#ffffff'
        color_background:
          type: string
          nullable: true
          pattern: ^#[0-9a-fA-F]{6}$
          description: >-
            Cor de fundo em formato hex RGB. `null` significa que o padrão do
            workspace é aplicado.
          example: '#ef4444'
        created_at:
          type: string
          format: date-time
          description: Timestamp ISO 8601 UTC de criação da tag.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type: string
              format: uuid
    ValidationErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: Validation failed.
            fields:
              type: object
              additionalProperties:
                type: string
            request_id:
              type: string
              format: uuid
  responses:
    BadRequest:
      description: 'Body malformado ou PATCH sem campos. Código de erro: `bad_request`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: bad_request
              message: Request body must be valid JSON.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Unauthorized:
      description: >-
        Token ausente, inválido ou expirado. Códigos possíveis: `unauthorized`,
        `token_expired`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: Missing or invalid Authorization header.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InsufficientScope:
      description: 'Token sem o escopo necessário. Código de erro: `insufficient_scope`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: insufficient_scope
              message: This endpoint requires the 'webhooks:read' scope.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    NotFound:
      description: >-
        Webhook não encontrado ou pertence a outra integração. Código:
        `not_found`. Mensagem: `"Webhook not found."`
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: Webhook not found.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    ValidationError:
      description: >-
        Validação de entrada falhou. Código: `validation_error`. O objeto
        `fields` mapeia cada campo inválido para uma descrição do problema.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            error:
              code: validation_error
              message: Validation failed.
              fields:
                url: url must use HTTPS.
                events: At least one event is required.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    RateLimitExceeded:
      description: 'Rate limit excedido. Código: `rate_limit_exceeded`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: rate_limit_exceeded
              message: Rate limit exceeded. Try again in 60 seconds.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InternalError:
      description: 'Erro interno inesperado. Código: `internal_error`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: internal_error
              message: An unexpected error occurred.
              request_id: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Access token OAuth 2.1.

````