---
title: "Create Token"
method: POST
path: "/v1/livekit/token"
tags: ["LiveKit", "LiveKit"]
---

# Create Token

`POST /v1/livekit/token`

## Request

- Base URL: `https://api.call2me.app`
- URL: `https://api.call2me.app/v1/livekit/token`
- Auth: HTTP bearer

Create a LiveKit access token for the current user.

This allows users to join a voice session with an agent.

Dynamic context variables can be passed via `context` field:
- These will be injected into the agent's system prompt
- Use {{variable_name}} syntax in prompts
- Built-in variables: {{current_time}}, {{current_date}}, {{username}}

## Request body

- TokenRequest: Request for a LiveKit access token.
  - `room_name` string, required
  - `participant_name` string, nullable
  - `agent_id` string, nullable
  - `context` object, nullable

## Response `200`

Successful Response

- TokenResponse: LiveKit access token response.
  - `token` string, required
  - `url` string, required
  - `room_name` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/call2me/apis/call2me-api.md) · [All operations](https://skmtc.dev/call2me/apis/call2me-api/llms.txt) · [OpenAPI document](https://skmtc.dev/call2me/apis/call2me-api/revisions/3951f9b7e47d?raw)
