# Create an evaluation for a single call
response = client.evaluation.createJob(
# You can find the evaluator slug from the Evaluators section on the dashboard
# Or you can use 'all' to evaluate with all available evaluators.
#
# Evaluators to evaluate the call
# Usage examples:
# - Specific evaluators: ['evaluator-slug-1', 'evaluator-slug-2']
# - All evaluators: 'all'
evaluators=['evaluator-slug-1', 'evaluator-slug-2'],
call={
"recording_url": "https://example.com/recording.wav",
"started_at": "2025-03-02T05:08:35.885Z",
"call_direction": "INBOUND",
"interface_type": "PHONE",
"participants": [
{"role": "AGENT", "spoke_first": True, "name": "John Doe", "phone_number": "123456789"},
{"role": "CUSTOMER", "name": "Jane Doe", "phone_number": "123456789"},
],
# Custom metadata and properties
"properties": {
"business_name": "customer-busines-name",
"business_id": "customer-business-id"
},
"tool_invocations": [
{
"name": "book_appointment",
"description": "Book an appointment",
"start_offset_ms": 7000,
"parameters": {
# Parameters are submitted as key-value pairs
"patient_name": "John Doe",
"patient_phone": "+1234567890",
"appointment_type": {
# Parameter values can alternatively be objects which include the value and an optional description and type
"value": "cleaning",
"description": "Type of dental appointment",
"type": "string",
}
},
# Result can be a string or an object
"result": "success",
}
],
}
)
print(response.data)