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

# Complete Task

> Mark a task as completed.



## OpenAPI

````yaml post /task/{task_id}/complete
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /task/{task_id}/complete:
    post:
      tags:
        - Tasks
      summary: Complete Task
      description: Mark a task as completed.
      operationId: complete_task_task__task_id__complete_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskSummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TaskSummary:
      properties:
        id:
          type: string
          title: Id
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        status:
          $ref: '#/components/schemas/TaskStatus'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        startDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Startdate
        dueDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Duedate
        patientId:
          anyOf:
            - type: string
            - type: 'null'
          title: Patientid
        opportunityId:
          anyOf:
            - type: string
            - type: 'null'
          title: Opportunityid
        assigneeId:
          anyOf:
            - type: string
            - type: 'null'
          title: Assigneeid
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
        locationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Locationid
        targetNoteId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetnoteid
        targetFaxId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetfaxid
        targetDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetdocumentid
        creatorId:
          type: string
          title: Creatorid
        completedById:
          anyOf:
            - type: string
            - type: 'null'
          title: Completedbyid
        completedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completeddate
        createdDate:
          type: string
          format: date-time
          title: Createddate
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
        patient:
          anyOf:
            - $ref: '#/components/schemas/PatientRef'
            - type: 'null'
        assignee:
          anyOf:
            - $ref: '#/components/schemas/ProviderTiny'
            - type: 'null'
        team:
          anyOf:
            - $ref: '#/components/schemas/TeamRef'
            - type: 'null'
        creator:
          anyOf:
            - $ref: '#/components/schemas/ProviderTiny'
            - type: 'null'
        carePlan:
          anyOf:
            - $ref: '#/components/schemas/CarePlanStepTiny'
            - type: 'null'
      type: object
      required:
        - id
        - title
        - status
        - priority
        - creatorId
        - createdDate
      title: TaskSummary
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskStatus:
      type: string
      enum:
        - OPEN
        - IN_PROGRESS
        - COMPLETED
        - CANCELLED
      title: TaskStatus
    TaskPriority:
      type: string
      enum:
        - URGENT
        - HIGH
        - NORMAL
        - LOW
      title: TaskPriority
    PatientRef:
      properties:
        id:
          type: string
          title: Id
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
      type: object
      required:
        - id
      title: PatientRef
      description: Minimal patient reference for task display (id and name only).
    ProviderTiny:
      properties:
        id:
          type: string
          title: Id
        firstName:
          type: string
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
      type: object
      required:
        - id
        - firstName
      title: ProviderTiny
    TeamRef:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: TeamRef
      description: Minimal team reference for task display.
    CarePlanStepTiny:
      properties:
        carePlanId:
          type: string
          title: Careplanid
        stepNumber:
          type: integer
          title: Stepnumber
        carePlanName:
          type: string
          title: Careplanname
        status:
          type: string
          title: Status
      type: object
      required:
        - carePlanId
        - stepNumber
        - carePlanName
        - status
      title: CarePlanStepTiny
      description: Minimal care-plan step reference for task/event display.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````