Daily REST API Documentation

For complete Daily REST API reference and additional details

Classes

DailyRoomSipParams

Configuration for SIP (Session Initiation Protocol) parameters.
display_name
string
default:"sw-sip-dialin"
Display name for the SIP endpoint
video
boolean
default:false
Whether video is enabled for SIP
sip_mode
string
default:"dial-in"
SIP connection mode
num_endpoints
integer
default:1
Number of SIP endpoints
from pipecat.transports.services.helpers.daily_rest import DailyRoomSipParams

sip_params = DailyRoomSipParams(
    display_name="conference-line",
    video=True,
    num_endpoints=2
)

RecordingsBucketConfig

Configuration for storing Daily recordings in a custom S3 bucket.
bucket_name
string
required
Name of the S3 bucket for storing recordings
bucket_region
string
required
AWS region where the S3 bucket is located
assume_role_arn
string
required
ARN of the IAM role to assume for S3 access
allow_api_access
boolean
default:false
Whether to allow API access to the recordings
from pipecat.transports.services.helpers.daily_rest import RecordingsBucketConfig

bucket_config = RecordingsBucketConfig(
    bucket_name="my-recordings-bucket",
    bucket_region="us-west-2",
    assume_role_arn="arn:aws:iam::123456789012:role/DailyRecordingsRole",
    allow_api_access=True
)

DailyRoomProperties

Properties that configure a Daily room’s behavior and features.
exp
float
Room expiration time as Unix timestamp (e.g., time.time() + 300 for 5 minutes)
enable_chat
boolean
default:false
Whether chat is enabled in the room
enable_prejoin_ui
boolean
default:false
Whether the prejoin lobby UI is enabled
enable_emoji_reactions
boolean
default:false
Whether emoji reactions are enabled
eject_at_room_exp
boolean
default:false
Whether to eject participants when room expires
enable_dialout
boolean
Whether dial-out is enabled
enable_recording
string
Recording settings (“cloud”, “local”, or “raw-tracks”)
geo
string
Geographic region for room
max_participants
number
Maximum number of participants allowed in the room
recordings_bucket
RecordingsBucketConfig
Configuration for custom S3 bucket recordings
sip
DailyRoomSipParams
SIP configuration parameters
sip_uri
dict
SIP URI configuration (returned by Daily)
start_video_off
boolean
default:false
Whether the camera video is turned off by default
The class also includes a sip_endpoint property that returns the SIP endpoint URI if available.
import time
from pipecat.transports.services.helpers.daily_rest import (
    DailyRoomProperties,
    DailyRoomSipParams,
    RecordingsBucketConfig,
)

properties = DailyRoomProperties(
    exp=time.time() + 3600,  # 1 hour from now
    enable_chat=True,
    enable_emoji_reactions=True,
    enable_recording="cloud",
    geo="us-west",
    max_participants=50,
    sip=DailyRoomSipParams(display_name="conference"),
    recordings_bucket=RecordingsBucketConfig(
        bucket_name="my-bucket",
        bucket_region="us-west-2",
        assume_role_arn="arn:aws:iam::123456789012:role/DailyRole"
    )
)

# Access SIP endpoint if available
if properties.sip_endpoint:
    print(f"SIP endpoint: {properties.sip_endpoint}")

DailyRoomParams

Parameters for creating a new Daily room.
name
string
Room name (if not provided, one will be generated)
privacy
string
default:"public"
Room privacy setting (“private” or “public”)
properties
DailyRoomProperties
Room configuration properties
import time
from pipecat.transports.services.helpers.daily_rest import (
    DailyRoomParams,
    DailyRoomProperties,
)

params = DailyRoomParams(
    name="team-meeting",
    privacy="private",
    properties=DailyRoomProperties(
        enable_chat=True,
        exp=time.time() + 7200  # 2 hours from now
    )
)

DailyRoomObject

Response object representing a Daily room.
id
string
Unique room identifier
name
string
Room name
api_created
boolean
Whether the room was created via API
privacy
string
Room privacy setting
url
string
Complete room URL
created_at
string
Room creation timestamp in ISO 8601 format
config
DailyRoomProperties
Room configuration
from pipecat.transports.services.helpers.daily_rest import (
    DailyRoomObject,
    DailyRoomProperties,
)

# Example of what a DailyRoomObject looks like when received
room = DailyRoomObject(
    id="abc123",
    name="team-meeting",
    api_created=True,
    privacy="private",
    url="https://your-domain.daily.co/team-meeting",
    created_at="2024-01-20T10:00:00.000Z",
    config=DailyRoomProperties(
        enable_chat=True,
        exp=1705743600
    )
)

