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

# Update email tags

> Add or remove tags from an email



## OpenAPI

````yaml /openapi.json patch /v1/threads/emails/{emailId}/tags
openapi: 3.0.3
info:
  title: Emailr API
  version: 1.0.0
servers:
  - url: https://api.emailr.dev
    description: Production
security: []
tags:
  - name: emails
    description: Email sending and management
  - name: contacts
    description: Contact management
  - name: templates
    description: Email template management
  - name: domains
    description: Domain verification and management
  - name: webhooks
    description: Webhook configuration
  - name: broadcasts
    description: Broadcast campaign management
  - name: segments
    description: Contact segmentation
paths:
  /v1/threads/emails/{emailId}/tags:
    patch:
      tags:
        - threads
      summary: Update email tags
      description: Add or remove tags from an email
      operationId: updateEmailTags
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: emailId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTagsRequest'
      responses:
        '200':
          description: Tags updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  tags:
                    type: array
                    items:
                      type: string
                required:
                  - success
                  - tags
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateTagsRequest:
      type: object
      properties:
        add:
          type: array
          items:
            type: string
          example:
            - important
            - follow-up
        remove:
          type: array
          items:
            type: string
          example:
            - outdated
    Error:
      type: object
      properties:
        error:
          type: string
          example: An error occurred
        code:
          type: string
          example: VALIDATION_ERROR
        details: {}
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API key authentication. Use your API key as the bearer token.

````