Skip to content

API reference

Run voice test turn

voice.RunVoiceTestTurnWriteMember delegation

Submit a simulated caller's message to a voice test session. Returns the assistant's reply and a trace of the capabilities it would use.

POST/v1/operations/voice.RunVoiceTestTurn
On this page

Access & visibility

Allow voice.RunVoiceTestTurn on your API key.

Acting member required. Send Brigg-Act-As with an approved member account ID. The key supplies permissions; the member selects whose data is used.

The selected member must be active and approved by the credential. This selects whose private data is used; the credential supplies permissions. Private ownership and project boundaries still apply.

Set up authentication · Choose permissions

Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.

test_idstringRequired

Keep the returned test_id for this temporary session. Expired sessions require a new test. voice.StartVoiceTest.

At least 1 character.

utterancestringRequired

What the caller says.

At least 1 character.

historyarray of objectOptional

Earlier caller and assistant lines, oldest first. Omit or use [] for the first turn. Send accumulated conversation on later turns; the current utterance belongs only in utterance, not duplicated here.

Default: [].

Item fields
rolestringRequired

Conversation speaker: caller is the simulated customer; agent is the assistant. This is not a workspace permission or member role.

Allowed: "caller", "agent".

textstringRequired

The words spoken by this participant, in conversation order.

turn_idstringRequired

Client-chosen identifier unique to one logical turn within this test. Keep it and the HTTP idempotency key unchanged when retrying that same utterance/history; choose new values for the next turn.

At least 1 character.

Inspect a test turn

Send each new caller utterance with the prior conversation, and append the returned text as an agent line for the next turn. A typed test does not require the audio socket. Keep the same approved member throughout the session.

A trace entry currently includes capabilityId, source, label, kind, result and durationMs. These are optional diagnostics within an open JSON value, not stable fields to build business logic around. The result can report success, refusal, failure or uncertainty; inspect it instead of treating HTTP 200 or plausible reply text as success. Ignore unfamiliar diagnostic properties. The test simulates changes rather than performing the corresponding customer action, but model work can consume workspace credit.

Use Review voice test with the complete transcript for feedback. Its review can be empty when no feedback was generated; that is not proof of a flawless assistant. End the test when finished. An expired, unknown or differently owned test requires a fresh session.

Run a conversation test

Start a test for the intended inbox and retain its test_id. Text clients can use Run voice test turn; an audio connection URL is only needed for an audio client. Keep temporary connection URLs secret.

Pass the simulated caller's utterance and previous conversation history in order. Keep a stable turn_id for a retried turn. Review the returned reply and capability trace; a simulated response is not evidence that a real customer call succeeded. Review voice test accepts the conversation transcript for feedback. End the session when finished; an expired session needs a new start.

Response

Returns 200 OK with a JSON body.

textstringRequired

Assistant's reply to the current utterance. Display it and append it as an agent line to the next turn's history. Text alone does not prove a capability succeeded.

tracearray of JSON valueOptional

Ordered capability attempts for this turn, not a history of the whole test. [] means no capability was attempted. Entries are diagnostic JSON; the public contract does not fix their nested shape. See Inspect a test turn for how to read available diagnostics.

timingsRunVoiceTestTurnTimingsOptional

Server-side durations in milliseconds for this turn, not audio latency or client network time. These measurements are diagnostic, not a response-time guarantee.

RunVoiceTestTurnTimings
total_msnumberRequired

Elapsed duration of the turn-processing loop. May include overhead beyond the three component measurements.

decide_msnumberRequired

Time spent on the initial model decision before any capability execution.

execute_msnumberRequired

Total time spent executing or simulating the requested capabilities.

compose_msnumberRequired

Time spent on subsequent model calls after the initial decision, including follow-up decisions and composing a reply.

Errors & retries

Set BRIGG_REQUEST_ID once for each logical action. The samples send it as Idempotency-Key. Reuse the same value and body on retries, including after a timeout; a missing response does not prove the action failed.

For rate limits, follow the server’s retry guidance and back off. See HTTP errors and safe retries and limits.

