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

# Get task by ID

> Returns a single task by ID.



## OpenAPI

````yaml /openapi-v2.json get /tasks/{id}
openapi: 3.0.0
info:
  title: Max AI Public API
  description: API for third-party marketplace apps
  version: '2.0'
  contact: {}
servers:
  - url: https://api.maxcare.ai/v2
security: []
tags: []
paths:
  /tasks/{id}:
    get:
      tags:
        - Tasks
      summary: Get task by ID
      description: Returns a single task by ID.
      operationId: TasksPublicController_getTask
      parameters:
        - name: id
          required: true
          in: path
          description: Task ID
          schema:
            type: string
        - name: X-Organization-Id
          in: header
          required: true
          schema:
            type: string
          description: Target clinic organization ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTaskSuccessResponse'
        '400':
          description: Missing or invalid request parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiBadRequestResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiUnauthorizedResponse'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiForbiddenResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiNotFoundResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRateLimitResponse'
      security:
        - api-key: []
components:
  schemas:
    GetTaskSuccessResponse:
      type: object
      properties:
        code:
          type: string
          description: Response code
          example: success
        data:
          $ref: '#/components/schemas/ExternalTaskResponse'
      required:
        - code
        - data
    PublicApiBadRequestResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: bad_request
        message:
          type: string
          description: Human-readable error message
          example: '''id'' must be a valid UUID'
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiUnauthorizedResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: unauthorized
        message:
          type: string
          description: Human-readable error message
          example: Invalid or missing API key
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiForbiddenResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: forbidden
        message:
          type: string
          description: Human-readable error message
          example: Insufficient scope
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiNotFoundResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: not_found
        message:
          type: string
          description: Human-readable error message
          example: Resource not found
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiRateLimitResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message
          example: Rate limit exceeded. Maximum 1000 requests per 60 seconds.
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    ExternalTaskResponse:
      type: object
      properties:
        id:
          type: string
          description: Task unique identifier
          example: a1b2c3d4-5678-4abc-9def-0123456789ab
        status:
          type: string
          description: Task status
          example: not_started
          enum:
            - new
            - not_started
            - in_progress
            - completed
            - cancelled
            - deleted
        syncStatus:
          type: string
          description: EHR sync status
          example: synced
          enum:
            - pending
            - syncing
            - synced
            - failed
        notes:
          type: string
          description: Task description / notes
          example: 'Review missing plan for Impression #3'
        noteId:
          type: string
          description: >-
            Note (visit) ID the task is anchored to. Absent for tasks anchored
            to a non-visit entity.
          example: 3cc73cb6-9c59-403c-a910-8af6c5693b25
        ehrType:
          type: string
          description: EHR type
          example: modmed
          enum:
            - modmed
            - ezderm
        assignedProviders:
          description: Assigned providers
          type: array
          items:
            $ref: '#/components/schemas/ExternalTaskAssignedProvider'
        createdAt:
          type: string
          description: Created timestamp
          example: '2026-03-20 18:35:10.209452+00'
        updatedAt:
          type: string
          description: Last updated timestamp
          example: '2026-03-23 03:15:47.285+00'
      required:
        - id
        - status
        - syncStatus
        - notes
        - ehrType
        - assignedProviders
        - createdAt
        - updatedAt
    ExternalTaskAssignedProvider:
      type: object
      properties:
        id:
          type: string
          description: Provider unique identifier
          example: d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a
        firstName:
          type: string
          description: First name
          nullable: true
          example: James
        lastName:
          type: string
          description: Last name
          nullable: true
          example: Wilson
        displayFirstName:
          type: string
          description: Display first name
          nullable: true
          example: Dr. James
        displayLastName:
          type: string
          description: Display last name
          nullable: true
          example: Wilson, MD
        username:
          type: string
          description: EHR username
          nullable: true
          example: jwilson
        roles:
          description: Provider roles
          example:
            - Physician
          type: array
          items:
            type: string
        individualNpi:
          type: string
          description: Individual NPI number
          nullable: true
          example: '1234567890'
        canFinalize:
          type: boolean
          description: Whether the provider can finalize (bill-under) notes
          example: true
        canCosign:
          type: boolean
          description: Whether the provider can cosign other providers' notes
          example: false
      required:
        - id
        - firstName
        - lastName
        - displayFirstName
        - displayLastName
        - username
        - roles
        - individualNpi
        - canFinalize
        - canCosign
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Marketplace API key

````