The PersonaEvals REST API manages individual persona evaluation configurations. Define evaluation criteria, message validation, and assessment parameters for comprehensive persona performance testing.
Base URL: https://your-api-name.mercury.ratiomachina.com Authentication: x-mercury-api-key: YOUR_API_KEY (Note: Not validated for persona-eval endpoints)
personaExternalId - Filter by persona external ID (optional){
"personaEvals": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Service Tone Check",
"personaExternalId": "agent456",
"contactData": {"name": "Test Customer", "email": "test@example.com"},
"conversationData": {"channel": "SMS", "context": "support"},
"messageHistory": [
{"sender": "contact", "message": "I need help", "timestamp": "2024-01-15T10:35:00Z"}
],
"criteria": {
"message": {
"operator": "contains",
"value": "thank you"
}
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
]
}{
"name": "Customer Service Tone Check",
"personaExternalId": "agent456",
"criteria": {
"message": {
"operator": "contains",
"value": "thank you"
}
},
"contactData": {
"name": "Test Customer",
"email": "test@example.com"
},
"conversationData": {
"channel": "SMS",
"context": "support"
},
"messageHistory": [
{
"sender": "contact",
"message": "I need help with my order",
"timestamp": "2024-01-15T10:35:00Z"
}
]
}{
"personaEval": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Service Tone Check",
"personaExternalId": "agent456",
"contactData": "{\"name\":\"Test Customer\"}",
"conversationData": "{\"channel\":\"SMS\"}",
"messageHistory": "[{\"sender\":\"contact\",\"message\":\"I need help\"}]",
"criteria": "{\"message\":{\"operator\":\"contains\",\"value\":\"thank you\"}}",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}id - Persona evaluation UUID{
"personaEval": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Service Tone Check",
"personaExternalId": "agent456",
"contactData": "{\"name\":\"Test Customer\"}",
"conversationData": "{\"channel\":\"SMS\"}",
"messageHistory": "[{\"sender\":\"contact\",\"message\":\"I need help\"}]",
"criteria": "{\"message\":{\"operator\":\"contains\",\"value\":\"thank you\"}}",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}{
"name": "Updated Tone Check",
"criteria": {
"message": {
"operator": "contains",
"value": "please"
}
}
}{
"personaEval": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Updated Tone Check",
"personaExternalId": "agent456",
"contactData": "{\"name\":\"Test Customer\"}",
"conversationData": "{\"channel\":\"SMS\"}",
"messageHistory": "[{\"sender\":\"contact\",\"message\":\"I need help\"}]",
"criteria": "{\"message\":{\"operator\":\"contains\",\"value\":\"please\"}}",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T11:45:00Z"
}
}⚠️ Warning: This will permanently delete the persona evaluation.
id - Persona evaluation UUID{
"message": "Persona evaluation deleted successfully",
"deletedPersonaEval": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Service Tone Check",
"personaExternalId": "agent456"
}
}⚠️ Warning: This will permanently delete multiple persona evaluations.
{
"ids": [
"123e4567-e89b-12d3-a456-426614174000",
"456e7890-e89b-12d3-a456-426614174001"
]
}{
"message": "Persona evaluations deleted successfully",
"deletedCount": 2,
"deletedPersonaEvals": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Customer Service Tone Check"
}
]
}