> ## 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.

# Update a task type

> Updates a task type. Only fields included in the body are modified.

<Accordion title="Required scope">
`tasks:write`
</Accordion>



## OpenAPI

````yaml /en/api-reference/openapi.json patch /v1/task-types/{id}
openapi: 3.1.0
info:
  title: OAuth 2.1
  description: Endpoints for registering applications and managing OAuth 2.1 tokens.
  version: 1.0.0
  contact:
    name: Vendaze Support
    email: suporte@vendaze.com
servers:
  - url: https://api.vendaze.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: OAuth
  - name: People
  - name: Companies
  - name: Deals
  - name: Tasks
  - name: Task Types
  - name: Tags
  - name: Lists
paths:
  /v1/task-types/{id}:
    patch:
      tags:
        - Task Types
      summary: Update a task type
      description: |-
        Updates a task type. Only fields included in the body are modified.

        <Accordion title="Required scope">
        `tasks:write`
        </Accordion>
      operationId: updateTaskType
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskTypeRequest'
      responses:
        '200':
          description: Task type updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskTypeResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: UUID of the resource.
  schemas:
    UpdateTaskTypeRequest:
      type: object
      description: All fields are optional. Only fields included in the body are modified.
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 40
          description: New display name.
          example: Phone Call
        color:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          description: New display color in hex RGB format.
          example: '#10b981'
        key:
          type: string
          minLength: 1
          maxLength: 40
          pattern: ^[a-z0-9]+(_[a-z0-9]+)*$
          description: New identifier key. Lowercase letters, digits, and underscores only.
          example: phone_call
    TaskTypeResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TaskType'
    TaskType:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the task type.
        title:
          type: string
          maxLength: 40
          example: Call
          description: Display name of the task type.
        color:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
          description: Display color in hex RGB format.
          example: '#463dfb'
        key:
          type: string
          nullable: true
          maxLength: 40
          description: >-
            Identifier key for the task type. Unique within the workspace. Used
            in the `type` field when creating or updating tasks.
          example: call
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: not_found
            message:
              type: string
              example: List not found.
            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: >-
        Malformed request body or empty update. Error code: `bad_request`.
        Possible messages: `"Request body must be valid JSON."` or `"No fields
        provided for update."`
      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 missing, invalid, or expired. Possible error codes:
        `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 lacks the required scope. Error code: `insufficient_scope`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: insufficient_scope
              message: This endpoint requires the 'people:write' scope.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    NotFound:
      description: >-
        List not found, soft-deleted, or belongs to another workspace. Error
        code: `not_found`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: List not found.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Conflict:
      description: >-
        A tag with the same `key` already exists in this workspace. Error code:
        `conflict`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: conflict
              message: A record with this value already exists.
              fields:
                key: Value already in use.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    ValidationError:
      description: 'Input validation failed. Error code: `validation_error`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
          example:
            error:
              code: validation_error
              message: Validation failed.
              fields:
                name: String must contain at most 50 character(s).
              request_id: 550e8400-e29b-41d4-a716-446655440000
    RateLimitExceeded:
      description: 'Rate limit exceeded. Error code: `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: 'Unexpected server error. Error code: `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: OAuth 2.1 access token.

````