Skip to main content
GET
/
v1
/
task
/
{task_id}
Python
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())
{
  "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
}

Path Parameters

task_id
string<uuid>
required

The ID of the task to retrieve UUID of the task to retrieve

Example:

"123e4567-e89b-12d3-a456-426614174002"

Query Parameters

include_transcript
boolean
default:false

Whether to include the call transcript in the response

include_all_calls
boolean
default:false

Whether to include all calls associated with the task. If false, only returns the most recent call.

Response

Task details retrieved successfully

id
string<uuid>

UUID of the task

Example:

"123e4567-e89b-12d3-a456-426614174002"

project_id
string<uuid>

UUID of the project this task belongs to

Example:

"123e4567-e89b-12d3-a456-426614174000"

patient_id
string<uuid>

UUID of the patient that this task is about

Example:

"123e4567-e89b-12d3-a456-426614174001"

status
enum<string>

The status of a task

Available options:
PENDING,
IN_PROGRESS,
COMPLETED,
FAILED,
CANCELLED
task_type
enum<string>

The type of task to be executed.

Note: tasks need to be enabled at the project level

Available options:
SCHEDULE_APPOINTMENT,
VERIFY_INSURANCE,
REIMBURSEMENT,
CUSTOM_TASK
task
string

Main task description with sufficient detail for the voice agent

Example:

"Schedule a follow-up appointment with Dr. Smith for next week"

task_outcome
string

Outcome or result of the task

Example:

"Appointment scheduled for March 22, 2024 at 2:30 PM"

created_at
string<date-time>

Timestamp when the task was created

updated_at
string<date-time>

Timestamp when the task was last updated

calls
object[]

List of calls associated with this task

has_more_calls
boolean

Whether there are more calls to fetch