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

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

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



## OpenAPI

````yaml /en/api-reference/openapi.json patch /v1/tasks/{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: Pipelines
  - name: Tasks
  - name: Task Types
  - name: Products
  - name: Tags
  - name: Lists
  - name: Custom Fields
  - name: Webhooks
paths:
  /v1/tasks/{id}:
    patch:
      tags:
        - Tasks
      summary: Update a task
      description: |-
        Updates a task. Only the fields sent in the body are modified.

        <Accordion title="Required scope">
        `tasks:write`
        </Accordion>
      operationId: updateTask
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskRequest'
      responses:
        '200':
          description: Task updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '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:
    id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: UUID of the resource.
  schemas:
    UpdateTaskRequest:
      type: object
      description: >-
        All fields are optional. Only fields included in the body are modified.
        Send `null` to clear a field.
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 200
          description: New task title.
          example: Follow up with prospect.
        due_date:
          type: string
          format: date-time
          description: New due date in ISO 8601 UTC.
          example: '2026-06-20T14:00:00Z'
        notes:
          type: string
          nullable: true
          maxLength: 3000
          description: New notes. Send `null` to clear.
          example: Contract ready, awaiting signature.
        type:
          type: string
          nullable: true
          description: >-
            Task type `id` (UUID) or `key` (string). Send `null` to remove the
            type. The API resolves it to the internal type ID.
          example: meeting
        person_id:
          type: string
          format: uuid
          nullable: true
          description: New person UUID. Send `null` to remove.
        company_id:
          type: string
          format: uuid
          nullable: true
          description: New company UUID. Send `null` to remove.
        deal_id:
          type: string
          format: uuid
          nullable: true
          description: New deal UUID. Send `null` to remove.
        owner_email:
          type: string
          format: email
          nullable: true
          description: Email of the new owner. Send `null` to remove the owner.
          example: jane@company.com
        priority:
          type: string
          enum:
            - high
            - medium
            - low
          nullable: true
          description: New priority. Send `null` to clear.
          example: medium
        completed:
          type: boolean
          description: Mark the task as completed or not.
          example: true
    TaskResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/TaskWithEmbedded'
    TaskWithEmbedded:
      type: object
      description: >-
        Task object returned by POST and PATCH. Includes full embedded objects
        for person, company, and deal instead of plain IDs.
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
          maxLength: 200
          example: Follow up with prospect
        notes:
          type: string
          nullable: true
          maxLength: 3000
        due_date:
          type: string
          format: date-time
        type:
          $ref: '#/components/schemas/TaskType'
        person:
          $ref: '#/components/schemas/PersonEmbedded'
        company:
          $ref: '#/components/schemas/CompanyEmbedded'
        deal:
          $ref: '#/components/schemas/DealEmbedded'
        owner:
          $ref: '#/components/schemas/Owner'
        priority:
          type: string
          nullable: true
          enum:
            - high
            - medium
            - low
        completed:
          type: boolean
        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
            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
    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
    PersonEmbedded:
      type: object
      nullable: true
      description: Person associated with the task. `null` when no person is assigned.
      properties:
        id:
          type: string
          format: uuid
        full_name:
          type: string
          example: Jane Doe
        emails:
          type: array
          nullable: true
          items:
            type: object
            properties:
              email:
                type: string
              type:
                type: string
        phones:
          type: array
          nullable: true
          items:
            type: object
            properties:
              phone:
                type: string
              type:
                type: string
        ranking:
          type: number
        position:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    CompanyEmbedded:
      type: object
      nullable: true
      description: Company associated with the task. `null` when no company is assigned.
      properties:
        id:
          type: string
          format: uuid
        full_name:
          type: string
          example: Acme Corp
        emails:
          type: array
          nullable: true
          items:
            type: object
            properties:
              email:
                type: string
              type:
                type: string
        phones:
          type: array
          nullable: true
          items:
            type: object
            properties:
              phone:
                type: string
              type:
                type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    DealEmbedded:
      type: object
      nullable: true
      description: >-
        Deal associated with the task. `null` when no deal is assigned. Value
        fields follow the same format as `GET /v1/deals`.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Enterprise Plan Q3
        amount:
          type: integer
          description: Deal value in cents.
          example: 250000
        currency:
          type: string
          description: ISO 4217 currency code.
          example: BRL
        formatted_amount:
          type: string
          nullable: true
          description: Deal value formatted using the currency's symbol and separators.
          example: R$ 2.500,00
        pipeline:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
        stage:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            type:
              type: string
              enum:
                - open
                - win
                - lost
        source:
          type: string
        forecast_date:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Owner:
      type: object
      nullable: true
      description: >-
        Workspace member responsible for this task. `null` when no owner is
        assigned.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: John Smith
        email:
          type: string
          format: email
          example: john@company.com
  responses:
    BadRequest:
      description: 'Malformed request body or empty update. Error code: `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 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 'webhooks:read' scope.
              request_id: 550e8400-e29b-41d4-a716-446655440000
    NotFound:
      description: >-
        Webhook not found or belongs to another integration. Error code:
        `not_found`. Message: `"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: >-
        Input validation failed. Error code: `validation_error`. The `fields`
        object maps each invalid field to a description of the problem.
      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 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.

````