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
Whether video is enabled for SIP
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.
Name of the S3 bucket for storing recordings
AWS region where the S3 bucket is located
ARN of the IAM role to assume for S3 access
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.
Room expiration time as Unix timestamp (e.g., time.time() + 300 for 5 minutes)
Whether chat is enabled in the room
Whether the prejoin lobby UI is enabled
Whether emoji reactions are enabled
Whether to eject participants when room expires
Whether dial-out is enabled
Recording settings (“cloud”, “local”, or “raw-tracks”)
Geographic region for room
Maximum number of participants allowed in the room
Configuration for custom S3 bucket recordings
SIP configuration parameters
SIP URI configuration (returned by Daily)
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.
Room name (if not provided, one will be generated)
Room privacy setting (“private” or “public”)
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.
Whether the room was created via API
Room creation timestamp in ISO 8601 format
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.
The room this token is valid for. If not set, token is valid for all rooms.
Whether to eject user when token expires
Eject user after this many seconds
“Not before” timestamp - users cannot join before this time
Expiration timestamp - users cannot join after this time
Whether token grants owner privileges
User’s display name in the meeting
Unique identifier for the user (36 char limit)
Whether user can share their screen
Whether to join with video off
Whether to join with audio off
Recording settings (“cloud”, “local”, or “raw-tracks”)
Whether to show prejoin UI
Whether to start cloud recording when user joins
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_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.
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.
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.
The complete Daily room URL
Token expiration time in seconds
Whether to eject user when token expires
Whether the token should have owner privileges (overrides any setting in
params)
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.
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.
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.
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"