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())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);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'{
"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
}{
"detail": "Invalid task ID format"
}{
"detail": "Invalid API key"
}{
"detail": "Task not found"
}Get Task Progress
Get detailed information about a task, including its current status and progress.
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())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);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'{
"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
}{
"detail": "Invalid task ID format"
}{
"detail": "Invalid API key"
}{
"detail": "Task not found"
}Path Parameters
The ID of the task to retrieve UUID of the task to retrieve
"123e4567-e89b-12d3-a456-426614174002"
Query Parameters
Whether to include the call transcript in the response
Whether to include all calls associated with the task. If false, only returns the most recent call.
Response
Task details retrieved successfully
UUID of the task
"123e4567-e89b-12d3-a456-426614174002"
UUID of the project this task belongs to
"123e4567-e89b-12d3-a456-426614174000"
UUID of the patient that this task is about
"123e4567-e89b-12d3-a456-426614174001"
The status of a task
PENDING, IN_PROGRESS, COMPLETED, FAILED, CANCELLED The type of task to be executed.
Note: tasks need to be enabled at the project level
SCHEDULE_APPOINTMENT, VERIFY_INSURANCE, REIMBURSEMENT, CUSTOM_TASK Main task description with sufficient detail for the voice agent
"Schedule a follow-up appointment with Dr. Smith for next week"
Outcome or result of the task
"Appointment scheduled for March 22, 2024 at 2:30 PM"
Timestamp when the task was created
Timestamp when the task was last updated
List of calls associated with this task
Show child attributes
Show child attributes
Whether there are more calls to fetch