---
title: "Start a test call against a branch"
method: POST
path: "/agent/{id}/branches/{branchId}/test-call"
tags: ["Agent Versioning - Branches"]
---

# Start a test call against a branch

`POST /agent/{id}/branches/{branchId}/test-call`

Start a test call using the branch's current config. Send `includeDraft: true` to test the open draft, or send `revisionId` to test a specific committed revision on the branch. Sending both is a validation error.

The response always includes `conversationId` and `callId`. For `webcall` and `chat`, it also includes `token`, `roomName`, and `host`. Those fields are omitted for `telephony`.

## Path parameters

- `id` string, required
- `branchId` string, required

## Request body

- TestCallV2Request — Body for `POST /agent/{id}/branches/{branchId}/test-call`. When both `includeDraft` and `revisionId` are omitted, the branch's committed head is used.
  - `includeDraft` boolean — When `true`, the test call uses the branch's open draft. Mutually exclusive with `revisionId`.
  - `revisionId` string — Test against a specific committed revision on the branch. Mutually exclusive with `includeDraft: true`.
  - `mode` 'webcall' | 'chat' | 'telephony'
  - `toPhone` string — E.164-formatted number. Required when `mode` is `telephony`. Omit for `webcall` and `chat`.

## Response `200`

Test call initiated.

- object
  - `status` boolean
  - `data` TestCallResult — Returned by `POST /agent/{id}/branches/{branchId}/test-call`.
    - `conversationId` string, required
    - `callId` string, required
    - `token` string — LiveKit access token. Returned for `webcall` and `chat` modes only.
    - `roomName` string — Returned for `webcall` and `chat` modes only.
    - `host` string — Returned for `webcall` and `chat` modes only.

## Other responses

- `400` — Invalid input
- `401` — Unauthorized access
- `403` — Forbidden. Returned for workflow_graph agents when the organization lacks conversational agents access.
- `404` — Branch, agent, or referenced revision not found. Also returned when `includeDraft: true` is sent and no draft is open.
- `409` — The branch has no committed revision to test against.
- `500` — Internal server error

---

[API](https://skmtc.net/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.net/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/revisions/c2d0eb64b01a/schema)
