---
title: "Test a receptionist"
description: "Trillet Partner API: Calls an existing receptionist with test callers and judges each call."
openapi: /public/openapi/trillet-oem.yaml POST /partner/v1/tenants/{tenantId}/receptionist/test-runs
lastUpdated: "2026-11-29"
---

> **For AI agents:** the complete documentation index is at [llms.txt](https://docs.trillet.ai/llms.txt). Append `.md` to any page URL for its markdown version.

`POST https://api.trillet.ai/partner/v1/tenants/{tenantId}/receptionist/test-runs`

Calls the receptionist's front door with about ten made-up test callers, the same way its
build did, and judges each call. Use it after changing a prompt, the knowledge base or the
hours. A test run reports only: it fixes nothing and does not change the receptionist's
`status`. The result is on the job, the full report at `GET /jobs/{jobId}/test-report`,
and the latest run on the receptionist as `lastTestRun`. The test calls are not billed.
Needs `resources:write`.

## Authentication

- `partnerKey` — http bearer (tpk_live_...)

## Header parameters

- `Idempotency-Key` (string) — Optional. Works as on the endpoints that require it.

## Request body

- Content type: `application/json`
  - request body (object)
    - `passRate` (number) — The pass mark for `meetsPassRate`. Defaults to the one the receptionist was built with.

## Response 202

The `test_run` job, queued.
  - response (object)
    - `object` (string, required)
    - `id` (string, required)
    - `type` (string, required, one of: provision, test_run) — `provision`: building a receptionist. `test_run`: testing one that exists.
    - `status` (string, required, one of: queued, running, succeeded, failed, cancelled)
    - `stage` (string | null, one of: reading, building, testing, finishing, null) — Where a running job is. `null` otherwise.
    - `cancelRequested` (boolean) — A running job you cancelled. It stops at the next point it can.
    - `tenantId` (string | null)
    - `attempts` (integer)
    - `result` (object | null) — Set when a job succeeds. A provisioning job has `receptionistStatus`, `reviewReason`, `frontDoorAgentId`, `agents` and `tests`. A test run has `total`, `passed`, `passRate`, `requiredPassRate` and `meetsPassRate`.
      - `receptionistStatus` (string, one of: ready, needs_review)
      - `reviewReason` (string | null, one of: tests_failed, tests_unavailable, approval_required, null)
      - `frontDoorAgentId` (string)
      - `agents` (array)
        - `items` (object)
          - `language` (string)
          - `agentId` (string)
          - `callFlowId` (string)
      - `tests` (object)
        - `total` (integer | null) — Test calls that connected.
        - `passedFirst` (integer | null) — Passed before any fix.
        - `passed` (integer | null) — Passed after fixes.
        - `passRate` (number | null)
        - `requiredPassRate` (number | null)
        - `fixesApplied` (integer | null)
        - `skipped` (boolean)
        - `unavailable` (boolean) — The test calls could not run.
      - `total` (integer) — Test run. Calls that connected and were judged.
      - `passed` (integer) — Test run.
      - `passRate` (number) — Test run.
      - `requiredPassRate` (number) — Test run.
      - `meetsPassRate` (boolean) — Test run.
    - `error` (object | null)
      - `code` (string)
      - `message` (string)
    - `createdAt` (string | null, date-time)
    - `startedAt` (string | null, date-time)
    - `finishedAt` (string | null, date-time)

## Response 400

The request is malformed, a field is invalid, or the body has a field the endpoint does not accept. `error.param` names the field when there is one.
  - response (object)
    - `error` (object, required)
      - `type` (string, required, one of: invalid_request_error, authentication_error, permission_error, conflict_error, rate_limit_error, api_error, idempotency_error)
      - `code` (string, required) — A stable code. Handle errors by `code`, not by `message`.
      - `message` (string, required)
      - `param` (string) — The request field the error is about, when there is one.
      - `requestId` (string | null) — Include it when you contact support. Not present on idempotency errors.

## Response 401

Authentication failed. A key that is unknown or revoked returns `invalid_api_key`, an
account without the Trillet Partner API returns `partner_not_enabled`, and a partner key sent in
`x-api-key` returns `partner_key_wrong_header`. No credential, a user session or a user API
key returns `partner_key_required`. Handle a `401` by
status, not only by `error.code`.
  - response
    - (oneOf)
      - value (object)
        - `error` (object, required)
          - `type` (string, required, one of: invalid_request_error, authentication_error, permission_error, conflict_error, rate_limit_error, api_error, idempotency_error)
          - `code` (string, required) — A stable code. Handle errors by `code`, not by `message`.
          - `message` (string, required)
          - `param` (string) — The request field the error is about, when there is one.
          - `requestId` (string | null) — Include it when you contact support. Not present on idempotency errors.
      - value (object)
        - `error` (string, required)

## Response 403

`missing_scope`, or `key_restricted` on webhook endpoint routes.
  - response (object)
    - `error` (object, required)
      - `type` (string, required, one of: invalid_request_error, authentication_error, permission_error, conflict_error, rate_limit_error, api_error, idempotency_error)
      - `code` (string, required) — A stable code. Handle errors by `code`, not by `message`.
      - `message` (string, required)
      - `param` (string) — The request field the error is about, when there is one.
      - `requestId` (string | null) — Include it when you contact support. Not present on idempotency errors.

## Response 404

Not found, or not yours. For example `tenant_not_found`.
  - response (object)
    - `error` (object, required)
      - `type` (string, required, one of: invalid_request_error, authentication_error, permission_error, conflict_error, rate_limit_error, api_error, idempotency_error)
      - `code` (string, required) — A stable code. Handle errors by `code`, not by `message`.
      - `message` (string, required)
      - `param` (string) — The request field the error is about, when there is one.
      - `requestId` (string | null) — Include it when you contact support. Not present on idempotency errors.

## Response 409

`receptionist_not_testable`: it is still being built, or its build failed.
`job_in_progress`: another job is running for this tenant.
`tenant_suspended`: the tenant is not active.
  - response (object)
    - `error` (object, required)
      - `type` (string, required, one of: invalid_request_error, authentication_error, permission_error, conflict_error, rate_limit_error, api_error, idempotency_error)
      - `code` (string, required) — A stable code. Handle errors by `code`, not by `message`.
      - `message` (string, required)
      - `param` (string) — The request field the error is about, when there is one.
      - `requestId` (string | null) — Include it when you contact support. Not present on idempotency errors.

## Response 429

`job_limit_reached`: your account's jobs for the last 24 hours are used up.
  - response (object)
    - `error` (object, required)
      - `type` (string, required, one of: invalid_request_error, authentication_error, permission_error, conflict_error, rate_limit_error, api_error, idempotency_error)
      - `code` (string, required) — A stable code. Handle errors by `code`, not by `message`.
      - `message` (string, required)
      - `param` (string) — The request field the error is about, when there is one.
      - `requestId` (string | null) — Include it when you contact support. Not present on idempotency errors.


---

📦 **OpenAPI specs:** Every OpenAPI specification referenced by this documentation is available as a single download — https://docs.trillet.ai/api-specs.zip