HTTP status Code What to do
400 invalid_json Send a JSON object with Content-Type: application/json.
400 invalid_input Check the request fields and types. Supply a stable Idempotency-Key containing 1–200 characters.
401 invalid_key The workspace API key is missing, invalid or revoked.
403 forbidden Check the key’s operation and resource grants. Supply Brigg-Act-As with a member authorized by the key’s delegation grant. The selected member must be active and approved by the credential. This selects whose private data is used; the credential supplies permissions. Private ownership and project boundaries still apply.
404 not_found The requested operation or resource is not available to this credential.
429 rate_limited Wait for Retry-After before retrying. Reuse the original Idempotency-Key.
403 voice_test_expired The test expired, is unknown, or belongs to another member. Start a new test under the intended approved member.
409 voice_test_ended The test was closed. Start a new session instead of retrying this turn.

Next steps

Download OpenAPI · Versioning & retirement

JSON schemas

Use the complete schemas for validation or client generation.

Full request JSON schema
{
  "type": "object",
  "properties": {
    "test_id": {
      "type": "string",
      "minLength": 1,
      "description": "Keep the returned test_id for this temporary session. Expired sessions require a new test. [voice.StartVoiceTest](/developers/reference/voice/StartVoiceTest)."
    },
    "utterance": {
      "type": "string",
      "minLength": 1,
      "description": "What the caller says."
    },
    "history": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "caller",
              "agent"
            ],
            "description": "Conversation speaker: caller is the simulated customer; agent is the assistant. This is not a workspace permission or member role."
          },
          "text": {
            "type": "string",
            "description": "The words spoken by this participant, in conversation order."
          }
        },
        "required": [
          "role",
          "text"
        ],
        "additionalProperties": false
      },
      "default": [],
      "description": "Earlier caller and assistant lines, oldest first. Omit or use [] for the first turn. Send accumulated conversation on later turns; the current utterance belongs only in utterance, not duplicated here."
    },
    "turn_id": {
      "type": "string",
      "minLength": 1,
      "description": "Client-chosen identifier unique to one logical turn within this test. Keep it and the HTTP idempotency key unchanged when retrying that same utterance/history; choose new values for the next turn."
    }
  },
  "required": [
    "test_id",
    "utterance",
    "turn_id"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "test_id": "test_support_preview",
      "turn_id": "turn-1",
      "utterance": "I would like to book a meeting.",
      "history": []
    }
  ]
}
Full response JSON schema
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "description": "Assistant's reply to the current utterance. Display it and append it as an agent line to the next turn's history. Text alone does not prove a capability succeeded."
    },
    "trace": {
      "type": "array",
      "description": "Ordered capability attempts for this turn, not a history of the whole test. [] means no capability was attempted. Entries are diagnostic JSON; the public contract does not fix their nested shape. See Inspect a test turn for how to read available diagnostics."
    },
    "timings": {
      "description": "Server-side durations in milliseconds for this turn, not audio latency or client network time. These measurements are diagnostic, not a response-time guarantee.",
      "title": "RunVoiceTestTurnTimings",
      "type": "object",
      "properties": {
        "total_ms": {
          "type": "number",
          "description": "Elapsed duration of the turn-processing loop. May include overhead beyond the three component measurements."
        },
        "decide_ms": {
          "type": "number",
          "description": "Time spent on the initial model decision before any capability execution."
        },
        "execute_ms": {
          "type": "number",
          "description": "Total time spent executing or simulating the requested capabilities."
        },
        "compose_ms": {
          "type": "number",
          "description": "Time spent on subsequent model calls after the initial decision, including follow-up decisions and composing a reply."
        }
      },
      "required": [
        "total_ms",
        "decide_ms",
        "execute_ms",
        "compose_ms"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "text"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "text": "What day and time work best for you?",
      "trace": [],
      "timings": {
        "decide_ms": 430,
        "execute_ms": 0,
        "compose_ms": 0,
        "total_ms": 447
      }
    }
  ]
}

Search by operation name or what you want to build.

Use arrow keys to browse. Enter opens a result.