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

# Update Tag Route

> Update an existing tag

Attributes:

    tag_data: The tag data to update the tag with.



## OpenAPI

````yaml /deasy-openapi-stainless.yml put /tags/update
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: /rest/unstructured
security: []
paths:
  /tags/update:
    put:
      tags:
        - Tags
      summary: Update Tag Route
      description: |-
        Update an existing tag

        Attributes:

            tag_data: The tag data to update the tag with.
      operationId: update_tag_route_tags_update_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTagRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTagResponse'
        '403':
          description: Missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '500':
          description: >-
            Internal Server Error. An unexpected error occurred while processing
            the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
      security:
        - BasicAuth: []
        - BearerAuth: []
          UserIdAuth: []
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from unstructured import UnstructuredClient

            client = UnstructuredClient(
                username=os.environ.get("UNSTRUCTURED_USERNAME"),  # This is the default and can be omitted
                password=os.environ.get("UNSTRUCTURED_PASSWORD"),  # This is the default and can be omitted
            )
            tag = client.tags.update(
                tag_data={
                    "name": "name"
                },
            )
            print(tag.tag)
        - lang: JavaScript
          source: >-
            import UnstructuredClient from 'unstructured-sdk';


            const client = new UnstructuredClient({
              authMethod: 'My Auth Method',
              username: process.env['UNSTRUCTURED_USERNAME'], // This is the default and can be omitted
              password: process.env['UNSTRUCTURED_PASSWORD'], // This is the default and can be omitted
            });


            const tag = await client.tags.update({ tag_data: { name: 'name' }
            });


            console.log(tag.tag);
components:
  schemas:
    UpdateTagRequest:
      properties:
        tag_data:
          $ref: '#/components/schemas/Tag-Input'
      type: object
      required:
        - tag_data
      title: UpdateTagRequest
    UpdateTagResponse:
      properties:
        tag_name:
          type: string
          title: Tag Name
        tag:
          type: object
          title: Tag
      type: object
      required:
        - tag_name
        - tag
      title: UpdateTagResponse
    HTTPError:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: HTTPError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Tag-Input:
      properties:
        tag_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tag Id
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          default: ''
        output_type:
          anyOf:
            - $ref: '#/components/schemas/TagOutputType'
            - type: 'null'
          default: string
        available_values:
          anyOf:
            - items:
                anyOf:
                  - type: string
                  - type: number
                  - type: integer
              type: array
            - type: 'null'
          title: Available Values
          default: []
        examples:
          anyOf:
            - items:
                anyOf:
                  - type: string
                  - type: object
              type: array
            - type: 'null'
          title: Examples
          default: []
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        tuned:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tuned
          default: 0
        maxValues:
          anyOf:
            - type: integer
            - type: string
            - items: {}
              type: array
            - type: 'null'
          title: Maxvalues
        neg_examples:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Neg Examples
          default: []
        retry_feedback:
          anyOf:
            - type: object
            - type: 'null'
          title: Retry Feedback
        date_format:
          anyOf:
            - type: string
            - type: 'null'
          title: Date Format
        strategy:
          anyOf:
            - type: string
            - type: 'null'
          title: Strategy
          default: LLM
        scope:
          anyOf:
            - type: string
            - type: 'null'
          title: Scope
          default: ALL_PAGES
        truncated_available_values:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Truncated Available Values
          default: false
        enhance_file_metadata:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enhance File Metadata
          default: true
        regex:
          anyOf:
            - type: string
            - type: 'null'
          title: Regex
        patterns:
          anyOf:
            - items:
                $ref: '#/components/schemas/RegexPattern'
              type: array
            - type: 'null'
          title: Patterns
          default: []
        visual_rules:
          anyOf:
            - items:
                $ref: '#/components/schemas/RuleBasedRule-Input'
              type: array
            - type: 'null'
          title: Visual Rules
          default: []
        group:
          anyOf:
            - type: string
            - type: 'null'
          title: Group
        min_confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Min Confidence
        collibra_asset_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Collibra Asset Id
        collibra_domain_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Collibra Domain Id
        source_asset_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Asset Type
        governance_metadata:
          anyOf:
            - $ref: '#/components/schemas/GovernanceMetadata'
            - type: 'null'
      type: object
      required:
        - name
      title: Tag
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TagOutputType:
      type: string
      enum:
        - string
        - binary
        - number
        - date
      title: TagOutputType
    RegexPattern:
      properties:
        pattern:
          type: string
          title: Pattern
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        output_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Value
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
        validator:
          anyOf:
            - type: string
            - type: 'null'
          title: Validator
        active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Active
          default: true
        context_items:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Context Items
        required_context_matches:
          anyOf:
            - type: integer
            - type: 'null'
          title: Required Context Matches
          default: 0
      type: object
      required:
        - pattern
      title: RegexPattern
      description: Model for regex pattern configuration in tags.
    RuleBasedRule-Input:
      properties:
        tag_value:
          anyOf:
            - type: string
            - type: number
            - type: integer
            - type: 'null'
          title: Tag Value
        condition:
          anyOf:
            - $ref: '#/components/schemas/Condition-Input'
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
      type: object
      title: RuleBasedRule
      description: Model for rule-based tag configuration.
    GovernanceMetadata:
      properties:
        record_code:
          type: string
          title: Record Code
          description: Unique identifier from the retention schedule (e.g., FIN-001)
        retention_period:
          type: string
          title: Retention Period
          description: How long to retain (e.g., '7 years', 'Permanent')
        retention_trigger:
          type: string
          title: Retention Trigger
          description: Event that starts the retention clock (e.g., 'Date of payment')
        disposition:
          type: string
          title: Disposition
          description: Action after retention expires (e.g., 'Destroy', 'Archive')
        ingestion_id:
          type: string
          title: Ingestion Id
          description: UUID grouping all tags from the same CSV upload
      type: object
      required:
        - record_code
        - retention_period
        - retention_trigger
        - disposition
        - ingestion_id
      title: GovernanceMetadata
      description: >-
        Structured metadata for retention/policy governance tags.


        Populated when a tag is ingested from a retention schedule (CSV or
        Collibra Standards).

        Stored as JSONB in the tagschemas table.
    Condition-Input:
      properties:
        condition:
          anyOf:
            - $ref: '#/components/schemas/LogicCondition'
            - type: 'null'
        children:
          anyOf:
            - items:
                $ref: '#/components/schemas/Condition-Input'
              type: array
            - type: 'null'
          title: Children
        tag:
          anyOf:
            - $ref: '#/components/schemas/BaseTag'
            - type: 'null'
      type: object
      title: Condition
    LogicCondition:
      type: string
      enum:
        - AND
        - OR
      title: LogicCondition
    BaseTag:
      properties:
        name:
          type: string
          title: Name
        values:
          items:
            anyOf:
              - type: string
              - type: number
              - type: integer
          type: array
          title: Values
          default: []
        operator:
          anyOf:
            - type: string
            - type: 'null'
          title: Operator
          default: any
      type: object
      required:
        - name
      title: BaseTag
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    BearerAuth:
      type: http
      scheme: bearer
    UserIdAuth:
      type: apiKey
      in: header
      name: X-User-ID

````