See how often a goal is reached

GET
/v1/agents/{id}/goal/summary

How often the agent reached its goal over a period, by channel (voice, or a channel id), with what the conversations cost and what scoring cost. rate is met over scored. Test conversations are counted apart in test and never in the rate. refused and notScored say why subjects have no verdict, by reason code. Aggregates only: no transcript is returned.

Requires an API key with the workspace:read scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Path Parameters

id*string

The agent id.

Query Parameters

since?string

Start of the period, an ISO timestamp. Default: 30 days ago.

Formatdate-time
until?string

End of the period, an ISO timestamp. Default: now.

Formatdate-time

Response Body

Rates and costs by channel; aggregates only

application/json
  1. response
agentId*string
Formatuuid
since*string
Formatdate-time
until*string
Formatdate-time
byChannel*array<>
total*
scoringCostUsd*number
test*
refused*
notScored*
sampleRate*number
sharedConversations*integer
journeys?|null
Example Request
curl "https://api.vlayers.ai/v1/agents/$AGENT_ID/goal/summary" \  -H "Authorization: Bearer $VOICELAYER_API_KEY"
Example Response
{  "agentId": "0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78",  "since": "2026-10-20T15:04:05.000Z",  "until": "2026-10-20T15:04:05.000Z",  "byChannel": [    {      "channel": "voice",      "scored": 40,      "met": 31,      "rate": 0.775,      "conversationCostUsd": 3.2,      "costPerConversationUsd": 0.08,      "costPerMetUsd": 0.1032    }  ],  "total": {    "channel": "voice",    "scored": 40,    "met": 31,    "rate": 0.775,    "conversationCostUsd": 3.2,    "costPerConversationUsd": 0.08,    "costPerMetUsd": 0.1032  },  "scoringCostUsd": 0.0042,  "test": {    "channel": "voice",    "scored": 0,    "met": 0,    "rate": null,    "conversationCostUsd": 0,    "costPerConversationUsd": null,    "costPerMetUsd": null  },  "refused": {},  "notScored": {    "share_link_not_scored": 1  },  "sampleRate": 1,  "sharedConversations": 1}