---
title: "Create Voice Token"
method: POST
path: "/api/v1/voice/tokens"
tags: ["Calls"]
---

# Create Voice Token

`POST /api/v1/voice/tokens`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/v1/voice/tokens`
- Auth: none declared

Mint a LiveKit room and token for one of your end users, and return the credentials to hand to your client.

Requires Idempotency-Key: a retried request returns the room minted the first time instead of starting a second call.

## Headers

- `Idempotency-Key` string, nullable

## Request body

- VoiceTokenRequest
  - `widget_id` integer, required: The widget this call belongs to.
  - `end_user_id` string, nullable: Your own identifier for the person calling. It identifies them in the room and comes back inside `metadata` on the call events.
  - `metadata` object, nullable: Your own correlation data. It is stored with the call and returned on the call events, and is never shown to the agent.

## Response `200`

Successful Response

- VoiceTokenResponse
  - `url` string, required
  - `token` string, required
  - `room` string, required
  - `call_id` string, required
  - `expires_at` string, required

## Other responses

- `403`: The widget has voice turned off, or voice is disabled for the workspace.
- `404`: No such widget in this workspace, or no voice trigger matches it.
- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/d84e7dc9977d?raw)
