Update Evaluator API

Update an existing evaluator’s configurations.

API Endpoint

MethodEndpoint
PATCHhttps://new-prod.vocera.ai/test_framework/v1/scenarios-external/:scenario-id/

Authentication

Include your API key in the request headers:

HeaderDescription
X-VOCERA-API-KEYYour API key obtained from the dashboard

URL Parameters

ParameterTypeRequiredDescription
scenario-idintegerYesThe ID of the evaluator to update

Request Parameters

ParameterTypeRequiredDescription
namestringNoName of the evaluator
agentintegerNoID of the agent
personalityintegerNoID of the personality to use
instructionsstringNoInstructions for the evaluator
metricsarray|integer|stringNoMetrics to set to scenario, can be array of metric IDs or first N metrics or “all” to add all or “predefined” to add all predefined
tagsarrayNoArray of tag strings
inbound_phone_numberintegerNoID of inbound phone number
first_messagestringNoInitial message for the conversation
expected_outcome_promptstringNoPrompt to evaluate expected outcome

Example Request Body

{
  "name": "Customer Service Evaluation - Angry Customer",
  "agent": 123,
  "personality": 456,
  "instructions": "Act as an angry customer who received a defective product. Be persistent but not abusive.",
  "metrics": [789, 790, 791],
  "tags": ["angry_customer", "product_complaint", "high_priority"],
  "inbound_phone_number": 555,
  "first_message": "I need to speak with someone about this broken laptop I received!",
  "expected_outcome_prompt": "Issue was resolved with a refund or replacement"
}

Response Format

The API returns detailed information about the updated evaluator.

Response Fields

FieldTypeDescription
idintegerUnique identifier for the evaluator
namestringName of the evaluator
agentintegerID of the associated agent
personalityintegerID of the personality used
personality_namestringName of the personality
tagsarrayList of tags associated with the evaluator
runsarrayList of evaluator run IDs
metricsarrayList of metric IDs
metric_namesarrayList of human-readable metric names
first_messagestringInitial message for the conversation
inbound_phone_numberinteger|nullID of the inbound phone number (See inbound numbers)
inbound_phone_number_dataobject|nullDetails about the inbound phone number (see below)
instructionsstringEvaluator instructions
expected_outcome_promptstringPrompt to evaluate expected outcome

Inbound Phone Number Data Fields

FieldTypeDescription
idintegerInternal ID of the phone number record
numberstringThe phone number in E.164 format
phone_number_idstringExternal reference ID for the phone number

Example Response

{
    "id": 15,
    "name": "Customer Service Evaluation - Angry Customer",
    "agent": 123,
    "personality": 456,
    "personality_name": "Frustrated Customer Persona",
    "tags": ["angry_customer", "product_complaint", "high_priority"],
    "runs": [501, 502, 503],
    "metrics": [789, 790, 791],
    "metric_names": [
        "Customer Satisfaction Score",
        "Resolution Time",
        "Agent Empathy Rating"
    ],
    "first_message": "I need to speak with someone about this broken laptop I received!",
    "inbound_phone_number": 2,
    "inbound_phone_number_data": {
        "id": 2,
        "number": "+1234567890",
        "phone_number_id": "123"
    },
    "instructions": "Act as an angry customer who received a defective product. Be persistent but not abusive.",
    "expected_outcome_prompt": "Issue was resolved with a refund or replacement"
}

Code Examples

curl -X PATCH https://new-prod.vocera.ai/test_framework/v1/scenarios-external/{scenario_id}/ \
  -H "X-VOCERA-API-KEY: <your-api-key-here>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Service Evaluation - Angry Customer",
    "agent": 123,
    "personality": 456,
    "instructions": "Act as an angry customer who received a defective product. Be persistent but not abusive.",
    "metrics": [789, 790, 791],
    "tags": ["angry_customer", "product_complaint", "high_priority"],
    "expected_outcome_prompt": "Issue was resolved with a refund or replacement"
  }'