Skip to main content
POST
/
api
/
start
/
{agent_id}
{
  "createDailyRoom": true,
  "dailyRoomProperties": {
    "start_video_off": true
  },
  "dailyMeetingTokenProperties": {
    "is_owner": true,
    "user_name": "Preview Tester"
  },
  "body": {
    "test_context": "agent-editor-preview"
  }
}
{
  "dailyRoom": "https://your-domain.daily.co/room-name",
  "dailyToken": "eyJhbGciOi...",
  "sessionId": "call_a1b2c3d4e5f6"
}
Use preview mode to test an agent directly from the dashboard (or your own client) without placing a PSTN call.

What this endpoint does

POST /api/start/{agent_id} creates a temporary preview session and returns connection details:
  • dailyRoom: temporary room URL
  • dailyToken: temporary participant token
  • sessionId: Butter call/session ID (call_...)
This is the customer-facing session start flow used by the agent preview UI.
agent_id
string
required
Agent ID to preview (format: agent_...).
createDailyRoom
boolean
When true, requests creation of a room for this preview session.
dailyRoomProperties
object
Optional room configuration passed through to the preview room provider.
dailyMeetingTokenProperties
object
Optional token configuration for the preview participant.
body
object
Optional custom payload forwarded to the preview bot runtime.

Response

dailyRoom
string
Preview room URL.
dailyToken
string
Preview participant token.
sessionId
string
Preview session call ID (call_...).
{
  "createDailyRoom": true,
  "dailyRoomProperties": {
    "start_video_off": true
  },
  "dailyMeetingTokenProperties": {
    "is_owner": true,
    "user_name": "Preview Tester"
  },
  "body": {
    "test_context": "agent-editor-preview"
  }
}
{
  "dailyRoom": "https://your-domain.daily.co/room-name",
  "dailyToken": "eyJhbGciOi...",
  "sessionId": "call_a1b2c3d4e5f6"
}

Offer/Answer testing flow (custom WebRTC clients)

If you are building a custom WebRTC test client, Butter preview also supports an offer/answer exchange:
  1. Create an SDP offer from your client.
  2. Send the offer to the preview API.
  3. Apply the returned SDP answer in your client.
  4. Continue ICE candidate exchange until connected.
This docs section intentionally stays at flow level. It does not expose low-level transport internals.