---
title: "(Re)score a run's transcript with the judge"
method: POST
path: "/api/tests/{id}/score"
tags: ["Testing"]
---

# (Re)score a run's transcript with the judge

`POST /api/tests/{id}/score`

## Request

- Base URL: `https://api.wordis-bond.com`
- URL: `https://api.wordis-bond.com/api/tests/{id}/score`
- Auth: HTTP bearer

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `scenarioGoal` string
  - `assertions` string[]
  - `transcript` string: Overrides the run's stored transcript when supplied.

## Response `200`

Rescored run

- object
  - `data` TestRun, required
    - `id` string, uuid, required
    - `accountId` string, uuid
    - `suiteId` string, uuid, nullable
    - `status` 'queued' | 'running' | 'completed' | 'failed', required
    - `transport` string
    - `language` string
    - `persona` object, nullable
    - `targetAgent` TargetAgent: The voice agent under test (a system YOU control). `direct` = SIP/WebRTC (near-zero cost, all plans); `pstn` = a real carrier call (pro+). The hosted demo target is `{transport:"direct", peerId:"wb-demo-dental"}`.
      - `transport` 'pstn' | 'webrtc' | 'direct' | 'sip', required
      - `toNumber` string: E.164 number to dial (required for a pstn target).
      - `peerId` string: Hosted-agent id (e.g. "wb-demo-dental"), a direct peer label, or — for a `sip` target — the SIP URI.
      - `sipUri` string: For a `sip` target: the agent SIP URI (`sip:` / `sips:`).
    - `score` integer, nullable
    - `passed` boolean, nullable
    - `scorecard` Scorecard: The judged result. `score` is the 0–100 overall; `layers` carry per-dimension detail.
      - `score` number, required
      - `passed` boolean, required
      - `summary` string
      - `sentiment` number
      - `taskCompletion` number
      - `layers` object[]
        - `name` string
        - `score` number
        - `passed` boolean
        - `rationale` string
        - `assertions` object[]
    - `metrics` RunMetrics
      - `latencyMs` object
        - `p50` number
        - `p95` number
        - `max` number
      - `wer` number, nullable: Script-adherence error across pinned scenario wording, or null if nothing was pinned. This is not transcription word-error rate unless a caller supplies an STT reference transcript.
      - `bargeInCount` integer
      - `turnCount` integer
      - `taskCompletion` number
      - `sentiment` number
    - `transcript` string, nullable
    - `recordingUrl` string, nullable: BYOS recording pointer — a URL into YOUR OWN storage when the run recorded (never wordis-bond storage). Null unless the run opted in with `record: true`. See metrics.recording for the tee state (stored/truncated/failed).
    - `mediaWebSocketUrl` string: Only on a live `direct` run — the tokenized WS your agent-side harness dials.
    - `startedAt` string, date-time, nullable
    - `endedAt` string, date-time, nullable
    - `createdAt` string, date-time
  - `error` union, required
    - object
    - string

## Other responses

- `401`: Missing, invalid, or revoked credentials.
- `404`: The resource does not exist or is not owned by the tenant.
- `422`: The request body failed validation.

---

[API](https://skmtc.dev/wordis-bond/apis/word-is-bond-voice-agent-testing-api.md) · [All operations](https://skmtc.dev/wordis-bond/apis/word-is-bond-voice-agent-testing-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wordis-bond/apis/word-is-bond-voice-agent-testing-api/revisions/66c2d5480d84?raw)
