Skip to main content

Create a Private Conversation

1

Step 1: Create Your Conversation

To create a private room, set require_auth to true:
cURL
curl --request POST \
  --url https://tavusapi.com/v2/conversations \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api_key>' \
  --data '{
  "persona_id": "pdced222244b",
  "replica_id": "rfe12d8b9597",
  "require_auth": true
}'
2

Step 2: Join the Conversation

The response includes a meeting_token:
{
  "conversation_id": "ca4301628cb9",
  "conversation_url": "https://tavus.daily.co/ca4301628cb9",
  "meeting_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "status": "active"
}
Use the token by appending it to the URL:
https://tavus.daily.co/ca4301628cb9?t=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Or pass it to the Daily SDK:
callFrame.join({ url: conversation_url, token: meeting_token });
Optional: Tighten your join windowYou can set properties.participant_absent_timeout when creating the conversation to control how long the conversation stays alive before a participant joins.If no one joins within that window, the conversation is automatically ended. Since each meeting token is scoped to a single conversation, this also limits the window in which the token can be used.See Call Duration and Timeout for more details.