Operations
Operations

Evaluate call

Run the metric catalogue over a real call and persist the results. Reuses the call-metric engine (never recomputes in TS); deterministic metrics always run, and the LLM-judge metrics run too unless you pass judge=false (deterministic-only, no token cost). After this, get_call_metrics returns the persisted grid. Use it when a call has no metric results yet, or to re-score after fixing the agent. The call must have an analysable transcript.

POST
/operations/evaluate_call

Authorization

bearerAuth
AuthorizationBearer <token>

A personal access token from Settings > API tokens.

In: header

Header Parameters

Idempotency-Key?string

A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.

Length1 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/operations/evaluate_call" \  -H "Content-Type: application/json" \  -d '{    "sessionId": "string",    "agent": "string"  }'
{}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "errors": [
    {
      "path": "string",
      "message": "string"
    }
  ],
  "estimate": {},
  "retryAfterSeconds": 0
}

Enrol as partner POST

Enrol a workspace into the partner program and return its partner record (tier, payout method, enrolment date) plus the partner's single auto-generated referral link (referralLink.shareUrl) ready to share. Idempotent, re-enrolling returns the existing partner and its existing link. Referral codes are system-generated and globally unique; there is no custom/vanity code. A partner earns recurring commission on the actual paid usage of the customers they refer.

Export agent spec POST

Return the agent's config as one spec, in exactly the shape apply_agent_spec takes, listing only what differs from a new agent: name, description, systemPrompt, the three greetings, channels, the brief, voice and fallback voice, models, the call engine, speech, turn-taking, behaviour, keyterms, pronunciations, vocabulary, caller memory, guardrails, agent response guardrails, privacy and disclosure settings, call handling, the overflow number, the closed message, answering hours, closed early, caller routing, built-in and HTTP tools with their mocks in the agent's order (not the knowledge-search tool the first knowledge source adds, while it is unchanged), variables (a secret appears as {name, secret: true}; its value is never returned), workflow functions, post-call analysis, knowledge sources (text sources with their text) and test scenarios. Edit it and pass it back to apply_agent_spec with replace: true to make the draft match it. `secrets` says which secret variables hold a value.