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

# Update Task Completed

> Update Task Completed



## OpenAPI

````yaml /api-reference/contacts/openapi.json put /contacts/{contactId}/tasks/{taskId}/completed
openapi: 3.0.0
info:
  title: Contacts API
  description: Documentation for Contacts API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: Contacts
    description: Documentation for Contacts API
  - name: Tasks
    description: Documentation for Contacts API
  - name: Appointments
    description: Documentation for Contacts API
  - name: Tags
    description: Documentation for Contacts API
  - name: Notes
    description: Documentation for Contacts API
  - name: Campaigns
    description: Documentation for Contacts API
  - name: Workflow
    description: Documentation for Contacts API
  - name: Bulk
    description: Documentation for Contacts API
  - name: Search
    description: Documentation for Contacts API
  - name: Followers
    description: Documentation for Contacts API
paths:
  /contacts/{contactId}/tasks/{taskId}/completed:
    put:
      tags:
        - Tasks
      summary: Update Task Completed
      description: Update Task Completed
      operationId: update-task-completed
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-07-28'
        - name: contactId
          required: true
          in: path
          description: Contact Id
          schema:
            example: sx6wyHhbFdRXh302LLNR
            type: string
        - name: taskId
          required: true
          in: path
          description: Task Id
          schema:
            type: string
            example: ocQHyuzHvysMo5N5VsXc
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskStatusParams'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskByIsSuccessfulResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - bearer:
            - contacts.write
components:
  schemas:
    UpdateTaskStatusParams:
      type: object
      properties:
        completed:
          type: boolean
          example: true
      required:
        - completed
    TaskByIsSuccessfulResponseDto:
      type: object
      properties:
        task:
          $ref: '#/components/schemas/TaskSchema'
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          type: array
          items:
            type: string
          example:
            - Unprocessable Entity
        error:
          type: string
          example: Unprocessable Entity
      required:
        - statusCode
        - message
        - error
    TaskSchema:
      type: object
      properties:
        id:
          type: string
          example: lJpzYrWdpkC2hX6t2yue
        title:
          type: string
          example: test
        body:
          type: string
          example: testing
        assignedTo:
          type: string
          example: tesTUcmRxWrjqzJS8EjkxNKting
        dueDate:
          type: string
          example: '2021-07-08T02:30:00.000Z'
        completed:
          type: boolean
          example: true
        contactId:
          type: string
          example: lJpzYrWdpkC2hX6t2yue
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Use the Access Token generated with user type as Sub-Account (OR)
        Private Integration Token of Sub-Account.
      type: http

````