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

# Get Task Progress

> Get detailed information about a task, including its current status and progress.



## OpenAPI

````yaml GET /v1/task/{task_id}
openapi: 3.1.0
info:
  title: Mira API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/task/{task_id}:
    get:
      summary: Get task details
      description: >-
        Get detailed information about a task, including its current status and
        progress.
      operationId: get_task
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: UUID of the task to retrieve
            example: 123e4567-e89b-12d3-a456-426614174002
          description: The ID of the task to retrieve
        - name: include_transcript
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: Whether to include the call transcript in the response
        - name: include_all_calls
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: >-
            Whether to include all calls associated with the task. If false,
            only returns the most recent call.
      responses:
        '200':
          description: Task details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
              example:
                id: 123e4567-e89b-12d3-a456-426614174002
                project_id: 123e4567-e89b-12d3-a456-426614174000
                patient_id: 123e4567-e89b-12d3-a456-426614174001
                status: IN_PROGRESS
                task_type: SCHEDULE_APPOINTMENT
                task: Schedule a follow-up appointment with Dr. Smith for next week
                task_outcome: Appointment scheduled for March 22, 2024 at 2:30 PM
                created_at: '2024-03-15T10:30:00Z'
                updated_at: '2024-03-15T10:35:00Z'
                calls:
                  - id: 123e4567-e89b-12d3-a456-426614174003
                    project_id: 123e4567-e89b-12d3-a456-426614174000
                    patient_id: 123e4567-e89b-12d3-a456-426614174001
                    status: SUCCESS
                    call_outcome: Appointment scheduled for March 22, 2024 at 2:30 PM
                    created_at: '2024-03-15T10:30:00Z'
                    updated_at: '2024-03-15T10:35:00Z'
                    recording_url: >-
                      https://api.miramace.com/v1/call/123e4567-e89b-12d3-a456-426614174003/recording
                    transcripts:
                      - role: assistant
                        content: >-
                          Hello, I'm calling to schedule a follow-up appointment
                          with Dr. Smith.
                      - role: user
                        content: Yes, I'd like to schedule that.
                has_more_calls: false
        '400':
          description: Bad request - invalid task ID format
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Invalid task ID format
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Invalid API key
        '404':
          description: Task not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Task not found
      x-codeSamples:
        - lang: Python
          source: >-
            import requests


            url =
            'https://api.miramace.com/v1/task/ffaa02bc-eed2-49ae-aa34-34b3c3ce551d'

            headers = {
                'Authorization': 'Bearer YOUR_API_KEY',
                'Content-Type': 'application/json'
            }


            # Optional query parameters

            params = {
                'include_transcript': True,
                'include_all_calls': False
            }


            response = requests.get(url, headers=headers, params=params)

            print(response.json())
        - lang: JavaScript
          source: >-
            const response = await
            fetch('https://api.miramace.com/v1/task/ffaa02bc-eed2-49ae-aa34-34b3c3ce551d?include_transcript=true&include_all_calls=false',
            {
              headers: {
                'Authorization': 'Bearer YOUR_API_KEY',
                'Content-Type': 'application/json'
              }
            });


            const data = await response.json();

            console.log(data);
        - lang: cURL
          source: |-
            curl --request GET \
              --url 'https://api.miramace.com/v1/task/ffaa02bc-eed2-49ae-aa34-34b3c3ce551d?include_transcript=true&include_all_calls=false' \
              --header 'Authorization: Bearer YOUR_API_KEY' \
              --header 'Content-Type: application/json'
components:
  schemas:
    TaskResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the task
          example: 123e4567-e89b-12d3-a456-426614174002
        project_id:
          type: string
          format: uuid
          description: UUID of the project this task belongs to
          example: 123e4567-e89b-12d3-a456-426614174000
        patient_id:
          type: string
          format: uuid
          description: UUID of the patient that this task is about
          example: 123e4567-e89b-12d3-a456-426614174001
        status:
          $ref: '#/components/schemas/TaskStatus'
        task_type:
          $ref: '#/components/schemas/TaskType'
        task:
          type: string
          description: Main task description with sufficient detail for the voice agent
          example: Schedule a follow-up appointment with Dr. Smith for next week
        task_outcome:
          type: string
          description: Outcome or result of the task
          example: Appointment scheduled for March 22, 2024 at 2:30 PM
        created_at:
          type: string
          format: date-time
          description: Timestamp when the task was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the task was last updated
        calls:
          type: array
          description: List of calls associated with this task
          items:
            $ref: '#/components/schemas/CallResponse'
        has_more_calls:
          type: boolean
          description: Whether there are more calls to fetch
    TaskStatus:
      type: string
      enum:
        - PENDING
        - IN_PROGRESS
        - COMPLETED
        - FAILED
        - CANCELLED
      description: The status of a task
    TaskType:
      type: string
      enum:
        - SCHEDULE_APPOINTMENT
        - VERIFY_INSURANCE
        - REIMBURSEMENT
        - CUSTOM_TASK
      description: |-
        The type of task to be executed. 
         
         Note: tasks need to be enabled at the project level
    CallResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the call
          example: 123e4567-e89b-12d3-a456-426614174003
        project_id:
          type: string
          format: uuid
          description: ID of the project this call belongs to
          example: 123e4567-e89b-12d3-a456-426614174000
        patient_id:
          type: string
          format: uuid
          description: ID of the patient that this call is about
          example: 123e4567-e89b-12d3-a456-426614174001
        status:
          $ref: '#/components/schemas/CallStatus'
        call_outcome:
          type: string
          description: Outcome or result of the call
        created_at:
          type: string
          format: date-time
          description: Timestamp when the call was created
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the call was last updated
        recording_url:
          type: string
          format: uri
          nullable: true
          description: Presigned URL for the call recording (when requested)
        transcripts:
          type: array
          items:
            $ref: '#/components/schemas/TranscriptMessage'
          nullable: true
          description: Ordered sequence of messages in the call (when requested)
    CallStatus:
      type: string
      enum:
        - CREATED
        - SUCCESS
        - FAILED
        - IN_PROGRESS
        - ENDED
      description: The status of a call
    TranscriptMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - assistant
            - user
          description: The role of the speaker
        content:
          type: string
          description: The text spoken

````