DailyMeetingTokenProperties

Properties for configuring a Daily meeting token.
room_name
string
The room this token is valid for. If not set, token is valid for all rooms.
eject_at_token_exp
boolean
Whether to eject user when token expires
eject_after_elapsed
integer
Eject user after this many seconds
nbf
integer
“Not before” timestamp - users cannot join before this time
exp
integer
Expiration timestamp - users cannot join after this time
is_owner
boolean
Whether token grants owner privileges
user_name
string
User’s display name in the meeting
user_id
string
Unique identifier for the user (36 char limit)
enable_screenshare
boolean
Whether user can share their screen
start_video_off
boolean
Whether to join with video off
start_audio_off
boolean
Whether to join with audio off
enable_recording
string
Recording settings (“cloud”, “local”, or “raw-tracks”)
enable_prejoin_ui
boolean
Whether to show prejoin UI
start_cloud_recording
boolean
Whether to start cloud recording when user joins
permissions
dict
Initial default permissions for a non-meeting-owner participant

DailyMeetingTokenParams

Parameters for creating a Daily meeting token.
properties
DailyMeetingTokenProperties
Token configuration properties
from pipecat.transports.services.helpers.daily_rest import (
    DailyMeetingTokenParams,
    DailyMeetingTokenProperties,
)

token_params = DailyMeetingTokenParams(
    properties=DailyMeetingTokenProperties(
        user_name="John Doe",
        enable_screenshare=True,
        start_video_off=True,
        permissions={"canSend": ["video", "audio"]}
    )
)

Initialize DailyRESTHelper

Create a new instance of the Daily REST helper.
daily_api_key
string
required
Your Daily API key
daily_api_url
string
default:"https://api.daily.co/v1"
The Daily API base URL
aiohttp_session
aiohttp.ClientSession
required
An aiohttp client session for making HTTP requests
helper = DailyRESTHelper(
    daily_api_key="your-api-key",
    aiohttp_session=session
)

Create Room

Creates a new Daily room with specified parameters.
params
DailyRoomParams
required
Room configuration parameters including name, privacy, and properties
# Create a room that expires in 1 hour
params = DailyRoomParams(
    name="my-room",
    privacy="private",
    properties=DailyRoomProperties(
        exp=time.time() + 3600,
        enable_chat=True
    )
)
room = await helper.create_room(params)
print(f"Room URL: {room.url}")

Get Room From URL

Retrieves room information using a Daily room URL.
room_url
string
required
The complete Daily room URL
room = await helper.get_room_from_url("https://your-domain.daily.co/my-room")
print(f"Room name: {room.name}")

Get Token

Generates a meeting token for a specific room.
room_url
string
required
The complete Daily room URL
expiry_time
float
default:"3600"
Token expiration time in seconds
eject_at_token_exp
bool
default:"False"
Whether to eject user when token expires
owner
bool
default:"True"
Whether the token should have owner privileges (overrides any setting in params)
params
DailyMeetingTokenParams
Additional token configuration. Note that room_name, exp, eject_at_token_exp, and is_owner will be set based on the other function parameters.
# Basic token generation
token = await helper.get_token(
    room_url="https://your-domain.daily.co/my-room",
    expiry_time=1800,  # 30 minutes
    owner=True,
    eject_at_token_exp=True
)

# Advanced token generation with additional properties
token_params = DailyMeetingTokenParams(
    properties=DailyMeetingTokenProperties(
        user_name="John Doe",
        start_video_off=True
    )
)
token = await helper.get_token(
    room_url="https://your-domain.daily.co/my-room",
    expiry_time=1800,
    owner=False,
    eject_at_token_exp=True,
    params=token_params
)

Delete Room By URL

Deletes a room using its URL.
room_url
string
required
The complete Daily room URL
success = await helper.delete_room_by_url("https://your-domain.daily.co/my-room")
if success:
    print("Room deleted successfully")

Delete Room By Name

Deletes a room using its name.
room_name
string
required
The name of the Daily room
success = await helper.delete_room_by_name("my-room")
if success:
    print("Room deleted successfully")

Get Name From URL

Extracts the room name from a Daily room URL.
room_url
string
required
The complete Daily room URL
room_name = helper.get_name_from_url("https://your-domain.daily.co/my-room")
print(f"Room name: {room_name}")  # Outputs: "my-room"